../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 00021d94 08020188 08020188 00008188 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .ARM 00000008 08041f1c 08041f1c 00029f1c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .init_array 00000004 08041f24 08041f24 00029f24 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .fini_array 00000004 08041f28 08041f28 00029f28 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .data 00001988 20000000 08041f2c 00030000 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .fill 0007c748 080438b4 080438b4 000338b4 2**0 CONTENTS, ALLOC, LOAD, DATA 7 .crc 00000004 080bfffc 080bfffc 000afffc 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .bss 00013984 20001988 080438b4 000b1988 2**2 ALLOC 9 ._user_heap_stack 00000200 2001530c 08057238 000b1988 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 0004b1e2 00000000 00000000 000b002f 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_abbrev 0000c22b 00000000 00000000 000fb211 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_loc 00023fa2 00000000 00000000 0010743c 2**0 CONTENTS, READONLY, DEBUGGING 15 .debug_aranges 00002eb0 00000000 00000000 0012b3e0 2**3 CONTENTS, READONLY, DEBUGGING 16 .debug_ranges 000037c0 00000000 00000000 0012e290 2**3 CONTENTS, READONLY, DEBUGGING 17 .debug_macro 0001f872 00000000 00000000 00131a50 2**0 CONTENTS, READONLY, DEBUGGING 18 .debug_line 000234ec 00000000 00000000 001512c2 2**0 CONTENTS, READONLY, DEBUGGING 19 .debug_str 0008092f 00000000 00000000 001747ae 2**0 CONTENTS, READONLY, DEBUGGING 20 .comment 00000030 00000000 00000000 001f50dd 2**0 CONTENTS, READONLY 21 .debug_frame 00007d78 00000000 00000000 001f5110 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 08020188 : 8020188: b508 push {r3, lr} 802018a: f641 1088 movw r0, #6536 ; 0x1988 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: 2000198b .word 0x2000198b 080201b0 : 80201b0: b508 push {r3, lr} 80201b2: f641 1088 movw r0, #6536 ; 0x1988 80201b6: f641 1388 movw r3, #6536 ; 0x1988 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: f641 1488 movw r4, #6536 ; 0x1988 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: f641 7004 movw r0, #7940 ; 0x1f04 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: f641 7004 movw r0, #7940 ; 0x1f04 8020220: f641 118c movw r1, #6540 ; 0x198c 8020224: f6c0 0004 movt r0, #2052 ; 0x804 8020228: f2c2 0100 movt r1, #8192 ; 0x2000 802022c: f3af 8000 nop.w 8020230: f641 1088 movw r0, #6536 ; 0x1988 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_d2f>: 8020b44: ea4f 0241 mov.w r2, r1, lsl #1 8020b48: f1b2 43e0 subs.w r3, r2, #1879048192 ; 0x70000000 8020b4c: bf24 itt cs 8020b4e: f5b3 1c00 subscs.w ip, r3, #2097152 ; 0x200000 8020b52: f1dc 5cfe rsbscs ip, ip, #532676608 ; 0x1fc00000 8020b56: d90d bls.n 8020b74 <__aeabi_d2f+0x30> 8020b58: f001 4c00 and.w ip, r1, #2147483648 ; 0x80000000 8020b5c: ea4f 02c0 mov.w r2, r0, lsl #3 8020b60: ea4c 7050 orr.w r0, ip, r0, lsr #29 8020b64: f1b2 4f00 cmp.w r2, #2147483648 ; 0x80000000 8020b68: eb40 0083 adc.w r0, r0, r3, lsl #2 8020b6c: bf08 it eq 8020b6e: f020 0001 biceq.w r0, r0, #1 8020b72: 4770 bx lr 8020b74: f011 4f80 tst.w r1, #1073741824 ; 0x40000000 8020b78: d121 bne.n 8020bbe <__aeabi_d2f+0x7a> 8020b7a: f113 7238 adds.w r2, r3, #48234496 ; 0x2e00000 8020b7e: bfbc itt lt 8020b80: f001 4000 andlt.w r0, r1, #2147483648 ; 0x80000000 8020b84: 4770 bxlt lr 8020b86: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020b8a: ea4f 5252 mov.w r2, r2, lsr #21 8020b8e: f1c2 0218 rsb r2, r2, #24 8020b92: f1c2 0c20 rsb ip, r2, #32 8020b96: fa10 f30c lsls.w r3, r0, ip 8020b9a: fa20 f002 lsr.w r0, r0, r2 8020b9e: bf18 it ne 8020ba0: f040 0001 orrne.w r0, r0, #1 8020ba4: ea4f 23c1 mov.w r3, r1, lsl #11 8020ba8: ea4f 23d3 mov.w r3, r3, lsr #11 8020bac: fa03 fc0c lsl.w ip, r3, ip 8020bb0: ea40 000c orr.w r0, r0, ip 8020bb4: fa23 f302 lsr.w r3, r3, r2 8020bb8: ea4f 0343 mov.w r3, r3, lsl #1 8020bbc: e7cc b.n 8020b58 <__aeabi_d2f+0x14> 8020bbe: ea7f 5362 mvns.w r3, r2, asr #21 8020bc2: d107 bne.n 8020bd4 <__aeabi_d2f+0x90> 8020bc4: ea50 3301 orrs.w r3, r0, r1, lsl #12 8020bc8: bf1e ittt ne 8020bca: f04f 40fe movne.w r0, #2130706432 ; 0x7f000000 8020bce: f440 0040 orrne.w r0, r0, #12582912 ; 0xc00000 8020bd2: 4770 bxne lr 8020bd4: f001 4000 and.w r0, r1, #2147483648 ; 0x80000000 8020bd8: f040 40fe orr.w r0, r0, #2130706432 ; 0x7f000000 8020bdc: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020be0: 4770 bx lr 8020be2: bf00 nop 08020be4 <__aeabi_frsub>: 8020be4: f080 4000 eor.w r0, r0, #2147483648 ; 0x80000000 8020be8: e002 b.n 8020bf0 <__addsf3> 8020bea: bf00 nop 08020bec <__aeabi_fsub>: 8020bec: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000 08020bf0 <__addsf3>: 8020bf0: 0042 lsls r2, r0, #1 8020bf2: bf1f itttt ne 8020bf4: ea5f 0341 movsne.w r3, r1, lsl #1 8020bf8: ea92 0f03 teqne r2, r3 8020bfc: ea7f 6c22 mvnsne.w ip, r2, asr #24 8020c00: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020c04: d06a beq.n 8020cdc <__addsf3+0xec> 8020c06: ea4f 6212 mov.w r2, r2, lsr #24 8020c0a: ebd2 6313 rsbs r3, r2, r3, lsr #24 8020c0e: bfc1 itttt gt 8020c10: 18d2 addgt r2, r2, r3 8020c12: 4041 eorgt r1, r0 8020c14: 4048 eorgt r0, r1 8020c16: 4041 eorgt r1, r0 8020c18: bfb8 it lt 8020c1a: 425b neglt r3, r3 8020c1c: 2b19 cmp r3, #25 8020c1e: bf88 it hi 8020c20: 4770 bxhi lr 8020c22: f010 4f00 tst.w r0, #2147483648 ; 0x80000000 8020c26: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020c2a: f020 407f bic.w r0, r0, #4278190080 ; 0xff000000 8020c2e: bf18 it ne 8020c30: 4240 negne r0, r0 8020c32: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020c36: f441 0100 orr.w r1, r1, #8388608 ; 0x800000 8020c3a: f021 417f bic.w r1, r1, #4278190080 ; 0xff000000 8020c3e: bf18 it ne 8020c40: 4249 negne r1, r1 8020c42: ea92 0f03 teq r2, r3 8020c46: d03f beq.n 8020cc8 <__addsf3+0xd8> 8020c48: f1a2 0201 sub.w r2, r2, #1 8020c4c: fa41 fc03 asr.w ip, r1, r3 8020c50: eb10 000c adds.w r0, r0, ip 8020c54: f1c3 0320 rsb r3, r3, #32 8020c58: fa01 f103 lsl.w r1, r1, r3 8020c5c: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000 8020c60: d502 bpl.n 8020c68 <__addsf3+0x78> 8020c62: 4249 negs r1, r1 8020c64: eb60 0040 sbc.w r0, r0, r0, lsl #1 8020c68: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 8020c6c: d313 bcc.n 8020c96 <__addsf3+0xa6> 8020c6e: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8020c72: d306 bcc.n 8020c82 <__addsf3+0x92> 8020c74: 0840 lsrs r0, r0, #1 8020c76: ea4f 0131 mov.w r1, r1, rrx 8020c7a: f102 0201 add.w r2, r2, #1 8020c7e: 2afe cmp r2, #254 ; 0xfe 8020c80: d251 bcs.n 8020d26 <__addsf3+0x136> 8020c82: f1b1 4f00 cmp.w r1, #2147483648 ; 0x80000000 8020c86: eb40 50c2 adc.w r0, r0, r2, lsl #23 8020c8a: bf08 it eq 8020c8c: f020 0001 biceq.w r0, r0, #1 8020c90: ea40 0003 orr.w r0, r0, r3 8020c94: 4770 bx lr 8020c96: 0049 lsls r1, r1, #1 8020c98: eb40 0000 adc.w r0, r0, r0 8020c9c: f410 0f00 tst.w r0, #8388608 ; 0x800000 8020ca0: f1a2 0201 sub.w r2, r2, #1 8020ca4: d1ed bne.n 8020c82 <__addsf3+0x92> 8020ca6: fab0 fc80 clz ip, r0 8020caa: f1ac 0c08 sub.w ip, ip, #8 8020cae: ebb2 020c subs.w r2, r2, ip 8020cb2: fa00 f00c lsl.w r0, r0, ip 8020cb6: bfaa itet ge 8020cb8: eb00 50c2 addge.w r0, r0, r2, lsl #23 8020cbc: 4252 neglt r2, r2 8020cbe: 4318 orrge r0, r3 8020cc0: bfbc itt lt 8020cc2: 40d0 lsrlt r0, r2 8020cc4: 4318 orrlt r0, r3 8020cc6: 4770 bx lr 8020cc8: f092 0f00 teq r2, #0 8020ccc: f481 0100 eor.w r1, r1, #8388608 ; 0x800000 8020cd0: bf06 itte eq 8020cd2: f480 0000 eoreq.w r0, r0, #8388608 ; 0x800000 8020cd6: 3201 addeq r2, #1 8020cd8: 3b01 subne r3, #1 8020cda: e7b5 b.n 8020c48 <__addsf3+0x58> 8020cdc: ea4f 0341 mov.w r3, r1, lsl #1 8020ce0: ea7f 6c22 mvns.w ip, r2, asr #24 8020ce4: bf18 it ne 8020ce6: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020cea: d021 beq.n 8020d30 <__addsf3+0x140> 8020cec: ea92 0f03 teq r2, r3 8020cf0: d004 beq.n 8020cfc <__addsf3+0x10c> 8020cf2: f092 0f00 teq r2, #0 8020cf6: bf08 it eq 8020cf8: 4608 moveq r0, r1 8020cfa: 4770 bx lr 8020cfc: ea90 0f01 teq r0, r1 8020d00: bf1c itt ne 8020d02: 2000 movne r0, #0 8020d04: 4770 bxne lr 8020d06: f012 4f7f tst.w r2, #4278190080 ; 0xff000000 8020d0a: d104 bne.n 8020d16 <__addsf3+0x126> 8020d0c: 0040 lsls r0, r0, #1 8020d0e: bf28 it cs 8020d10: f040 4000 orrcs.w r0, r0, #2147483648 ; 0x80000000 8020d14: 4770 bx lr 8020d16: f112 7200 adds.w r2, r2, #33554432 ; 0x2000000 8020d1a: bf3c itt cc 8020d1c: f500 0000 addcc.w r0, r0, #8388608 ; 0x800000 8020d20: 4770 bxcc lr 8020d22: f000 4300 and.w r3, r0, #2147483648 ; 0x80000000 8020d26: f043 40fe orr.w r0, r3, #2130706432 ; 0x7f000000 8020d2a: f440 0000 orr.w r0, r0, #8388608 ; 0x800000 8020d2e: 4770 bx lr 8020d30: ea7f 6222 mvns.w r2, r2, asr #24 8020d34: bf16 itet ne 8020d36: 4608 movne r0, r1 8020d38: ea7f 6323 mvnseq.w r3, r3, asr #24 8020d3c: 4601 movne r1, r0 8020d3e: 0242 lsls r2, r0, #9 8020d40: bf06 itte eq 8020d42: ea5f 2341 movseq.w r3, r1, lsl #9 8020d46: ea90 0f01 teqeq r0, r1 8020d4a: f440 0080 orrne.w r0, r0, #4194304 ; 0x400000 8020d4e: 4770 bx lr 08020d50 <__aeabi_ui2f>: 8020d50: f04f 0300 mov.w r3, #0 8020d54: e004 b.n 8020d60 <__aeabi_i2f+0x8> 8020d56: bf00 nop 08020d58 <__aeabi_i2f>: 8020d58: f010 4300 ands.w r3, r0, #2147483648 ; 0x80000000 8020d5c: bf48 it mi 8020d5e: 4240 negmi r0, r0 8020d60: ea5f 0c00 movs.w ip, r0 8020d64: bf08 it eq 8020d66: 4770 bxeq lr 8020d68: f043 4396 orr.w r3, r3, #1258291200 ; 0x4b000000 8020d6c: 4601 mov r1, r0 8020d6e: f04f 0000 mov.w r0, #0 8020d72: e01c b.n 8020dae <__aeabi_l2f+0x2a> 08020d74 <__aeabi_ul2f>: 8020d74: ea50 0201 orrs.w r2, r0, r1 8020d78: bf08 it eq 8020d7a: 4770 bxeq lr 8020d7c: f04f 0300 mov.w r3, #0 8020d80: e00a b.n 8020d98 <__aeabi_l2f+0x14> 8020d82: bf00 nop 08020d84 <__aeabi_l2f>: 8020d84: ea50 0201 orrs.w r2, r0, r1 8020d88: bf08 it eq 8020d8a: 4770 bxeq lr 8020d8c: f011 4300 ands.w r3, r1, #2147483648 ; 0x80000000 8020d90: d502 bpl.n 8020d98 <__aeabi_l2f+0x14> 8020d92: 4240 negs r0, r0 8020d94: eb61 0141 sbc.w r1, r1, r1, lsl #1 8020d98: ea5f 0c01 movs.w ip, r1 8020d9c: bf02 ittt eq 8020d9e: 4684 moveq ip, r0 8020da0: 4601 moveq r1, r0 8020da2: 2000 moveq r0, #0 8020da4: f043 43b6 orr.w r3, r3, #1526726656 ; 0x5b000000 8020da8: bf08 it eq 8020daa: f1a3 5380 subeq.w r3, r3, #268435456 ; 0x10000000 8020dae: f5a3 0300 sub.w r3, r3, #8388608 ; 0x800000 8020db2: fabc f28c clz r2, ip 8020db6: 3a08 subs r2, #8 8020db8: eba3 53c2 sub.w r3, r3, r2, lsl #23 8020dbc: db10 blt.n 8020de0 <__aeabi_l2f+0x5c> 8020dbe: fa01 fc02 lsl.w ip, r1, r2 8020dc2: 4463 add r3, ip 8020dc4: fa00 fc02 lsl.w ip, r0, r2 8020dc8: f1c2 0220 rsb r2, r2, #32 8020dcc: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000 8020dd0: fa20 f202 lsr.w r2, r0, r2 8020dd4: eb43 0002 adc.w r0, r3, r2 8020dd8: bf08 it eq 8020dda: f020 0001 biceq.w r0, r0, #1 8020dde: 4770 bx lr 8020de0: f102 0220 add.w r2, r2, #32 8020de4: fa01 fc02 lsl.w ip, r1, r2 8020de8: f1c2 0220 rsb r2, r2, #32 8020dec: ea50 004c orrs.w r0, r0, ip, lsl #1 8020df0: fa21 f202 lsr.w r2, r1, r2 8020df4: eb43 0002 adc.w r0, r3, r2 8020df8: bf08 it eq 8020dfa: ea20 70dc biceq.w r0, r0, ip, lsr #31 8020dfe: 4770 bx lr 08020e00 <__gesf2>: 8020e00: f04f 3cff mov.w ip, #4294967295 8020e04: e006 b.n 8020e14 <__cmpsf2+0x4> 8020e06: bf00 nop 08020e08 <__lesf2>: 8020e08: f04f 0c01 mov.w ip, #1 8020e0c: e002 b.n 8020e14 <__cmpsf2+0x4> 8020e0e: bf00 nop 08020e10 <__cmpsf2>: 8020e10: f04f 0c01 mov.w ip, #1 8020e14: f84d cd04 str.w ip, [sp, #-4]! 8020e18: ea4f 0240 mov.w r2, r0, lsl #1 8020e1c: ea4f 0341 mov.w r3, r1, lsl #1 8020e20: ea7f 6c22 mvns.w ip, r2, asr #24 8020e24: bf18 it ne 8020e26: ea7f 6c23 mvnsne.w ip, r3, asr #24 8020e2a: d011 beq.n 8020e50 <__cmpsf2+0x40> 8020e2c: b001 add sp, #4 8020e2e: ea52 0c53 orrs.w ip, r2, r3, lsr #1 8020e32: bf18 it ne 8020e34: ea90 0f01 teqne r0, r1 8020e38: bf58 it pl 8020e3a: ebb2 0003 subspl.w r0, r2, r3 8020e3e: bf88 it hi 8020e40: 17c8 asrhi r0, r1, #31 8020e42: bf38 it cc 8020e44: ea6f 70e1 mvncc.w r0, r1, asr #31 8020e48: bf18 it ne 8020e4a: f040 0001 orrne.w r0, r0, #1 8020e4e: 4770 bx lr 8020e50: ea7f 6c22 mvns.w ip, r2, asr #24 8020e54: d102 bne.n 8020e5c <__cmpsf2+0x4c> 8020e56: ea5f 2c40 movs.w ip, r0, lsl #9 8020e5a: d105 bne.n 8020e68 <__cmpsf2+0x58> 8020e5c: ea7f 6c23 mvns.w ip, r3, asr #24 8020e60: d1e4 bne.n 8020e2c <__cmpsf2+0x1c> 8020e62: ea5f 2c41 movs.w ip, r1, lsl #9 8020e66: d0e1 beq.n 8020e2c <__cmpsf2+0x1c> 8020e68: f85d 0b04 ldr.w r0, [sp], #4 8020e6c: 4770 bx lr 8020e6e: bf00 nop 08020e70 <__aeabi_cfrcmple>: 8020e70: 4684 mov ip, r0 8020e72: 4608 mov r0, r1 8020e74: 4661 mov r1, ip 8020e76: e7ff b.n 8020e78 <__aeabi_cfcmpeq> 08020e78 <__aeabi_cfcmpeq>: 8020e78: b50f push {r0, r1, r2, r3, lr} 8020e7a: f7ff ffc9 bl 8020e10 <__cmpsf2> 8020e7e: 2800 cmp r0, #0 8020e80: bf48 it mi 8020e82: f110 0f00 cmnmi.w r0, #0 8020e86: bd0f pop {r0, r1, r2, r3, pc} 08020e88 <__aeabi_fcmpeq>: 8020e88: f84d ed08 str.w lr, [sp, #-8]! 8020e8c: f7ff fff4 bl 8020e78 <__aeabi_cfcmpeq> 8020e90: bf0c ite eq 8020e92: 2001 moveq r0, #1 8020e94: 2000 movne r0, #0 8020e96: f85d fb08 ldr.w pc, [sp], #8 8020e9a: bf00 nop 08020e9c <__aeabi_fcmplt>: 8020e9c: f84d ed08 str.w lr, [sp, #-8]! 8020ea0: f7ff ffea bl 8020e78 <__aeabi_cfcmpeq> 8020ea4: bf34 ite cc 8020ea6: 2001 movcc r0, #1 8020ea8: 2000 movcs r0, #0 8020eaa: f85d fb08 ldr.w pc, [sp], #8 8020eae: bf00 nop 08020eb0 <__aeabi_fcmple>: 8020eb0: f84d ed08 str.w lr, [sp, #-8]! 8020eb4: f7ff ffe0 bl 8020e78 <__aeabi_cfcmpeq> 8020eb8: bf94 ite ls 8020eba: 2001 movls r0, #1 8020ebc: 2000 movhi r0, #0 8020ebe: f85d fb08 ldr.w pc, [sp], #8 8020ec2: bf00 nop 08020ec4 <__aeabi_fcmpge>: 8020ec4: f84d ed08 str.w lr, [sp, #-8]! 8020ec8: f7ff ffd2 bl 8020e70 <__aeabi_cfrcmple> 8020ecc: bf94 ite ls 8020ece: 2001 movls r0, #1 8020ed0: 2000 movhi r0, #0 8020ed2: f85d fb08 ldr.w pc, [sp], #8 8020ed6: bf00 nop 08020ed8 <__aeabi_fcmpgt>: 8020ed8: f84d ed08 str.w lr, [sp, #-8]! 8020edc: f7ff ffc8 bl 8020e70 <__aeabi_cfrcmple> 8020ee0: bf34 ite cc 8020ee2: 2001 movcc r0, #1 8020ee4: 2000 movcs r0, #0 8020ee6: f85d fb08 ldr.w pc, [sp], #8 8020eea: bf00 nop 08020eec <__aeabi_uldivmod>: 8020eec: b94b cbnz r3, 8020f02 <__aeabi_uldivmod+0x16> 8020eee: b942 cbnz r2, 8020f02 <__aeabi_uldivmod+0x16> 8020ef0: 2900 cmp r1, #0 8020ef2: bf08 it eq 8020ef4: 2800 cmpeq r0, #0 8020ef6: d002 beq.n 8020efe <__aeabi_uldivmod+0x12> 8020ef8: f04f 31ff mov.w r1, #4294967295 8020efc: 4608 mov r0, r1 8020efe: f000 b83b b.w 8020f78 <__aeabi_idiv0> 8020f02: b082 sub sp, #8 8020f04: 46ec mov ip, sp 8020f06: e92d 5000 stmdb sp!, {ip, lr} 8020f0a: f000 f81d bl 8020f48 <__gnu_uldivmod_helper> 8020f0e: f8dd e004 ldr.w lr, [sp, #4] 8020f12: b002 add sp, #8 8020f14: bc0c pop {r2, r3} 8020f16: 4770 bx lr 08020f18 <__gnu_ldivmod_helper>: 8020f18: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8020f1c: 4690 mov r8, r2 8020f1e: 4699 mov r9, r3 8020f20: 4606 mov r6, r0 8020f22: 460f mov r7, r1 8020f24: f000 f82a bl 8020f7c <__divdi3> 8020f28: 9b08 ldr r3, [sp, #32] 8020f2a: fba8 4500 umull r4, r5, r8, r0 8020f2e: fb08 f801 mul.w r8, r8, r1 8020f32: fb00 8209 mla r2, r0, r9, r8 8020f36: 1955 adds r5, r2, r5 8020f38: 1b34 subs r4, r6, r4 8020f3a: eb67 0505 sbc.w r5, r7, r5 8020f3e: e9c3 4500 strd r4, r5, [r3] 8020f42: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8020f46: bf00 nop 08020f48 <__gnu_uldivmod_helper>: 8020f48: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8020f4c: 4690 mov r8, r2 8020f4e: 4606 mov r6, r0 8020f50: 460f mov r7, r1 8020f52: 461d mov r5, r3 8020f54: f000 f9c8 bl 80212e8 <__udivdi3> 8020f58: fb00 f305 mul.w r3, r0, r5 8020f5c: fba0 4508 umull r4, r5, r0, r8 8020f60: fb08 3801 mla r8, r8, r1, r3 8020f64: 9b06 ldr r3, [sp, #24] 8020f66: 4445 add r5, r8 8020f68: 1b34 subs r4, r6, r4 8020f6a: eb67 0505 sbc.w r5, r7, r5 8020f6e: e9c3 4500 strd r4, r5, [r3] 8020f72: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8020f76: bf00 nop 08020f78 <__aeabi_idiv0>: 8020f78: 4770 bx lr 8020f7a: bf00 nop 08020f7c <__divdi3>: 8020f7c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8020f80: 2500 movs r5, #0 8020f82: 2900 cmp r1, #0 8020f84: b085 sub sp, #20 8020f86: 461c mov r4, r3 8020f88: f2c0 8149 blt.w 802121e <__divdi3+0x2a2> 8020f8c: 2c00 cmp r4, #0 8020f8e: f2c0 8141 blt.w 8021214 <__divdi3+0x298> 8020f92: 468c mov ip, r1 8020f94: 460f mov r7, r1 8020f96: 4682 mov sl, r0 8020f98: 4691 mov r9, r2 8020f9a: 4614 mov r4, r2 8020f9c: 4606 mov r6, r0 8020f9e: 4619 mov r1, r3 8020fa0: 2b00 cmp r3, #0 8020fa2: d14b bne.n 802103c <__divdi3+0xc0> 8020fa4: 4562 cmp r2, ip 8020fa6: d959 bls.n 802105c <__divdi3+0xe0> 8020fa8: fab2 f382 clz r3, r2 8020fac: b143 cbz r3, 8020fc0 <__divdi3+0x44> 8020fae: f1c3 0220 rsb r2, r3, #32 8020fb2: fa0c f703 lsl.w r7, ip, r3 8020fb6: fa20 f202 lsr.w r2, r0, r2 8020fba: 409c lsls r4, r3 8020fbc: 4317 orrs r7, r2 8020fbe: 409e lsls r6, r3 8020fc0: ea4f 4814 mov.w r8, r4, lsr #16 8020fc4: 4638 mov r0, r7 8020fc6: 4641 mov r1, r8 8020fc8: fa1f f984 uxth.w r9, r4 8020fcc: f000 fb18 bl 8021600 <__aeabi_uidiv> 8020fd0: 4641 mov r1, r8 8020fd2: 4682 mov sl, r0 8020fd4: 4638 mov r0, r7 8020fd6: f000 fc41 bl 802185c <__aeabi_uidivmod> 8020fda: 0c33 lsrs r3, r6, #16 8020fdc: fb09 f00a mul.w r0, r9, sl 8020fe0: ea43 4101 orr.w r1, r3, r1, lsl #16 8020fe4: 4288 cmp r0, r1 8020fe6: d90a bls.n 8020ffe <__divdi3+0x82> 8020fe8: 1909 adds r1, r1, r4 8020fea: f10a 32ff add.w r2, sl, #4294967295 8020fee: d205 bcs.n 8020ffc <__divdi3+0x80> 8020ff0: 4288 cmp r0, r1 8020ff2: bf84 itt hi 8020ff4: f1aa 0a02 subhi.w sl, sl, #2 8020ff8: 1909 addhi r1, r1, r4 8020ffa: d800 bhi.n 8020ffe <__divdi3+0x82> 8020ffc: 4692 mov sl, r2 8020ffe: ebc0 0b01 rsb fp, r0, r1 8021002: 4641 mov r1, r8 8021004: 4658 mov r0, fp 8021006: b2b6 uxth r6, r6 8021008: f000 fafa bl 8021600 <__aeabi_uidiv> 802100c: 4641 mov r1, r8 802100e: 4607 mov r7, r0 8021010: 4658 mov r0, fp 8021012: f000 fc23 bl 802185c <__aeabi_uidivmod> 8021016: fb09 f907 mul.w r9, r9, r7 802101a: ea46 4101 orr.w r1, r6, r1, lsl #16 802101e: 4589 cmp r9, r1 8021020: d907 bls.n 8021032 <__divdi3+0xb6> 8021022: 1e7b subs r3, r7, #1 8021024: 190c adds r4, r1, r4 8021026: f080 8157 bcs.w 80212d8 <__divdi3+0x35c> 802102a: 3f02 subs r7, #2 802102c: 45a1 cmp r9, r4 802102e: f240 8153 bls.w 80212d8 <__divdi3+0x35c> 8021032: ea47 400a orr.w r0, r7, sl, lsl #16 8021036: f04f 0800 mov.w r8, #0 802103a: e004 b.n 8021046 <__divdi3+0xca> 802103c: 4563 cmp r3, ip 802103e: d958 bls.n 80210f2 <__divdi3+0x176> 8021040: f04f 0800 mov.w r8, #0 8021044: 4640 mov r0, r8 8021046: 4602 mov r2, r0 8021048: 4643 mov r3, r8 802104a: b115 cbz r5, 8021052 <__divdi3+0xd6> 802104c: 4252 negs r2, r2 802104e: eb63 0343 sbc.w r3, r3, r3, lsl #1 8021052: 4610 mov r0, r2 8021054: 4619 mov r1, r3 8021056: b005 add sp, #20 8021058: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802105c: b922 cbnz r2, 8021068 <__divdi3+0xec> 802105e: 2001 movs r0, #1 8021060: 4611 mov r1, r2 8021062: f000 facd bl 8021600 <__aeabi_uidiv> 8021066: 4604 mov r4, r0 8021068: fab4 f384 clz r3, r4 802106c: 2b00 cmp r3, #0 802106e: f040 80dc bne.w 802122a <__divdi3+0x2ae> 8021072: 1b3f subs r7, r7, r4 8021074: ea4f 4914 mov.w r9, r4, lsr #16 8021078: fa1f fa84 uxth.w sl, r4 802107c: f04f 0801 mov.w r8, #1 8021080: 4649 mov r1, r9 8021082: 4638 mov r0, r7 8021084: f000 fabc bl 8021600 <__aeabi_uidiv> 8021088: 4649 mov r1, r9 802108a: 4683 mov fp, r0 802108c: 4638 mov r0, r7 802108e: f000 fbe5 bl 802185c <__aeabi_uidivmod> 8021092: 0c33 lsrs r3, r6, #16 8021094: fb0a f00b mul.w r0, sl, fp 8021098: ea43 4101 orr.w r1, r3, r1, lsl #16 802109c: 4288 cmp r0, r1 802109e: d90b bls.n 80210b8 <__divdi3+0x13c> 80210a0: 1909 adds r1, r1, r4 80210a2: f10b 33ff add.w r3, fp, #4294967295 80210a6: f080 8115 bcs.w 80212d4 <__divdi3+0x358> 80210aa: 4288 cmp r0, r1 80210ac: bf84 itt hi 80210ae: f1ab 0b02 subhi.w fp, fp, #2 80210b2: 1909 addhi r1, r1, r4 80210b4: f240 810e bls.w 80212d4 <__divdi3+0x358> 80210b8: 1a0b subs r3, r1, r0 80210ba: 4649 mov r1, r9 80210bc: 4618 mov r0, r3 80210be: 9301 str r3, [sp, #4] 80210c0: f000 fa9e bl 8021600 <__aeabi_uidiv> 80210c4: 9b01 ldr r3, [sp, #4] 80210c6: 4649 mov r1, r9 80210c8: b2b6 uxth r6, r6 80210ca: 4607 mov r7, r0 80210cc: 4618 mov r0, r3 80210ce: f000 fbc5 bl 802185c <__aeabi_uidivmod> 80210d2: fb0a fa07 mul.w sl, sl, r7 80210d6: ea46 4101 orr.w r1, r6, r1, lsl #16 80210da: 458a cmp sl, r1 80210dc: d906 bls.n 80210ec <__divdi3+0x170> 80210de: 1e7b subs r3, r7, #1 80210e0: 190c adds r4, r1, r4 80210e2: d202 bcs.n 80210ea <__divdi3+0x16e> 80210e4: 3f02 subs r7, #2 80210e6: 45a2 cmp sl, r4 80210e8: d800 bhi.n 80210ec <__divdi3+0x170> 80210ea: 461f mov r7, r3 80210ec: ea47 400b orr.w r0, r7, fp, lsl #16 80210f0: e7a9 b.n 8021046 <__divdi3+0xca> 80210f2: fab3 f483 clz r4, r3 80210f6: 2c00 cmp r4, #0 80210f8: f000 80e4 beq.w 80212c4 <__divdi3+0x348> 80210fc: f1c4 0320 rsb r3, r4, #32 8021100: fa01 f104 lsl.w r1, r1, r4 8021104: fa22 fa03 lsr.w sl, r2, r3 8021108: fa2c fb03 lsr.w fp, ip, r3 802110c: ea4a 0a01 orr.w sl, sl, r1 8021110: fa20 f803 lsr.w r8, r0, r3 8021114: fa0c fc04 lsl.w ip, ip, r4 8021118: 4658 mov r0, fp 802111a: ea4f 471a mov.w r7, sl, lsr #16 802111e: ea48 080c orr.w r8, r8, ip 8021122: 4639 mov r1, r7 8021124: fa02 f904 lsl.w r9, r2, r4 8021128: f8cd 900c str.w r9, [sp, #12] 802112c: f000 fa68 bl 8021600 <__aeabi_uidiv> 8021130: 4639 mov r1, r7 8021132: 4681 mov r9, r0 8021134: 4658 mov r0, fp 8021136: f000 fb91 bl 802185c <__aeabi_uidivmod> 802113a: fa1f fc8a uxth.w ip, sl 802113e: ea4f 4318 mov.w r3, r8, lsr #16 8021142: fb0c f009 mul.w r0, ip, r9 8021146: ea43 4301 orr.w r3, r3, r1, lsl #16 802114a: 4298 cmp r0, r3 802114c: d90c bls.n 8021168 <__divdi3+0x1ec> 802114e: eb13 030a adds.w r3, r3, sl 8021152: f109 31ff add.w r1, r9, #4294967295 8021156: f080 80c3 bcs.w 80212e0 <__divdi3+0x364> 802115a: 4298 cmp r0, r3 802115c: bf84 itt hi 802115e: f1a9 0902 subhi.w r9, r9, #2 8021162: 4453 addhi r3, sl 8021164: f240 80bc bls.w 80212e0 <__divdi3+0x364> 8021168: 1a1b subs r3, r3, r0 802116a: 4639 mov r1, r7 802116c: 4618 mov r0, r3 802116e: f8cd c008 str.w ip, [sp, #8] 8021172: 9301 str r3, [sp, #4] 8021174: f000 fa44 bl 8021600 <__aeabi_uidiv> 8021178: 9b01 ldr r3, [sp, #4] 802117a: 4639 mov r1, r7 802117c: fa1f f888 uxth.w r8, r8 8021180: 4683 mov fp, r0 8021182: 4618 mov r0, r3 8021184: f000 fb6a bl 802185c <__aeabi_uidivmod> 8021188: f8dd c008 ldr.w ip, [sp, #8] 802118c: fb0c f30b mul.w r3, ip, fp 8021190: ea48 4101 orr.w r1, r8, r1, lsl #16 8021194: 428b cmp r3, r1 8021196: d90c bls.n 80211b2 <__divdi3+0x236> 8021198: eb11 010a adds.w r1, r1, sl 802119c: f10b 30ff add.w r0, fp, #4294967295 80211a0: f080 809c bcs.w 80212dc <__divdi3+0x360> 80211a4: 428b cmp r3, r1 80211a6: bf84 itt hi 80211a8: f1ab 0b02 subhi.w fp, fp, #2 80211ac: 4451 addhi r1, sl 80211ae: f240 8095 bls.w 80212dc <__divdi3+0x360> 80211b2: 9f03 ldr r7, [sp, #12] 80211b4: ea4b 4009 orr.w r0, fp, r9, lsl #16 80211b8: 1ac9 subs r1, r1, r3 80211ba: fa1f fc80 uxth.w ip, r0 80211be: b2ba uxth r2, r7 80211c0: ea4f 4917 mov.w r9, r7, lsr #16 80211c4: 0c07 lsrs r7, r0, #16 80211c6: fb02 f80c mul.w r8, r2, ip 80211ca: fb02 f207 mul.w r2, r2, r7 80211ce: fb09 230c mla r3, r9, ip, r2 80211d2: fb09 f907 mul.w r9, r9, r7 80211d6: eb03 4318 add.w r3, r3, r8, lsr #16 80211da: 429a cmp r2, r3 80211dc: bf88 it hi 80211de: f509 3980 addhi.w r9, r9, #65536 ; 0x10000 80211e2: eb09 4913 add.w r9, r9, r3, lsr #16 80211e6: 4549 cmp r1, r9 80211e8: d310 bcc.n 802120c <__divdi3+0x290> 80211ea: fa1f f888 uxth.w r8, r8 80211ee: bf14 ite ne 80211f0: 2200 movne r2, #0 80211f2: 2201 moveq r2, #1 80211f4: fa06 f404 lsl.w r4, r6, r4 80211f8: eb08 4303 add.w r3, r8, r3, lsl #16 80211fc: 429c cmp r4, r3 80211fe: bf2c ite cs 8021200: 2300 movcs r3, #0 8021202: f002 0301 andcc.w r3, r2, #1 8021206: 2b00 cmp r3, #0 8021208: f43f af15 beq.w 8021036 <__divdi3+0xba> 802120c: 3801 subs r0, #1 802120e: f04f 0800 mov.w r8, #0 8021212: e718 b.n 8021046 <__divdi3+0xca> 8021214: 4252 negs r2, r2 8021216: eb63 0343 sbc.w r3, r3, r3, lsl #1 802121a: 43ed mvns r5, r5 802121c: e6b9 b.n 8020f92 <__divdi3+0x16> 802121e: 4240 negs r0, r0 8021220: eb61 0141 sbc.w r1, r1, r1, lsl #1 8021224: f04f 35ff mov.w r5, #4294967295 8021228: e6b0 b.n 8020f8c <__divdi3+0x10> 802122a: 409c lsls r4, r3 802122c: f1c3 0b20 rsb fp, r3, #32 8021230: fa27 f80b lsr.w r8, r7, fp 8021234: fa07 f703 lsl.w r7, r7, r3 8021238: ea4f 4914 mov.w r9, r4, lsr #16 802123c: 4640 mov r0, r8 802123e: 4649 mov r1, r9 8021240: fa26 fb0b lsr.w fp, r6, fp 8021244: 409e lsls r6, r3 8021246: f000 f9db bl 8021600 <__aeabi_uidiv> 802124a: 4649 mov r1, r9 802124c: fa1f fa84 uxth.w sl, r4 8021250: ea4b 0b07 orr.w fp, fp, r7 8021254: 4603 mov r3, r0 8021256: 4640 mov r0, r8 8021258: 9301 str r3, [sp, #4] 802125a: f000 faff bl 802185c <__aeabi_uidivmod> 802125e: 9b01 ldr r3, [sp, #4] 8021260: ea4f 421b mov.w r2, fp, lsr #16 8021264: fb0a f003 mul.w r0, sl, r3 8021268: ea42 4101 orr.w r1, r2, r1, lsl #16 802126c: 4288 cmp r0, r1 802126e: d906 bls.n 802127e <__divdi3+0x302> 8021270: 1e5a subs r2, r3, #1 8021272: 1909 adds r1, r1, r4 8021274: d236 bcs.n 80212e4 <__divdi3+0x368> 8021276: 4288 cmp r0, r1 8021278: d934 bls.n 80212e4 <__divdi3+0x368> 802127a: 3b02 subs r3, #2 802127c: 1909 adds r1, r1, r4 802127e: 1a0f subs r7, r1, r0 8021280: 4649 mov r1, r9 8021282: 4638 mov r0, r7 8021284: 9301 str r3, [sp, #4] 8021286: f000 f9bb bl 8021600 <__aeabi_uidiv> 802128a: 4649 mov r1, r9 802128c: fa1f fb8b uxth.w fp, fp 8021290: 4680 mov r8, r0 8021292: 4638 mov r0, r7 8021294: f000 fae2 bl 802185c <__aeabi_uidivmod> 8021298: 9b01 ldr r3, [sp, #4] 802129a: fb0a f708 mul.w r7, sl, r8 802129e: ea4b 4101 orr.w r1, fp, r1, lsl #16 80212a2: 428f cmp r7, r1 80212a4: d90a bls.n 80212bc <__divdi3+0x340> 80212a6: 1909 adds r1, r1, r4 80212a8: f108 32ff add.w r2, r8, #4294967295 80212ac: d205 bcs.n 80212ba <__divdi3+0x33e> 80212ae: 428f cmp r7, r1 80212b0: bf84 itt hi 80212b2: f1a8 0802 subhi.w r8, r8, #2 80212b6: 1909 addhi r1, r1, r4 80212b8: d800 bhi.n 80212bc <__divdi3+0x340> 80212ba: 4690 mov r8, r2 80212bc: 1bcf subs r7, r1, r7 80212be: ea48 4803 orr.w r8, r8, r3, lsl #16 80212c2: e6dd b.n 8021080 <__divdi3+0x104> 80212c4: 2001 movs r0, #1 80212c6: 4563 cmp r3, ip 80212c8: bf28 it cs 80212ca: 4552 cmpcs r2, sl 80212cc: 46a0 mov r8, r4 80212ce: f67f aeba bls.w 8021046 <__divdi3+0xca> 80212d2: e6b5 b.n 8021040 <__divdi3+0xc4> 80212d4: 469b mov fp, r3 80212d6: e6ef b.n 80210b8 <__divdi3+0x13c> 80212d8: 461f mov r7, r3 80212da: e6aa b.n 8021032 <__divdi3+0xb6> 80212dc: 4683 mov fp, r0 80212de: e768 b.n 80211b2 <__divdi3+0x236> 80212e0: 4689 mov r9, r1 80212e2: e741 b.n 8021168 <__divdi3+0x1ec> 80212e4: 4613 mov r3, r2 80212e6: e7ca b.n 802127e <__divdi3+0x302> 080212e8 <__udivdi3>: 80212e8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80212ec: 4606 mov r6, r0 80212ee: b083 sub sp, #12 80212f0: 460d mov r5, r1 80212f2: 4614 mov r4, r2 80212f4: 4607 mov r7, r0 80212f6: 4688 mov r8, r1 80212f8: 2b00 cmp r3, #0 80212fa: d14a bne.n 8021392 <__udivdi3+0xaa> 80212fc: 428a cmp r2, r1 80212fe: d955 bls.n 80213ac <__udivdi3+0xc4> 8021300: fab2 f382 clz r3, r2 8021304: b14b cbz r3, 802131a <__udivdi3+0x32> 8021306: f1c3 0220 rsb r2, r3, #32 802130a: fa01 f803 lsl.w r8, r1, r3 802130e: fa20 f202 lsr.w r2, r0, r2 8021312: 409c lsls r4, r3 8021314: ea42 0808 orr.w r8, r2, r8 8021318: 409f lsls r7, r3 802131a: 0c25 lsrs r5, r4, #16 802131c: 4640 mov r0, r8 802131e: 4629 mov r1, r5 8021320: fa1f fa84 uxth.w sl, r4 8021324: f000 f96c bl 8021600 <__aeabi_uidiv> 8021328: 4629 mov r1, r5 802132a: 4681 mov r9, r0 802132c: 4640 mov r0, r8 802132e: f000 fa95 bl 802185c <__aeabi_uidivmod> 8021332: 0c3b lsrs r3, r7, #16 8021334: fb0a f009 mul.w r0, sl, r9 8021338: ea43 4101 orr.w r1, r3, r1, lsl #16 802133c: 4288 cmp r0, r1 802133e: d90a bls.n 8021356 <__udivdi3+0x6e> 8021340: 1909 adds r1, r1, r4 8021342: f109 32ff add.w r2, r9, #4294967295 8021346: d205 bcs.n 8021354 <__udivdi3+0x6c> 8021348: 4288 cmp r0, r1 802134a: bf84 itt hi 802134c: f1a9 0902 subhi.w r9, r9, #2 8021350: 1909 addhi r1, r1, r4 8021352: d800 bhi.n 8021356 <__udivdi3+0x6e> 8021354: 4691 mov r9, r2 8021356: ebc0 0801 rsb r8, r0, r1 802135a: 4629 mov r1, r5 802135c: 4640 mov r0, r8 802135e: b2bf uxth r7, r7 8021360: f000 f94e bl 8021600 <__aeabi_uidiv> 8021364: 4629 mov r1, r5 8021366: 4606 mov r6, r0 8021368: 4640 mov r0, r8 802136a: f000 fa77 bl 802185c <__aeabi_uidivmod> 802136e: fb0a fa06 mul.w sl, sl, r6 8021372: ea47 4101 orr.w r1, r7, r1, lsl #16 8021376: 458a cmp sl, r1 8021378: d907 bls.n 802138a <__udivdi3+0xa2> 802137a: 1e73 subs r3, r6, #1 802137c: 190c adds r4, r1, r4 802137e: f080 8122 bcs.w 80215c6 <__udivdi3+0x2de> 8021382: 3e02 subs r6, #2 8021384: 45a2 cmp sl, r4 8021386: f240 811e bls.w 80215c6 <__udivdi3+0x2de> 802138a: ea46 4009 orr.w r0, r6, r9, lsl #16 802138e: 2600 movs r6, #0 8021390: e058 b.n 8021444 <__udivdi3+0x15c> 8021392: 428b cmp r3, r1 8021394: d854 bhi.n 8021440 <__udivdi3+0x158> 8021396: fab3 f483 clz r4, r3 802139a: 2c00 cmp r4, #0 802139c: d156 bne.n 802144c <__udivdi3+0x164> 802139e: 428b cmp r3, r1 80213a0: bf28 it cs 80213a2: 4282 cmpcs r2, r0 80213a4: d84c bhi.n 8021440 <__udivdi3+0x158> 80213a6: 4626 mov r6, r4 80213a8: 2001 movs r0, #1 80213aa: e04b b.n 8021444 <__udivdi3+0x15c> 80213ac: b922 cbnz r2, 80213b8 <__udivdi3+0xd0> 80213ae: 2001 movs r0, #1 80213b0: 4611 mov r1, r2 80213b2: f000 f925 bl 8021600 <__aeabi_uidiv> 80213b6: 4604 mov r4, r0 80213b8: fab4 f384 clz r3, r4 80213bc: 2b00 cmp r3, #0 80213be: f040 80b9 bne.w 8021534 <__udivdi3+0x24c> 80213c2: 1b2d subs r5, r5, r4 80213c4: ea4f 4814 mov.w r8, r4, lsr #16 80213c8: fa1f fa84 uxth.w sl, r4 80213cc: 2601 movs r6, #1 80213ce: 4641 mov r1, r8 80213d0: 4628 mov r0, r5 80213d2: f000 f915 bl 8021600 <__aeabi_uidiv> 80213d6: 4641 mov r1, r8 80213d8: 4681 mov r9, r0 80213da: 4628 mov r0, r5 80213dc: f000 fa3e bl 802185c <__aeabi_uidivmod> 80213e0: 0c3b lsrs r3, r7, #16 80213e2: fb0a f009 mul.w r0, sl, r9 80213e6: ea43 4101 orr.w r1, r3, r1, lsl #16 80213ea: 4288 cmp r0, r1 80213ec: d90b bls.n 8021406 <__udivdi3+0x11e> 80213ee: 1909 adds r1, r1, r4 80213f0: f109 33ff add.w r3, r9, #4294967295 80213f4: f080 80e9 bcs.w 80215ca <__udivdi3+0x2e2> 80213f8: 4288 cmp r0, r1 80213fa: bf84 itt hi 80213fc: f1a9 0902 subhi.w r9, r9, #2 8021400: 1909 addhi r1, r1, r4 8021402: f240 80e2 bls.w 80215ca <__udivdi3+0x2e2> 8021406: ebc0 0b01 rsb fp, r0, r1 802140a: 4641 mov r1, r8 802140c: 4658 mov r0, fp 802140e: b2bf uxth r7, r7 8021410: f000 f8f6 bl 8021600 <__aeabi_uidiv> 8021414: 4641 mov r1, r8 8021416: 4605 mov r5, r0 8021418: 4658 mov r0, fp 802141a: f000 fa1f bl 802185c <__aeabi_uidivmod> 802141e: fb0a fa05 mul.w sl, sl, r5 8021422: ea47 4101 orr.w r1, r7, r1, lsl #16 8021426: 458a cmp sl, r1 8021428: d907 bls.n 802143a <__udivdi3+0x152> 802142a: 1e6b subs r3, r5, #1 802142c: 190c adds r4, r1, r4 802142e: f080 80ce bcs.w 80215ce <__udivdi3+0x2e6> 8021432: 3d02 subs r5, #2 8021434: 45a2 cmp sl, r4 8021436: f240 80ca bls.w 80215ce <__udivdi3+0x2e6> 802143a: ea45 4009 orr.w r0, r5, r9, lsl #16 802143e: e001 b.n 8021444 <__udivdi3+0x15c> 8021440: 2600 movs r6, #0 8021442: 4630 mov r0, r6 8021444: 4631 mov r1, r6 8021446: b003 add sp, #12 8021448: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802144c: f1c4 0120 rsb r1, r4, #32 8021450: fa03 f304 lsl.w r3, r3, r4 8021454: fa22 f801 lsr.w r8, r2, r1 8021458: fa25 f701 lsr.w r7, r5, r1 802145c: ea48 0803 orr.w r8, r8, r3 8021460: fa20 f101 lsr.w r1, r0, r1 8021464: fa05 f504 lsl.w r5, r5, r4 8021468: 4638 mov r0, r7 802146a: ea4f 4918 mov.w r9, r8, lsr #16 802146e: 430d orrs r5, r1 8021470: 4649 mov r1, r9 8021472: fa02 f204 lsl.w r2, r2, r4 8021476: 9201 str r2, [sp, #4] 8021478: f000 f8c2 bl 8021600 <__aeabi_uidiv> 802147c: 4649 mov r1, r9 802147e: 4682 mov sl, r0 8021480: 4638 mov r0, r7 8021482: f000 f9eb bl 802185c <__aeabi_uidivmod> 8021486: fa1f f288 uxth.w r2, r8 802148a: 0c2f lsrs r7, r5, #16 802148c: fb02 f00a mul.w r0, r2, sl 8021490: ea47 4701 orr.w r7, r7, r1, lsl #16 8021494: 42b8 cmp r0, r7 8021496: d906 bls.n 80214a6 <__udivdi3+0x1be> 8021498: eb17 0708 adds.w r7, r7, r8 802149c: f10a 31ff add.w r1, sl, #4294967295 80214a0: f0c0 809f bcc.w 80215e2 <__udivdi3+0x2fa> 80214a4: 468a mov sl, r1 80214a6: 1a3f subs r7, r7, r0 80214a8: 4649 mov r1, r9 80214aa: 4638 mov r0, r7 80214ac: 9200 str r2, [sp, #0] 80214ae: f000 f8a7 bl 8021600 <__aeabi_uidiv> 80214b2: 4649 mov r1, r9 80214b4: b2ad uxth r5, r5 80214b6: 4683 mov fp, r0 80214b8: 4638 mov r0, r7 80214ba: f000 f9cf bl 802185c <__aeabi_uidivmod> 80214be: 9a00 ldr r2, [sp, #0] 80214c0: fb02 f70b mul.w r7, r2, fp 80214c4: ea45 4101 orr.w r1, r5, r1, lsl #16 80214c8: 428f cmp r7, r1 80214ca: d905 bls.n 80214d8 <__udivdi3+0x1f0> 80214cc: eb11 0108 adds.w r1, r1, r8 80214d0: f10b 32ff add.w r2, fp, #4294967295 80214d4: d37d bcc.n 80215d2 <__udivdi3+0x2ea> 80214d6: 4693 mov fp, r2 80214d8: 9b01 ldr r3, [sp, #4] 80214da: ea4b 400a orr.w r0, fp, sl, lsl #16 80214de: 1bc9 subs r1, r1, r7 80214e0: ea4f 4c10 mov.w ip, r0, lsr #16 80214e4: b29d uxth r5, r3 80214e6: ea4f 4a13 mov.w sl, r3, lsr #16 80214ea: b283 uxth r3, r0 80214ec: fb05 f203 mul.w r2, r5, r3 80214f0: fb05 f50c mul.w r5, r5, ip 80214f4: fb0a 5303 mla r3, sl, r3, r5 80214f8: fb0a fa0c mul.w sl, sl, ip 80214fc: eb03 4312 add.w r3, r3, r2, lsr #16 8021500: 429d cmp r5, r3 8021502: bf88 it hi 8021504: f50a 3a80 addhi.w sl, sl, #65536 ; 0x10000 8021508: eb0a 4a13 add.w sl, sl, r3, lsr #16 802150c: 4551 cmp r1, sl 802150e: d30e bcc.n 802152e <__udivdi3+0x246> 8021510: b292 uxth r2, r2 8021512: bf14 ite ne 8021514: 2100 movne r1, #0 8021516: 2101 moveq r1, #1 8021518: fa06 f604 lsl.w r6, r6, r4 802151c: eb02 4303 add.w r3, r2, r3, lsl #16 8021520: 429e cmp r6, r3 8021522: bf2c ite cs 8021524: 2600 movcs r6, #0 8021526: f001 0601 andcc.w r6, r1, #1 802152a: 2e00 cmp r6, #0 802152c: d08a beq.n 8021444 <__udivdi3+0x15c> 802152e: 3801 subs r0, #1 8021530: 2600 movs r6, #0 8021532: e787 b.n 8021444 <__udivdi3+0x15c> 8021534: 409c lsls r4, r3 8021536: f1c3 0220 rsb r2, r3, #32 802153a: fa25 fa02 lsr.w sl, r5, r2 802153e: fa26 f902 lsr.w r9, r6, r2 8021542: ea4f 4814 mov.w r8, r4, lsr #16 8021546: 4650 mov r0, sl 8021548: 4641 mov r1, r8 802154a: fa05 f503 lsl.w r5, r5, r3 802154e: fa06 f703 lsl.w r7, r6, r3 8021552: f000 f855 bl 8021600 <__aeabi_uidiv> 8021556: 4641 mov r1, r8 8021558: ea49 0905 orr.w r9, r9, r5 802155c: 4683 mov fp, r0 802155e: 4650 mov r0, sl 8021560: f000 f97c bl 802185c <__aeabi_uidivmod> 8021564: fa1f fa84 uxth.w sl, r4 8021568: ea4f 4319 mov.w r3, r9, lsr #16 802156c: fb0a f00b mul.w r0, sl, fp 8021570: ea43 4101 orr.w r1, r3, r1, lsl #16 8021574: 4288 cmp r0, r1 8021576: d909 bls.n 802158c <__udivdi3+0x2a4> 8021578: 1909 adds r1, r1, r4 802157a: f10b 33ff add.w r3, fp, #4294967295 802157e: d238 bcs.n 80215f2 <__udivdi3+0x30a> 8021580: 4288 cmp r0, r1 8021582: bf84 itt hi 8021584: f1ab 0b02 subhi.w fp, fp, #2 8021588: 1909 addhi r1, r1, r4 802158a: d932 bls.n 80215f2 <__udivdi3+0x30a> 802158c: 1a0d subs r5, r1, r0 802158e: 4641 mov r1, r8 8021590: 4628 mov r0, r5 8021592: fa1f f989 uxth.w r9, r9 8021596: f000 f833 bl 8021600 <__aeabi_uidiv> 802159a: 4641 mov r1, r8 802159c: 4606 mov r6, r0 802159e: 4628 mov r0, r5 80215a0: f000 f95c bl 802185c <__aeabi_uidivmod> 80215a4: fb0a f506 mul.w r5, sl, r6 80215a8: ea49 4101 orr.w r1, r9, r1, lsl #16 80215ac: 428d cmp r5, r1 80215ae: d906 bls.n 80215be <__udivdi3+0x2d6> 80215b0: 1e73 subs r3, r6, #1 80215b2: 1909 adds r1, r1, r4 80215b4: d21f bcs.n 80215f6 <__udivdi3+0x30e> 80215b6: 428d cmp r5, r1 80215b8: d91d bls.n 80215f6 <__udivdi3+0x30e> 80215ba: 3e02 subs r6, #2 80215bc: 1909 adds r1, r1, r4 80215be: 1b4d subs r5, r1, r5 80215c0: ea46 460b orr.w r6, r6, fp, lsl #16 80215c4: e703 b.n 80213ce <__udivdi3+0xe6> 80215c6: 461e mov r6, r3 80215c8: e6df b.n 802138a <__udivdi3+0xa2> 80215ca: 4699 mov r9, r3 80215cc: e71b b.n 8021406 <__udivdi3+0x11e> 80215ce: 461d mov r5, r3 80215d0: e733 b.n 802143a <__udivdi3+0x152> 80215d2: 428f cmp r7, r1 80215d4: bf84 itt hi 80215d6: f1ab 0b02 subhi.w fp, fp, #2 80215da: 4441 addhi r1, r8 80215dc: f63f af7c bhi.w 80214d8 <__udivdi3+0x1f0> 80215e0: e779 b.n 80214d6 <__udivdi3+0x1ee> 80215e2: 42b8 cmp r0, r7 80215e4: bf84 itt hi 80215e6: f1aa 0a02 subhi.w sl, sl, #2 80215ea: 4447 addhi r7, r8 80215ec: f63f af5b bhi.w 80214a6 <__udivdi3+0x1be> 80215f0: e758 b.n 80214a4 <__udivdi3+0x1bc> 80215f2: 469b mov fp, r3 80215f4: e7ca b.n 802158c <__udivdi3+0x2a4> 80215f6: 461e mov r6, r3 80215f8: e7e1 b.n 80215be <__udivdi3+0x2d6> 80215fa: bf00 nop 80215fc: 0000 movs r0, r0 80215fe: 0000 movs r0, r0 08021600 <__aeabi_uidiv>: 8021600: 1e4a subs r2, r1, #1 8021602: bf08 it eq 8021604: 4770 bxeq lr 8021606: f0c0 8124 bcc.w 8021852 <__aeabi_uidiv+0x252> 802160a: 4288 cmp r0, r1 802160c: f240 8116 bls.w 802183c <__aeabi_uidiv+0x23c> 8021610: 4211 tst r1, r2 8021612: f000 8117 beq.w 8021844 <__aeabi_uidiv+0x244> 8021616: fab0 f380 clz r3, r0 802161a: fab1 f281 clz r2, r1 802161e: eba2 0303 sub.w r3, r2, r3 8021622: f1c3 031f rsb r3, r3, #31 8021626: a204 add r2, pc, #16 ; (adr r2, 8021638 <__aeabi_uidiv+0x38>) 8021628: eb02 1303 add.w r3, r2, r3, lsl #4 802162c: f04f 0200 mov.w r2, #0 8021630: 469f mov pc, r3 8021632: bf00 nop 8021634: f3af 8000 nop.w 8021638: ebb0 7fc1 cmp.w r0, r1, lsl #31 802163c: bf00 nop 802163e: eb42 0202 adc.w r2, r2, r2 8021642: bf28 it cs 8021644: eba0 70c1 subcs.w r0, r0, r1, lsl #31 8021648: ebb0 7f81 cmp.w r0, r1, lsl #30 802164c: bf00 nop 802164e: eb42 0202 adc.w r2, r2, r2 8021652: bf28 it cs 8021654: eba0 7081 subcs.w r0, r0, r1, lsl #30 8021658: ebb0 7f41 cmp.w r0, r1, lsl #29 802165c: bf00 nop 802165e: eb42 0202 adc.w r2, r2, r2 8021662: bf28 it cs 8021664: eba0 7041 subcs.w r0, r0, r1, lsl #29 8021668: ebb0 7f01 cmp.w r0, r1, lsl #28 802166c: bf00 nop 802166e: eb42 0202 adc.w r2, r2, r2 8021672: bf28 it cs 8021674: eba0 7001 subcs.w r0, r0, r1, lsl #28 8021678: ebb0 6fc1 cmp.w r0, r1, lsl #27 802167c: bf00 nop 802167e: eb42 0202 adc.w r2, r2, r2 8021682: bf28 it cs 8021684: eba0 60c1 subcs.w r0, r0, r1, lsl #27 8021688: ebb0 6f81 cmp.w r0, r1, lsl #26 802168c: bf00 nop 802168e: eb42 0202 adc.w r2, r2, r2 8021692: bf28 it cs 8021694: eba0 6081 subcs.w r0, r0, r1, lsl #26 8021698: ebb0 6f41 cmp.w r0, r1, lsl #25 802169c: bf00 nop 802169e: eb42 0202 adc.w r2, r2, r2 80216a2: bf28 it cs 80216a4: eba0 6041 subcs.w r0, r0, r1, lsl #25 80216a8: ebb0 6f01 cmp.w r0, r1, lsl #24 80216ac: bf00 nop 80216ae: eb42 0202 adc.w r2, r2, r2 80216b2: bf28 it cs 80216b4: eba0 6001 subcs.w r0, r0, r1, lsl #24 80216b8: ebb0 5fc1 cmp.w r0, r1, lsl #23 80216bc: bf00 nop 80216be: eb42 0202 adc.w r2, r2, r2 80216c2: bf28 it cs 80216c4: eba0 50c1 subcs.w r0, r0, r1, lsl #23 80216c8: ebb0 5f81 cmp.w r0, r1, lsl #22 80216cc: bf00 nop 80216ce: eb42 0202 adc.w r2, r2, r2 80216d2: bf28 it cs 80216d4: eba0 5081 subcs.w r0, r0, r1, lsl #22 80216d8: ebb0 5f41 cmp.w r0, r1, lsl #21 80216dc: bf00 nop 80216de: eb42 0202 adc.w r2, r2, r2 80216e2: bf28 it cs 80216e4: eba0 5041 subcs.w r0, r0, r1, lsl #21 80216e8: ebb0 5f01 cmp.w r0, r1, lsl #20 80216ec: bf00 nop 80216ee: eb42 0202 adc.w r2, r2, r2 80216f2: bf28 it cs 80216f4: eba0 5001 subcs.w r0, r0, r1, lsl #20 80216f8: ebb0 4fc1 cmp.w r0, r1, lsl #19 80216fc: bf00 nop 80216fe: eb42 0202 adc.w r2, r2, r2 8021702: bf28 it cs 8021704: eba0 40c1 subcs.w r0, r0, r1, lsl #19 8021708: ebb0 4f81 cmp.w r0, r1, lsl #18 802170c: bf00 nop 802170e: eb42 0202 adc.w r2, r2, r2 8021712: bf28 it cs 8021714: eba0 4081 subcs.w r0, r0, r1, lsl #18 8021718: ebb0 4f41 cmp.w r0, r1, lsl #17 802171c: bf00 nop 802171e: eb42 0202 adc.w r2, r2, r2 8021722: bf28 it cs 8021724: eba0 4041 subcs.w r0, r0, r1, lsl #17 8021728: ebb0 4f01 cmp.w r0, r1, lsl #16 802172c: bf00 nop 802172e: eb42 0202 adc.w r2, r2, r2 8021732: bf28 it cs 8021734: eba0 4001 subcs.w r0, r0, r1, lsl #16 8021738: ebb0 3fc1 cmp.w r0, r1, lsl #15 802173c: bf00 nop 802173e: eb42 0202 adc.w r2, r2, r2 8021742: bf28 it cs 8021744: eba0 30c1 subcs.w r0, r0, r1, lsl #15 8021748: ebb0 3f81 cmp.w r0, r1, lsl #14 802174c: bf00 nop 802174e: eb42 0202 adc.w r2, r2, r2 8021752: bf28 it cs 8021754: eba0 3081 subcs.w r0, r0, r1, lsl #14 8021758: ebb0 3f41 cmp.w r0, r1, lsl #13 802175c: bf00 nop 802175e: eb42 0202 adc.w r2, r2, r2 8021762: bf28 it cs 8021764: eba0 3041 subcs.w r0, r0, r1, lsl #13 8021768: ebb0 3f01 cmp.w r0, r1, lsl #12 802176c: bf00 nop 802176e: eb42 0202 adc.w r2, r2, r2 8021772: bf28 it cs 8021774: eba0 3001 subcs.w r0, r0, r1, lsl #12 8021778: ebb0 2fc1 cmp.w r0, r1, lsl #11 802177c: bf00 nop 802177e: eb42 0202 adc.w r2, r2, r2 8021782: bf28 it cs 8021784: eba0 20c1 subcs.w r0, r0, r1, lsl #11 8021788: ebb0 2f81 cmp.w r0, r1, lsl #10 802178c: bf00 nop 802178e: eb42 0202 adc.w r2, r2, r2 8021792: bf28 it cs 8021794: eba0 2081 subcs.w r0, r0, r1, lsl #10 8021798: ebb0 2f41 cmp.w r0, r1, lsl #9 802179c: bf00 nop 802179e: eb42 0202 adc.w r2, r2, r2 80217a2: bf28 it cs 80217a4: eba0 2041 subcs.w r0, r0, r1, lsl #9 80217a8: ebb0 2f01 cmp.w r0, r1, lsl #8 80217ac: bf00 nop 80217ae: eb42 0202 adc.w r2, r2, r2 80217b2: bf28 it cs 80217b4: eba0 2001 subcs.w r0, r0, r1, lsl #8 80217b8: ebb0 1fc1 cmp.w r0, r1, lsl #7 80217bc: bf00 nop 80217be: eb42 0202 adc.w r2, r2, r2 80217c2: bf28 it cs 80217c4: eba0 10c1 subcs.w r0, r0, r1, lsl #7 80217c8: ebb0 1f81 cmp.w r0, r1, lsl #6 80217cc: bf00 nop 80217ce: eb42 0202 adc.w r2, r2, r2 80217d2: bf28 it cs 80217d4: eba0 1081 subcs.w r0, r0, r1, lsl #6 80217d8: ebb0 1f41 cmp.w r0, r1, lsl #5 80217dc: bf00 nop 80217de: eb42 0202 adc.w r2, r2, r2 80217e2: bf28 it cs 80217e4: eba0 1041 subcs.w r0, r0, r1, lsl #5 80217e8: ebb0 1f01 cmp.w r0, r1, lsl #4 80217ec: bf00 nop 80217ee: eb42 0202 adc.w r2, r2, r2 80217f2: bf28 it cs 80217f4: eba0 1001 subcs.w r0, r0, r1, lsl #4 80217f8: ebb0 0fc1 cmp.w r0, r1, lsl #3 80217fc: bf00 nop 80217fe: eb42 0202 adc.w r2, r2, r2 8021802: bf28 it cs 8021804: eba0 00c1 subcs.w r0, r0, r1, lsl #3 8021808: ebb0 0f81 cmp.w r0, r1, lsl #2 802180c: bf00 nop 802180e: eb42 0202 adc.w r2, r2, r2 8021812: bf28 it cs 8021814: eba0 0081 subcs.w r0, r0, r1, lsl #2 8021818: ebb0 0f41 cmp.w r0, r1, lsl #1 802181c: bf00 nop 802181e: eb42 0202 adc.w r2, r2, r2 8021822: bf28 it cs 8021824: eba0 0041 subcs.w r0, r0, r1, lsl #1 8021828: ebb0 0f01 cmp.w r0, r1 802182c: bf00 nop 802182e: eb42 0202 adc.w r2, r2, r2 8021832: bf28 it cs 8021834: eba0 0001 subcs.w r0, r0, r1 8021838: 4610 mov r0, r2 802183a: 4770 bx lr 802183c: bf0c ite eq 802183e: 2001 moveq r0, #1 8021840: 2000 movne r0, #0 8021842: 4770 bx lr 8021844: fab1 f281 clz r2, r1 8021848: f1c2 021f rsb r2, r2, #31 802184c: fa20 f002 lsr.w r0, r0, r2 8021850: 4770 bx lr 8021852: b108 cbz r0, 8021858 <__aeabi_uidiv+0x258> 8021854: f04f 30ff mov.w r0, #4294967295 8021858: f7ff bb8e b.w 8020f78 <__aeabi_idiv0> 0802185c <__aeabi_uidivmod>: 802185c: 2900 cmp r1, #0 802185e: d0f8 beq.n 8021852 <__aeabi_uidiv+0x252> 8021860: e92d 4003 stmdb sp!, {r0, r1, lr} 8021864: f7ff fecc bl 8021600 <__aeabi_uidiv> 8021868: e8bd 4006 ldmia.w sp!, {r1, r2, lr} 802186c: fb02 f300 mul.w r3, r2, r0 8021870: eba1 0103 sub.w r1, r1, r3 8021874: 4770 bx lr 8021876: bf00 nop 08021878 : 8021878: 2100 movs r1, #0 802187a: f001 bde7 b.w 802344c 802187e: bf00 nop 08021880 : 8021880: 2100 movs r1, #0 8021882: 220a movs r2, #10 8021884: f001 bee2 b.w 802364c 08021888 <_atoi_r>: 8021888: 2200 movs r2, #0 802188a: 230a movs r3, #10 802188c: f001 be3c b.w 8023508 <_strtol_r> 08021890 <__libc_init_array>: 8021890: b570 push {r4, r5, r6, lr} 8021892: f641 7624 movw r6, #7972 ; 0x1f24 8021896: f641 7524 movw r5, #7972 ; 0x1f24 802189a: f6c0 0604 movt r6, #2052 ; 0x804 802189e: f6c0 0504 movt r5, #2052 ; 0x804 80218a2: 1b76 subs r6, r6, r5 80218a4: 10b6 asrs r6, r6, #2 80218a6: d007 beq.n 80218b8 <__libc_init_array+0x28> 80218a8: 3d04 subs r5, #4 80218aa: 2400 movs r4, #0 80218ac: f855 3f04 ldr.w r3, [r5, #4]! 80218b0: 3401 adds r4, #1 80218b2: 4798 blx r3 80218b4: 42a6 cmp r6, r4 80218b6: d1f9 bne.n 80218ac <__libc_init_array+0x1c> 80218b8: f641 7628 movw r6, #7976 ; 0x1f28 80218bc: f641 7524 movw r5, #7972 ; 0x1f24 80218c0: f6c0 0604 movt r6, #2052 ; 0x804 80218c4: f6c0 0504 movt r5, #2052 ; 0x804 80218c8: 1b76 subs r6, r6, r5 80218ca: f020 fb1b bl 8041f04 <_init> 80218ce: 10b6 asrs r6, r6, #2 80218d0: d008 beq.n 80218e4 <__libc_init_array+0x54> 80218d2: 3d04 subs r5, #4 80218d4: 2400 movs r4, #0 80218d6: f855 3f04 ldr.w r3, [r5, #4]! 80218da: 3401 adds r4, #1 80218dc: 4798 blx r3 80218de: 42a6 cmp r6, r4 80218e0: d1f9 bne.n 80218d6 <__libc_init_array+0x46> 80218e2: bd70 pop {r4, r5, r6, pc} 80218e4: bd70 pop {r4, r5, r6, pc} 80218e6: bf00 nop 080218e8 : 80218e8: 2a03 cmp r2, #3 80218ea: b470 push {r4, r5, r6} 80218ec: d922 bls.n 8021934 80218ee: ea41 0300 orr.w r3, r1, r0 80218f2: 079b lsls r3, r3, #30 80218f4: d013 beq.n 802191e 80218f6: 7805 ldrb r5, [r0, #0] 80218f8: 3a01 subs r2, #1 80218fa: 780c ldrb r4, [r1, #0] 80218fc: 2300 movs r3, #0 80218fe: 42a5 cmp r5, r4 8021900: d006 beq.n 8021910 8021902: e01b b.n 802193c 8021904: f810 5f01 ldrb.w r5, [r0, #1]! 8021908: f811 4f01 ldrb.w r4, [r1, #1]! 802190c: 42a5 cmp r5, r4 802190e: d115 bne.n 802193c 8021910: 4293 cmp r3, r2 8021912: f103 0301 add.w r3, r3, #1 8021916: d1f5 bne.n 8021904 8021918: 2000 movs r0, #0 802191a: bc70 pop {r4, r5, r6} 802191c: 4770 bx lr 802191e: 460c mov r4, r1 8021920: 4603 mov r3, r0 8021922: 3104 adds r1, #4 8021924: 3004 adds r0, #4 8021926: 681e ldr r6, [r3, #0] 8021928: 6825 ldr r5, [r4, #0] 802192a: 42ae cmp r6, r5 802192c: d108 bne.n 8021940 802192e: 3a04 subs r2, #4 8021930: 2a03 cmp r2, #3 8021932: d8f4 bhi.n 802191e 8021934: 2a00 cmp r2, #0 8021936: d1de bne.n 80218f6 8021938: 4610 mov r0, r2 802193a: e7ee b.n 802191a 802193c: 1b28 subs r0, r5, r4 802193e: e7ec b.n 802191a 8021940: 4621 mov r1, r4 8021942: 4618 mov r0, r3 8021944: 2a00 cmp r2, #0 8021946: d1d6 bne.n 80218f6 8021948: e7f6 b.n 8021938 802194a: bf00 nop 0802194c : 802194c: 2a03 cmp r2, #3 802194e: e92d 0ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021952: d809 bhi.n 8021968 8021954: b12a cbz r2, 8021962 8021956: 2300 movs r3, #0 8021958: 5ccc ldrb r4, [r1, r3] 802195a: 54c4 strb r4, [r0, r3] 802195c: 3301 adds r3, #1 802195e: 4293 cmp r3, r2 8021960: d1fa bne.n 8021958 8021962: e8bd 0ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021966: 4770 bx lr 8021968: 0783 lsls r3, r0, #30 802196a: 4402 add r2, r0 802196c: d00e beq.n 802198c 802196e: 1c44 adds r4, r0, #1 8021970: 1c4d adds r5, r1, #1 8021972: f815 7c01 ldrb.w r7, [r5, #-1] 8021976: f004 0603 and.w r6, r4, #3 802197a: 4623 mov r3, r4 802197c: 3401 adds r4, #1 802197e: 4629 mov r1, r5 8021980: 3501 adds r5, #1 8021982: f804 7c02 strb.w r7, [r4, #-2] 8021986: 2e00 cmp r6, #0 8021988: d1f3 bne.n 8021972 802198a: e000 b.n 802198e 802198c: 4603 mov r3, r0 802198e: f011 0403 ands.w r4, r1, #3 8021992: d06d beq.n 8021a70 8021994: 1ad7 subs r7, r2, r3 8021996: 1b0d subs r5, r1, r4 8021998: 2f03 cmp r7, #3 802199a: 682e ldr r6, [r5, #0] 802199c: dd19 ble.n 80219d2 802199e: f1c4 0c04 rsb ip, r4, #4 80219a2: ea4f 08c4 mov.w r8, r4, lsl #3 80219a6: 1d1c adds r4, r3, #4 80219a8: ea4f 0ccc mov.w ip, ip, lsl #3 80219ac: f855 7f04 ldr.w r7, [r5, #4]! 80219b0: ebc4 0902 rsb r9, r4, r2 80219b4: 4623 mov r3, r4 80219b6: 3104 adds r1, #4 80219b8: 3404 adds r4, #4 80219ba: f1b9 0f03 cmp.w r9, #3 80219be: fa26 fa08 lsr.w sl, r6, r8 80219c2: fa07 fb0c lsl.w fp, r7, ip 80219c6: 463e mov r6, r7 80219c8: ea4b 070a orr.w r7, fp, sl 80219cc: f844 7c08 str.w r7, [r4, #-8] 80219d0: dcec bgt.n 80219ac 80219d2: 429a cmp r2, r3 80219d4: d9c5 bls.n 8021962 80219d6: 3301 adds r3, #1 80219d8: 3101 adds r1, #1 80219da: 3201 adds r2, #1 80219dc: f811 4c01 ldrb.w r4, [r1, #-1] 80219e0: 3301 adds r3, #1 80219e2: 3101 adds r1, #1 80219e4: 4293 cmp r3, r2 80219e6: f803 4c02 strb.w r4, [r3, #-2] 80219ea: d1f7 bne.n 80219dc 80219ec: e7b9 b.n 8021962 80219ee: 680c ldr r4, [r1, #0] 80219f0: 3340 adds r3, #64 ; 0x40 80219f2: 3140 adds r1, #64 ; 0x40 80219f4: f843 4c40 str.w r4, [r3, #-64] 80219f8: f851 4c3c ldr.w r4, [r1, #-60] 80219fc: f843 4c3c str.w r4, [r3, #-60] 8021a00: f851 4c38 ldr.w r4, [r1, #-56] 8021a04: f843 4c38 str.w r4, [r3, #-56] 8021a08: f851 4c34 ldr.w r4, [r1, #-52] 8021a0c: f843 4c34 str.w r4, [r3, #-52] 8021a10: f851 4c30 ldr.w r4, [r1, #-48] 8021a14: f843 4c30 str.w r4, [r3, #-48] 8021a18: f851 4c2c ldr.w r4, [r1, #-44] 8021a1c: f843 4c2c str.w r4, [r3, #-44] 8021a20: f851 4c28 ldr.w r4, [r1, #-40] 8021a24: f843 4c28 str.w r4, [r3, #-40] 8021a28: f851 4c24 ldr.w r4, [r1, #-36] 8021a2c: f843 4c24 str.w r4, [r3, #-36] 8021a30: f851 4c20 ldr.w r4, [r1, #-32] 8021a34: f843 4c20 str.w r4, [r3, #-32] 8021a38: f851 4c1c ldr.w r4, [r1, #-28] 8021a3c: f843 4c1c str.w r4, [r3, #-28] 8021a40: f851 4c18 ldr.w r4, [r1, #-24] 8021a44: f843 4c18 str.w r4, [r3, #-24] 8021a48: f851 4c14 ldr.w r4, [r1, #-20] 8021a4c: f843 4c14 str.w r4, [r3, #-20] 8021a50: f851 4c10 ldr.w r4, [r1, #-16] 8021a54: f843 4c10 str.w r4, [r3, #-16] 8021a58: f851 4c0c ldr.w r4, [r1, #-12] 8021a5c: f843 4c0c str.w r4, [r3, #-12] 8021a60: f851 4c08 ldr.w r4, [r1, #-8] 8021a64: f843 4c08 str.w r4, [r3, #-8] 8021a68: f851 4c04 ldr.w r4, [r1, #-4] 8021a6c: f843 4c04 str.w r4, [r3, #-4] 8021a70: 1ad4 subs r4, r2, r3 8021a72: 2c3f cmp r4, #63 ; 0x3f 8021a74: dcbb bgt.n 80219ee 8021a76: e011 b.n 8021a9c 8021a78: 680c ldr r4, [r1, #0] 8021a7a: 3310 adds r3, #16 8021a7c: 3110 adds r1, #16 8021a7e: f843 4c10 str.w r4, [r3, #-16] 8021a82: f851 4c0c ldr.w r4, [r1, #-12] 8021a86: f843 4c0c str.w r4, [r3, #-12] 8021a8a: f851 4c08 ldr.w r4, [r1, #-8] 8021a8e: f843 4c08 str.w r4, [r3, #-8] 8021a92: f851 4c04 ldr.w r4, [r1, #-4] 8021a96: f843 4c04 str.w r4, [r3, #-4] 8021a9a: 1ad4 subs r4, r2, r3 8021a9c: 2c0f cmp r4, #15 8021a9e: dceb bgt.n 8021a78 8021aa0: 2c03 cmp r4, #3 8021aa2: dd96 ble.n 80219d2 8021aa4: 1d1c adds r4, r3, #4 8021aa6: 1d0d adds r5, r1, #4 8021aa8: f855 7c04 ldr.w r7, [r5, #-4] 8021aac: 1b16 subs r6, r2, r4 8021aae: 4623 mov r3, r4 8021ab0: 4629 mov r1, r5 8021ab2: 3404 adds r4, #4 8021ab4: 3504 adds r5, #4 8021ab6: 2e03 cmp r6, #3 8021ab8: f844 7c08 str.w r7, [r4, #-8] 8021abc: dcf4 bgt.n 8021aa8 8021abe: e788 b.n 80219d2 08021ac0 : 8021ac0: 2a03 cmp r2, #3 8021ac2: b2c9 uxtb r1, r1 8021ac4: b470 push {r4, r5, r6} 8021ac6: d808 bhi.n 8021ada 8021ac8: b12a cbz r2, 8021ad6 8021aca: 4603 mov r3, r0 8021acc: 1812 adds r2, r2, r0 8021ace: f803 1b01 strb.w r1, [r3], #1 8021ad2: 4293 cmp r3, r2 8021ad4: d1fb bne.n 8021ace 8021ad6: bc70 pop {r4, r5, r6} 8021ad8: 4770 bx lr 8021ada: 0783 lsls r3, r0, #30 8021adc: 4402 add r2, r0 8021ade: d009 beq.n 8021af4 8021ae0: 1c44 adds r4, r0, #1 8021ae2: f004 0503 and.w r5, r4, #3 8021ae6: 4623 mov r3, r4 8021ae8: f804 1c01 strb.w r1, [r4, #-1] 8021aec: 3401 adds r4, #1 8021aee: 2d00 cmp r5, #0 8021af0: d1f7 bne.n 8021ae2 8021af2: e000 b.n 8021af6 8021af4: 4603 mov r3, r0 8021af6: 1ad5 subs r5, r2, r3 8021af8: eb01 2401 add.w r4, r1, r1, lsl #8 8021afc: 2d3f cmp r5, #63 ; 0x3f 8021afe: eb04 4404 add.w r4, r4, r4, lsl #16 8021b02: dd2c ble.n 8021b5e 8021b04: 601c str r4, [r3, #0] 8021b06: 3340 adds r3, #64 ; 0x40 8021b08: 1ad5 subs r5, r2, r3 8021b0a: f843 4c3c str.w r4, [r3, #-60] 8021b0e: 2d3f cmp r5, #63 ; 0x3f 8021b10: f843 4c38 str.w r4, [r3, #-56] 8021b14: f843 4c34 str.w r4, [r3, #-52] 8021b18: f843 4c30 str.w r4, [r3, #-48] 8021b1c: f843 4c2c str.w r4, [r3, #-44] 8021b20: f843 4c28 str.w r4, [r3, #-40] 8021b24: f843 4c24 str.w r4, [r3, #-36] 8021b28: f843 4c20 str.w r4, [r3, #-32] 8021b2c: f843 4c1c str.w r4, [r3, #-28] 8021b30: f843 4c18 str.w r4, [r3, #-24] 8021b34: f843 4c14 str.w r4, [r3, #-20] 8021b38: f843 4c10 str.w r4, [r3, #-16] 8021b3c: f843 4c0c str.w r4, [r3, #-12] 8021b40: f843 4c08 str.w r4, [r3, #-8] 8021b44: f843 4c04 str.w r4, [r3, #-4] 8021b48: dcdc bgt.n 8021b04 8021b4a: e008 b.n 8021b5e 8021b4c: 601c str r4, [r3, #0] 8021b4e: 3310 adds r3, #16 8021b50: 1ad5 subs r5, r2, r3 8021b52: f843 4c0c str.w r4, [r3, #-12] 8021b56: f843 4c08 str.w r4, [r3, #-8] 8021b5a: f843 4c04 str.w r4, [r3, #-4] 8021b5e: 2d0f cmp r5, #15 8021b60: dcf4 bgt.n 8021b4c 8021b62: 2d03 cmp r5, #3 8021b64: dd08 ble.n 8021b78 8021b66: 1d1d adds r5, r3, #4 8021b68: 1b56 subs r6, r2, r5 8021b6a: f845 4c04 str.w r4, [r5, #-4] 8021b6e: 2e03 cmp r6, #3 8021b70: 462b mov r3, r5 8021b72: f105 0504 add.w r5, r5, #4 8021b76: dcf7 bgt.n 8021b68 8021b78: 429a cmp r2, r3 8021b7a: d9ac bls.n 8021ad6 8021b7c: 3301 adds r3, #1 8021b7e: 3201 adds r2, #1 8021b80: f803 1c01 strb.w r1, [r3, #-1] 8021b84: 3301 adds r3, #1 8021b86: 4293 cmp r3, r2 8021b88: d1fa bne.n 8021b80 8021b8a: e7a4 b.n 8021ad6 08021b8c : 8021b8c: 0783 lsls r3, r0, #30 8021b8e: b570 push {r4, r5, r6, lr} 8021b90: 4606 mov r6, r0 8021b92: d114 bne.n 8021bbe 8021b94: 6803 ldr r3, [r0, #0] 8021b96: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021b9a: ea22 0303 bic.w r3, r2, r3 8021b9e: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021ba2: d10c bne.n 8021bbe 8021ba4: 1d03 adds r3, r0, #4 8021ba6: 461a mov r2, r3 8021ba8: f853 4b04 ldr.w r4, [r3], #4 8021bac: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8021bb0: ea25 0404 bic.w r4, r5, r4 8021bb4: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021bb8: d0f5 beq.n 8021ba6 8021bba: 4610 mov r0, r2 8021bbc: e000 b.n 8021bc0 8021bbe: 4630 mov r0, r6 8021bc0: 7803 ldrb r3, [r0, #0] 8021bc2: b12b cbz r3, 8021bd0 8021bc4: 1c43 adds r3, r0, #1 8021bc6: 4618 mov r0, r3 8021bc8: 3301 adds r3, #1 8021bca: 7804 ldrb r4, [r0, #0] 8021bcc: 2c00 cmp r4, #0 8021bce: d1fa bne.n 8021bc6 8021bd0: f000 f8f0 bl 8021db4 8021bd4: 4630 mov r0, r6 8021bd6: bd70 pop {r4, r5, r6, pc} 08021bd8 : 8021bd8: ea80 0201 eor.w r2, r0, r1 8021bdc: f012 0f03 tst.w r2, #3 8021be0: f040 803a bne.w 8021c58 8021be4: f010 0203 ands.w r2, r0, #3 8021be8: f020 0003 bic.w r0, r0, #3 8021bec: f021 0103 bic.w r1, r1, #3 8021bf0: f850 cb04 ldr.w ip, [r0], #4 8021bf4: bf08 it eq 8021bf6: f851 3b04 ldreq.w r3, [r1], #4 8021bfa: d00d beq.n 8021c18 8021bfc: f082 0203 eor.w r2, r2, #3 8021c00: ea4f 02c2 mov.w r2, r2, lsl #3 8021c04: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 8021c08: fa23 f202 lsr.w r2, r3, r2 8021c0c: f851 3b04 ldr.w r3, [r1], #4 8021c10: ea4c 0c02 orr.w ip, ip, r2 8021c14: ea43 0302 orr.w r3, r3, r2 8021c18: f1ac 3201 sub.w r2, ip, #16843009 ; 0x1010101 8021c1c: 459c cmp ip, r3 8021c1e: bf01 itttt eq 8021c20: ea22 020c biceq.w r2, r2, ip 8021c24: f012 3f80 tsteq.w r2, #2155905152 ; 0x80808080 8021c28: f850 cb04 ldreq.w ip, [r0], #4 8021c2c: f851 3b04 ldreq.w r3, [r1], #4 8021c30: d0f2 beq.n 8021c18 8021c32: ea4f 600c mov.w r0, ip, lsl #24 8021c36: ea4f 2c1c mov.w ip, ip, lsr #8 8021c3a: 2801 cmp r0, #1 8021c3c: bf28 it cs 8021c3e: ebb0 6f03 cmpcs.w r0, r3, lsl #24 8021c42: bf08 it eq 8021c44: 0a1b lsreq r3, r3, #8 8021c46: d0f4 beq.n 8021c32 8021c48: f003 03ff and.w r3, r3, #255 ; 0xff 8021c4c: ea4f 6010 mov.w r0, r0, lsr #24 8021c50: eba0 0003 sub.w r0, r0, r3 8021c54: 4770 bx lr 8021c56: bf00 nop 08021c58 : 8021c58: f010 0f03 tst.w r0, #3 8021c5c: d00a beq.n 8021c74 8021c5e: f810 2b01 ldrb.w r2, [r0], #1 8021c62: f811 3b01 ldrb.w r3, [r1], #1 8021c66: 2a01 cmp r2, #1 8021c68: bf28 it cs 8021c6a: 429a cmpcs r2, r3 8021c6c: d0f4 beq.n 8021c58 8021c6e: eba2 0003 sub.w r0, r2, r3 8021c72: 4770 bx lr 8021c74: f84d 5d04 str.w r5, [sp, #-4]! 8021c78: f84d 4d04 str.w r4, [sp, #-4]! 8021c7c: f04f 0201 mov.w r2, #1 8021c80: ea42 2202 orr.w r2, r2, r2, lsl #8 8021c84: ea42 4202 orr.w r2, r2, r2, lsl #16 8021c88: f001 0c03 and.w ip, r1, #3 8021c8c: f021 0103 bic.w r1, r1, #3 8021c90: f850 4b04 ldr.w r4, [r0], #4 8021c94: f851 5b04 ldr.w r5, [r1], #4 8021c98: f1bc 0f02 cmp.w ip, #2 8021c9c: d026 beq.n 8021cec 8021c9e: d84b bhi.n 8021d38 8021ca0: f024 4c7f bic.w ip, r4, #4278190080 ; 0xff000000 8021ca4: ebbc 2f15 cmp.w ip, r5, lsr #8 8021ca8: eba4 0302 sub.w r3, r4, r2 8021cac: ea23 0304 bic.w r3, r3, r4 8021cb0: d10d bne.n 8021cce 8021cb2: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021cb6: bf08 it eq 8021cb8: f851 5b04 ldreq.w r5, [r1], #4 8021cbc: d10a bne.n 8021cd4 8021cbe: ea8c 0c04 eor.w ip, ip, r4 8021cc2: ebbc 6f05 cmp.w ip, r5, lsl #24 8021cc6: d10c bne.n 8021ce2 8021cc8: f850 4b04 ldr.w r4, [r0], #4 8021ccc: e7e8 b.n 8021ca0 8021cce: ea4f 2515 mov.w r5, r5, lsr #8 8021cd2: e05c b.n 8021d8e 8021cd4: f033 437f bics.w r3, r3, #4278190080 ; 0xff000000 8021cd8: d152 bne.n 8021d80 8021cda: 780d ldrb r5, [r1, #0] 8021cdc: ea4f 6c14 mov.w ip, r4, lsr #24 8021ce0: e055 b.n 8021d8e 8021ce2: ea4f 6c14 mov.w ip, r4, lsr #24 8021ce6: f005 05ff and.w r5, r5, #255 ; 0xff 8021cea: e050 b.n 8021d8e 8021cec: ea4f 4c04 mov.w ip, r4, lsl #16 8021cf0: eba4 0302 sub.w r3, r4, r2 8021cf4: ea4f 4c1c mov.w ip, ip, lsr #16 8021cf8: ea23 0304 bic.w r3, r3, r4 8021cfc: ebbc 4f15 cmp.w ip, r5, lsr #16 8021d00: d117 bne.n 8021d32 8021d02: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021d06: bf08 it eq 8021d08: f851 5b04 ldreq.w r5, [r1], #4 8021d0c: d107 bne.n 8021d1e 8021d0e: ea8c 0c04 eor.w ip, ip, r4 8021d12: ebbc 4f05 cmp.w ip, r5, lsl #16 8021d16: d108 bne.n 8021d2a 8021d18: f850 4b04 ldr.w r4, [r0], #4 8021d1c: e7e6 b.n 8021cec 8021d1e: 041b lsls r3, r3, #16 8021d20: d12e bne.n 8021d80 8021d22: 880d ldrh r5, [r1, #0] 8021d24: ea4f 4c14 mov.w ip, r4, lsr #16 8021d28: e031 b.n 8021d8e 8021d2a: ea4f 4505 mov.w r5, r5, lsl #16 8021d2e: ea4f 4c14 mov.w ip, r4, lsr #16 8021d32: ea4f 4515 mov.w r5, r5, lsr #16 8021d36: e02a b.n 8021d8e 8021d38: f004 0cff and.w ip, r4, #255 ; 0xff 8021d3c: ebbc 6f15 cmp.w ip, r5, lsr #24 8021d40: eba4 0302 sub.w r3, r4, r2 8021d44: ea23 0304 bic.w r3, r3, r4 8021d48: d10d bne.n 8021d66 8021d4a: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021d4e: bf08 it eq 8021d50: f851 5b04 ldreq.w r5, [r1], #4 8021d54: d10a bne.n 8021d6c 8021d56: ea8c 0c04 eor.w ip, ip, r4 8021d5a: ebbc 2f05 cmp.w ip, r5, lsl #8 8021d5e: d10a bne.n 8021d76 8021d60: f850 4b04 ldr.w r4, [r0], #4 8021d64: e7e8 b.n 8021d38 8021d66: ea4f 6515 mov.w r5, r5, lsr #24 8021d6a: e010 b.n 8021d8e 8021d6c: f014 0fff tst.w r4, #255 ; 0xff 8021d70: d006 beq.n 8021d80 8021d72: f851 5b04 ldr.w r5, [r1], #4 8021d76: ea4f 2c14 mov.w ip, r4, lsr #8 8021d7a: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8021d7e: e006 b.n 8021d8e 8021d80: f04f 0000 mov.w r0, #0 8021d84: f85d 4b04 ldr.w r4, [sp], #4 8021d88: f85d 5b04 ldr.w r5, [sp], #4 8021d8c: 4770 bx lr 8021d8e: f00c 02ff and.w r2, ip, #255 ; 0xff 8021d92: f005 00ff and.w r0, r5, #255 ; 0xff 8021d96: 2801 cmp r0, #1 8021d98: bf28 it cs 8021d9a: 4290 cmpcs r0, r2 8021d9c: bf04 itt eq 8021d9e: ea4f 2c1c moveq.w ip, ip, lsr #8 8021da2: 0a2d lsreq r5, r5, #8 8021da4: d0f3 beq.n 8021d8e 8021da6: eba2 0000 sub.w r0, r2, r0 8021daa: f85d 4b04 ldr.w r4, [sp], #4 8021dae: f85d 5b04 ldr.w r5, [sp], #4 8021db2: 4770 bx lr 08021db4 : 8021db4: ea80 0201 eor.w r2, r0, r1 8021db8: 4684 mov ip, r0 8021dba: f012 0f03 tst.w r2, #3 8021dbe: d14f bne.n 8021e60 8021dc0: f011 0f03 tst.w r1, #3 8021dc4: d132 bne.n 8021e2c 8021dc6: f84d 4d04 str.w r4, [sp, #-4]! 8021dca: f011 0f04 tst.w r1, #4 8021dce: f851 3b04 ldr.w r3, [r1], #4 8021dd2: d00b beq.n 8021dec 8021dd4: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021dd8: 439a bics r2, r3 8021dda: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021dde: bf04 itt eq 8021de0: f84c 3b04 streq.w r3, [ip], #4 8021de4: f851 3b04 ldreq.w r3, [r1], #4 8021de8: d116 bne.n 8021e18 8021dea: bf00 nop 8021dec: f851 4b04 ldr.w r4, [r1], #4 8021df0: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021df4: 439a bics r2, r3 8021df6: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021dfa: f1a4 3201 sub.w r2, r4, #16843009 ; 0x1010101 8021dfe: d10b bne.n 8021e18 8021e00: f84c 3b04 str.w r3, [ip], #4 8021e04: 43a2 bics r2, r4 8021e06: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021e0a: bf04 itt eq 8021e0c: f851 3b04 ldreq.w r3, [r1], #4 8021e10: f84c 4b04 streq.w r4, [ip], #4 8021e14: d0ea beq.n 8021dec 8021e16: 4623 mov r3, r4 8021e18: f80c 3b01 strb.w r3, [ip], #1 8021e1c: f013 0fff tst.w r3, #255 ; 0xff 8021e20: ea4f 2333 mov.w r3, r3, ror #8 8021e24: d1f8 bne.n 8021e18 8021e26: f85d 4b04 ldr.w r4, [sp], #4 8021e2a: 4770 bx lr 8021e2c: f011 0f01 tst.w r1, #1 8021e30: d006 beq.n 8021e40 8021e32: f811 2b01 ldrb.w r2, [r1], #1 8021e36: f80c 2b01 strb.w r2, [ip], #1 8021e3a: 2a00 cmp r2, #0 8021e3c: bf08 it eq 8021e3e: 4770 bxeq lr 8021e40: f011 0f02 tst.w r1, #2 8021e44: d0bf beq.n 8021dc6 8021e46: f831 2b02 ldrh.w r2, [r1], #2 8021e4a: f012 0fff tst.w r2, #255 ; 0xff 8021e4e: bf16 itet ne 8021e50: f82c 2b02 strhne.w r2, [ip], #2 8021e54: f88c 2000 strbeq.w r2, [ip] 8021e58: f412 4f7f tstne.w r2, #65280 ; 0xff00 8021e5c: d1b3 bne.n 8021dc6 8021e5e: 4770 bx lr 8021e60: f811 2b01 ldrb.w r2, [r1], #1 8021e64: f80c 2b01 strb.w r2, [ip], #1 8021e68: 2a00 cmp r2, #0 8021e6a: d1f9 bne.n 8021e60 8021e6c: 4770 bx lr 8021e6e: bf00 nop 08021e70 : 8021e70: f020 0103 bic.w r1, r0, #3 8021e74: f010 0003 ands.w r0, r0, #3 8021e78: f1c0 0000 rsb r0, r0, #0 8021e7c: f851 3b04 ldr.w r3, [r1], #4 8021e80: f100 0c04 add.w ip, r0, #4 8021e84: ea4f 0ccc mov.w ip, ip, lsl #3 8021e88: f06f 0200 mvn.w r2, #0 8021e8c: bf1c itt ne 8021e8e: fa22 f20c lsrne.w r2, r2, ip 8021e92: 4313 orrne r3, r2 8021e94: f04f 0c01 mov.w ip, #1 8021e98: ea4c 2c0c orr.w ip, ip, ip, lsl #8 8021e9c: ea4c 4c0c orr.w ip, ip, ip, lsl #16 8021ea0: eba3 020c sub.w r2, r3, ip 8021ea4: ea22 0203 bic.w r2, r2, r3 8021ea8: ea12 12cc ands.w r2, r2, ip, lsl #7 8021eac: bf04 itt eq 8021eae: f851 3b04 ldreq.w r3, [r1], #4 8021eb2: 3004 addeq r0, #4 8021eb4: d0f4 beq.n 8021ea0 8021eb6: f013 0fff tst.w r3, #255 ; 0xff 8021eba: bf1f itttt ne 8021ebc: 3001 addne r0, #1 8021ebe: f413 4f7f tstne.w r3, #65280 ; 0xff00 8021ec2: 3001 addne r0, #1 8021ec4: f413 0f7f tstne.w r3, #16711680 ; 0xff0000 8021ec8: bf18 it ne 8021eca: 3001 addne r0, #1 8021ecc: 4770 bx lr 8021ece: bf00 nop 08021ed0 : 8021ed0: 0783 lsls r3, r0, #30 8021ed2: b470 push {r4, r5, r6} 8021ed4: d113 bne.n 8021efe 8021ed6: 6803 ldr r3, [r0, #0] 8021ed8: f1a3 3401 sub.w r4, r3, #16843009 ; 0x1010101 8021edc: ea24 0303 bic.w r3, r4, r3 8021ee0: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021ee4: d10b bne.n 8021efe 8021ee6: 1d03 adds r3, r0, #4 8021ee8: 461d mov r5, r3 8021eea: f853 4b04 ldr.w r4, [r3], #4 8021eee: f1a4 3601 sub.w r6, r4, #16843009 ; 0x1010101 8021ef2: ea26 0404 bic.w r4, r6, r4 8021ef6: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021efa: d0f5 beq.n 8021ee8 8021efc: e000 b.n 8021f00 8021efe: 4605 mov r5, r0 8021f00: 782b ldrb r3, [r5, #0] 8021f02: b12b cbz r3, 8021f10 8021f04: 1c6b adds r3, r5, #1 8021f06: 461d mov r5, r3 8021f08: 3301 adds r3, #1 8021f0a: 782c ldrb r4, [r5, #0] 8021f0c: 2c00 cmp r4, #0 8021f0e: d1fa bne.n 8021f06 8021f10: 3901 subs r1, #1 8021f12: 3d01 subs r5, #1 8021f14: 1e53 subs r3, r2, #1 8021f16: b15a cbz r2, 8021f30 8021f18: f811 4f01 ldrb.w r4, [r1, #1]! 8021f1c: 461a mov r2, r3 8021f1e: f805 4f01 strb.w r4, [r5, #1]! 8021f22: b12c cbz r4, 8021f30 8021f24: 2b00 cmp r3, #0 8021f26: d1f5 bne.n 8021f14 8021f28: 706b strb r3, [r5, #1] 8021f2a: 1e53 subs r3, r2, #1 8021f2c: 2a00 cmp r2, #0 8021f2e: d1f3 bne.n 8021f18 8021f30: bc70 pop {r4, r5, r6} 8021f32: 4770 bx lr 08021f34 : 8021f34: b470 push {r4, r5, r6} 8021f36: 2a00 cmp r2, #0 8021f38: d045 beq.n 8021fc6 8021f3a: ea41 0300 orr.w r3, r1, r0 8021f3e: f013 0303 ands.w r3, r3, #3 8021f42: d129 bne.n 8021f98 8021f44: 2a03 cmp r2, #3 8021f46: d927 bls.n 8021f98 8021f48: 6805 ldr r5, [r0, #0] 8021f4a: 680c ldr r4, [r1, #0] 8021f4c: 42a5 cmp r5, r4 8021f4e: d123 bne.n 8021f98 8021f50: 1f14 subs r4, r2, #4 8021f52: d03a beq.n 8021fca 8021f54: f1a5 3201 sub.w r2, r5, #16843009 ; 0x1010101 8021f58: ea22 0505 bic.w r5, r2, r5 8021f5c: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021f60: d00d beq.n 8021f7e 8021f62: e03a b.n 8021fda 8021f64: 685b ldr r3, [r3, #4] 8021f66: 686a ldr r2, [r5, #4] 8021f68: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8021f6c: 4293 cmp r3, r2 8021f6e: ea25 0503 bic.w r5, r5, r3 8021f72: d12e bne.n 8021fd2 8021f74: 3c04 subs r4, #4 8021f76: d028 beq.n 8021fca 8021f78: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021f7c: d127 bne.n 8021fce 8021f7e: 460d mov r5, r1 8021f80: 4603 mov r3, r0 8021f82: 3104 adds r1, #4 8021f84: 3004 adds r0, #4 8021f86: 2c03 cmp r4, #3 8021f88: d8ec bhi.n 8021f64 8021f8a: 1e66 subs r6, r4, #1 8021f8c: b92c cbnz r4, 8021f9a 8021f8e: 791c ldrb r4, [r3, #4] 8021f90: 792a ldrb r2, [r5, #4] 8021f92: 1aa0 subs r0, r4, r2 8021f94: bc70 pop {r4, r5, r6} 8021f96: 4770 bx lr 8021f98: 1e56 subs r6, r2, #1 8021f9a: 7804 ldrb r4, [r0, #0] 8021f9c: 780a ldrb r2, [r1, #0] 8021f9e: 4294 cmp r4, r2 8021fa0: d1f7 bne.n 8021f92 8021fa2: b1c6 cbz r6, 8021fd6 8021fa4: b18c cbz r4, 8021fca 8021fa6: 3601 adds r6, #1 8021fa8: 1c8b adds r3, r1, #2 8021faa: 1989 adds r1, r1, r6 8021fac: e004 b.n 8021fb8 8021fae: 428b cmp r3, r1 8021fb0: f103 0301 add.w r3, r3, #1 8021fb4: d00b beq.n 8021fce 8021fb6: b144 cbz r4, 8021fca 8021fb8: f813 2c01 ldrb.w r2, [r3, #-1] 8021fbc: f810 4f01 ldrb.w r4, [r0, #1]! 8021fc0: 4294 cmp r4, r2 8021fc2: d0f4 beq.n 8021fae 8021fc4: e7e5 b.n 8021f92 8021fc6: 4610 mov r0, r2 8021fc8: e7e4 b.n 8021f94 8021fca: 4620 mov r0, r4 8021fcc: e7e2 b.n 8021f94 8021fce: 2000 movs r0, #0 8021fd0: e7e0 b.n 8021f94 8021fd2: 1e66 subs r6, r4, #1 8021fd4: e7e1 b.n 8021f9a 8021fd6: 4630 mov r0, r6 8021fd8: e7dc b.n 8021f94 8021fda: 4618 mov r0, r3 8021fdc: e7da b.n 8021f94 8021fde: bf00 nop 08021fe0 : 8021fe0: ea41 0300 orr.w r3, r1, r0 8021fe4: f013 0f03 tst.w r3, #3 8021fe8: 4603 mov r3, r0 8021fea: b470 push {r4, r5, r6} 8021fec: d025 beq.n 802203a 8021fee: b1aa cbz r2, 802201c 8021ff0: 780c ldrb r4, [r1, #0] 8021ff2: 3a01 subs r2, #1 8021ff4: f803 4b01 strb.w r4, [r3], #1 8021ff8: b14c cbz r4, 802200e 8021ffa: 461c mov r4, r3 8021ffc: b172 cbz r2, 802201c 8021ffe: f811 5f01 ldrb.w r5, [r1, #1]! 8022002: 3a01 subs r2, #1 8022004: f804 5b01 strb.w r5, [r4], #1 8022008: 4623 mov r3, r4 802200a: 2d00 cmp r5, #0 802200c: d1f6 bne.n 8021ffc 802200e: b12a cbz r2, 802201c 8022010: 189a adds r2, r3, r2 8022012: 2100 movs r1, #0 8022014: f803 1b01 strb.w r1, [r3], #1 8022018: 4293 cmp r3, r2 802201a: d1fb bne.n 8022014 802201c: bc70 pop {r4, r5, r6} 802201e: 4770 bx lr 8022020: 460e mov r6, r1 8022022: f851 4b04 ldr.w r4, [r1], #4 8022026: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 802202a: ea25 0504 bic.w r5, r5, r4 802202e: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8022032: d105 bne.n 8022040 8022034: 3a04 subs r2, #4 8022036: f843 4b04 str.w r4, [r3], #4 802203a: 2a03 cmp r2, #3 802203c: d8f0 bhi.n 8022020 802203e: e7d6 b.n 8021fee 8022040: 4631 mov r1, r6 8022042: e7d4 b.n 8021fee 08022044 : 8022044: b4f0 push {r4, r5, r6, r7} 8022046: 7804 ldrb r4, [r0, #0] 8022048: 2c00 cmp r4, #0 802204a: d021 beq.n 8022090 802204c: 780f ldrb r7, [r1, #0] 802204e: 4606 mov r6, r0 8022050: 4630 mov r0, r6 8022052: b1af cbz r7, 8022080 8022054: 42a7 cmp r7, r4 8022056: d019 beq.n 802208c 8022058: 1c4b adds r3, r1, #1 802205a: e001 b.n 8022060 802205c: 4294 cmp r4, r2 802205e: d009 beq.n 8022074 8022060: 461d mov r5, r3 8022062: f813 2b01 ldrb.w r2, [r3], #1 8022066: 2a00 cmp r2, #0 8022068: d1f8 bne.n 802205c 802206a: 7844 ldrb r4, [r0, #1] 802206c: 3601 adds r6, #1 802206e: 2c00 cmp r4, #0 8022070: d1ee bne.n 8022050 8022072: 782a ldrb r2, [r5, #0] 8022074: 2a00 cmp r2, #0 8022076: bf14 ite ne 8022078: 4630 movne r0, r6 802207a: 2000 moveq r0, #0 802207c: bcf0 pop {r4, r5, r6, r7} 802207e: 4770 bx lr 8022080: 7844 ldrb r4, [r0, #1] 8022082: 460d mov r5, r1 8022084: 3601 adds r6, #1 8022086: 2c00 cmp r4, #0 8022088: d1e2 bne.n 8022050 802208a: e7f2 b.n 8022072 802208c: 463a mov r2, r7 802208e: e7f1 b.n 8022074 8022090: 4620 mov r0, r4 8022092: e7f3 b.n 802207c 08022094 : 8022094: e92d 07f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl} 8022098: 2701 movs r7, #1 802209a: 463c mov r4, r7 802209c: 2500 movs r5, #0 802209e: f04f 36ff mov.w r6, #4294967295 80220a2: 1963 adds r3, r4, r5 80220a4: eb00 0c06 add.w ip, r0, r6 80220a8: 428b cmp r3, r1 80220aa: d20d bcs.n 80220c8 80220ac: f81c c004 ldrb.w ip, [ip, r4] 80220b0: f810 8003 ldrb.w r8, [r0, r3] 80220b4: 45e0 cmp r8, ip 80220b6: d22e bcs.n 8022116 80220b8: 2401 movs r4, #1 80220ba: 461d mov r5, r3 80220bc: 1b9f subs r7, r3, r6 80220be: 1963 adds r3, r4, r5 80220c0: 428b cmp r3, r1 80220c2: eb00 0c06 add.w ip, r0, r6 80220c6: d3f1 bcc.n 80220ac 80220c8: f04f 0a01 mov.w sl, #1 80220cc: 2500 movs r5, #0 80220ce: 4654 mov r4, sl 80220d0: f04f 3cff mov.w ip, #4294967295 80220d4: 6017 str r7, [r2, #0] 80220d6: 1963 adds r3, r4, r5 80220d8: eb00 080c add.w r8, r0, ip 80220dc: 4299 cmp r1, r3 80220de: d90e bls.n 80220fe 80220e0: f818 8004 ldrb.w r8, [r8, r4] 80220e4: f810 9003 ldrb.w r9, [r0, r3] 80220e8: 45c1 cmp r9, r8 80220ea: d91a bls.n 8022122 80220ec: 2401 movs r4, #1 80220ee: 461d mov r5, r3 80220f0: ebcc 0a03 rsb sl, ip, r3 80220f4: 1963 adds r3, r4, r5 80220f6: 4299 cmp r1, r3 80220f8: eb00 080c add.w r8, r0, ip 80220fc: d8f0 bhi.n 80220e0 80220fe: f10c 0001 add.w r0, ip, #1 8022102: 3601 adds r6, #1 8022104: 42b0 cmp r0, r6 8022106: bf3c itt cc 8022108: 46ba movcc sl, r7 802210a: 4630 movcc r0, r6 802210c: f8c2 a000 str.w sl, [r2] 8022110: e8bd 07f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl} 8022114: 4770 bx lr 8022116: d00b beq.n 8022130 8022118: 2701 movs r7, #1 802211a: 462e mov r6, r5 802211c: 463c mov r4, r7 802211e: 19ed adds r5, r5, r7 8022120: e7bf b.n 80220a2 8022122: d009 beq.n 8022138 8022124: f04f 0a01 mov.w sl, #1 8022128: 46ac mov ip, r5 802212a: 4654 mov r4, sl 802212c: 4455 add r5, sl 802212e: e7d2 b.n 80220d6 8022130: 42bc cmp r4, r7 8022132: d005 beq.n 8022140 8022134: 3401 adds r4, #1 8022136: e7b4 b.n 80220a2 8022138: 4554 cmp r4, sl 802213a: d005 beq.n 8022148 802213c: 3401 adds r4, #1 802213e: e7ca b.n 80220d6 8022140: 4627 mov r7, r4 8022142: 461d mov r5, r3 8022144: 2401 movs r4, #1 8022146: e7ac b.n 80220a2 8022148: 46a2 mov sl, r4 802214a: 461d mov r5, r3 802214c: 2401 movs r4, #1 802214e: e7c2 b.n 80220d6 08022150 : 8022150: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022154: f2ad 4d24 subw sp, sp, #1060 ; 0x424 8022158: 4616 mov r6, r2 802215a: 4680 mov r8, r0 802215c: 460c mov r4, r1 802215e: 4610 mov r0, r2 8022160: 4619 mov r1, r3 8022162: aa07 add r2, sp, #28 8022164: 461d mov r5, r3 8022166: f7ff ff95 bl 8022094 802216a: ab07 add r3, sp, #28 802216c: f20d 421c addw r2, sp, #1052 ; 0x41c 8022170: 9003 str r0, [sp, #12] 8022172: f843 5f04 str.w r5, [r3, #4]! 8022176: 4293 cmp r3, r2 8022178: d1fb bne.n 8022172 802217a: 1e6f subs r7, r5, #1 802217c: 2300 movs r3, #0 802217e: a808 add r0, sp, #32 8022180: b135 cbz r5, 8022190 8022182: 5cf2 ldrb r2, [r6, r3] 8022184: 1af9 subs r1, r7, r3 8022186: 3301 adds r3, #1 8022188: 42ab cmp r3, r5 802218a: f840 1022 str.w r1, [r0, r2, lsl #2] 802218e: d1f8 bne.n 8022182 8022190: 9907 ldr r1, [sp, #28] 8022192: 4630 mov r0, r6 8022194: 9a03 ldr r2, [sp, #12] 8022196: 1871 adds r1, r6, r1 8022198: f7ff fba6 bl 80218e8 802219c: 2800 cmp r0, #0 802219e: d17f bne.n 80222a0 80221a0: f8dd c00c ldr.w ip, [sp, #12] 80221a4: 4622 mov r2, r4 80221a6: 4682 mov sl, r0 80221a8: 1e6f subs r7, r5, #1 80221aa: f10c 3cff add.w ip, ip, #4294967295 80221ae: f8cd c008 str.w ip, [sp, #8] 80221b2: 44b4 add ip, r6 80221b4: f8cd c014 str.w ip, [sp, #20] 80221b8: f8dd c00c ldr.w ip, [sp, #12] 80221bc: 4604 mov r4, r0 80221be: 9501 str r5, [sp, #4] 80221c0: f1cc 0c01 rsb ip, ip, #1 80221c4: f8cd c010 str.w ip, [sp, #16] 80221c8: e009 b.n 80221de 80221ca: b134 cbz r4, 80221da 80221cc: 9a07 ldr r2, [sp, #28] 80221ce: 4293 cmp r3, r2 80221d0: bf3e ittt cc 80221d2: 4604 movcc r4, r0 80221d4: 9901 ldrcc r1, [sp, #4] 80221d6: ebc2 0301 rsbcc r3, r2, r1 80221da: 449a add sl, r3 80221dc: 462a mov r2, r5 80221de: 9b01 ldr r3, [sp, #4] 80221e0: eb08 0002 add.w r0, r8, r2 80221e4: 2100 movs r1, #0 80221e6: eb0a 0503 add.w r5, sl, r3 80221ea: 1aaa subs r2, r5, r2 80221ec: f002 fa90 bl 8024710 80221f0: 2800 cmp r0, #0 80221f2: d14f bne.n 8022294 80221f4: 2d00 cmp r5, #0 80221f6: d04d beq.n 8022294 80221f8: eb08 0305 add.w r3, r8, r5 80221fc: a908 add r1, sp, #32 80221fe: f813 3c01 ldrb.w r3, [r3, #-1] 8022202: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8022206: 2b00 cmp r3, #0 8022208: d1df bne.n 80221ca 802220a: 9a03 ldr r2, [sp, #12] 802220c: 4294 cmp r4, r2 802220e: bf28 it cs 8022210: 4622 movcs r2, r4 8022212: 42ba cmp r2, r7 8022214: d211 bcs.n 802223a 8022216: eb08 030a add.w r3, r8, sl 802221a: f816 c002 ldrb.w ip, [r6, r2] 802221e: 18b1 adds r1, r6, r2 8022220: 5c98 ldrb r0, [r3, r2] 8022222: 4584 cmp ip, r0 8022224: d006 beq.n 8022234 8022226: e02f b.n 8022288 8022228: f811 0f01 ldrb.w r0, [r1, #1]! 802222c: f813 c002 ldrb.w ip, [r3, r2] 8022230: 4584 cmp ip, r0 8022232: d129 bne.n 8022288 8022234: 3201 adds r2, #1 8022236: 42ba cmp r2, r7 8022238: d3f6 bcc.n 8022228 802223a: 9b03 ldr r3, [sp, #12] 802223c: 9802 ldr r0, [sp, #8] 802223e: 429c cmp r4, r3 8022240: bf28 it cs 8022242: 4618 movcs r0, r3 8022244: d218 bcs.n 8022278 8022246: f8dd c008 ldr.w ip, [sp, #8] 802224a: eb08 030a add.w r3, r8, sl 802224e: f816 100c ldrb.w r1, [r6, ip] 8022252: f813 200c ldrb.w r2, [r3, ip] 8022256: 4291 cmp r1, r2 8022258: f040 8085 bne.w 8022366 802225c: 9a05 ldr r2, [sp, #20] 802225e: eb06 0b04 add.w fp, r6, r4 8022262: e006 b.n 8022272 8022264: f813 c001 ldrb.w ip, [r3, r1] 8022268: f812 9d01 ldrb.w r9, [r2, #-1]! 802226c: 45e1 cmp r9, ip 802226e: d103 bne.n 8022278 8022270: 4608 mov r0, r1 8022272: 1e41 subs r1, r0, #1 8022274: 455a cmp r2, fp 8022276: d1f5 bne.n 8022264 8022278: 3401 adds r4, #1 802227a: 4284 cmp r4, r0 802227c: d875 bhi.n 802236a 802227e: 9c07 ldr r4, [sp, #28] 8022280: 9b01 ldr r3, [sp, #4] 8022282: 44a2 add sl, r4 8022284: 1b1c subs r4, r3, r4 8022286: e7a9 b.n 80221dc 8022288: f8dd c010 ldr.w ip, [sp, #16] 802228c: 2400 movs r4, #0 802228e: 44e2 add sl, ip 8022290: 4492 add sl, r2 8022292: e7a3 b.n 80221dc 8022294: 2000 movs r0, #0 8022296: b009 add sp, #36 ; 0x24 8022298: f50d 6d80 add.w sp, sp, #1024 ; 0x400 802229c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80222a0: f8dd c00c ldr.w ip, [sp, #12] 80222a4: f04f 0a00 mov.w sl, #0 80222a8: f8dd b00c ldr.w fp, [sp, #12] 80222ac: f10d 0920 add.w r9, sp, #32 80222b0: ebcc 0305 rsb r3, ip, r5 80222b4: 1e6f subs r7, r5, #1 80222b6: 4563 cmp r3, ip 80222b8: bf38 it cc 80222ba: 4663 movcc r3, ip 80222bc: 4622 mov r2, r4 80222be: 3301 adds r3, #1 80222c0: 9307 str r3, [sp, #28] 80222c2: f10c 33ff add.w r3, ip, #4294967295 80222c6: 9301 str r3, [sp, #4] 80222c8: 9b03 ldr r3, [sp, #12] 80222ca: 44b4 add ip, r6 80222cc: f8cd c008 str.w ip, [sp, #8] 80222d0: f1c3 0301 rsb r3, r3, #1 80222d4: 9304 str r3, [sp, #16] 80222d6: eb0a 0405 add.w r4, sl, r5 80222da: eb08 0002 add.w r0, r8, r2 80222de: 2100 movs r1, #0 80222e0: 1aa2 subs r2, r4, r2 80222e2: f002 fa15 bl 8024710 80222e6: 2800 cmp r0, #0 80222e8: d1d4 bne.n 8022294 80222ea: 2c00 cmp r4, #0 80222ec: d0d2 beq.n 8022294 80222ee: eb08 0304 add.w r3, r8, r4 80222f2: f813 3c01 ldrb.w r3, [r3, #-1] 80222f6: f859 3023 ldr.w r3, [r9, r3, lsl #2] 80222fa: bb63 cbnz r3, 8022356 80222fc: 45bb cmp fp, r7 80222fe: eb08 000a add.w r0, r8, sl 8022302: d215 bcs.n 8022330 8022304: f8dd c008 ldr.w ip, [sp, #8] 8022308: f810 300b ldrb.w r3, [r0, fp] 802230c: f89c 2000 ldrb.w r2, [ip] 8022310: 429a cmp r2, r3 8022312: bf18 it ne 8022314: 465b movne r3, fp 8022316: d121 bne.n 802235c 8022318: 9a02 ldr r2, [sp, #8] 802231a: 465b mov r3, fp 802231c: e005 b.n 802232a 802231e: f812 1f01 ldrb.w r1, [r2, #1]! 8022322: f810 c003 ldrb.w ip, [r0, r3] 8022326: 458c cmp ip, r1 8022328: d118 bne.n 802235c 802232a: 3301 adds r3, #1 802232c: 42bb cmp r3, r7 802232e: d3f6 bcc.n 802231e 8022330: 9b01 ldr r3, [sp, #4] 8022332: 1c5a adds r2, r3, #1 8022334: d0af beq.n 8022296 8022336: f8dd c004 ldr.w ip, [sp, #4] 802233a: f816 100c ldrb.w r1, [r6, ip] 802233e: f810 200c ldrb.w r2, [r0, ip] 8022342: 4291 cmp r1, r2 8022344: d106 bne.n 8022354 8022346: f113 33ff adds.w r3, r3, #4294967295 802234a: d3a4 bcc.n 8022296 802234c: 5cf1 ldrb r1, [r6, r3] 802234e: 5cc2 ldrb r2, [r0, r3] 8022350: 4291 cmp r1, r2 8022352: d0f8 beq.n 8022346 8022354: 9b07 ldr r3, [sp, #28] 8022356: 449a add sl, r3 8022358: 4622 mov r2, r4 802235a: e7bc b.n 80222d6 802235c: f8dd c010 ldr.w ip, [sp, #16] 8022360: 44e2 add sl, ip 8022362: 449a add sl, r3 8022364: e7f8 b.n 8022358 8022366: 9803 ldr r0, [sp, #12] 8022368: e786 b.n 8022278 802236a: eb08 000a add.w r0, r8, sl 802236e: e792 b.n 8022296 08022370 : 8022370: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022374: 4680 mov r8, r0 8022376: 7803 ldrb r3, [r0, #0] 8022378: b087 sub sp, #28 802237a: 460e mov r6, r1 802237c: 2b00 cmp r3, #0 802237e: f000 80f7 beq.w 8022570 8022382: 780a ldrb r2, [r1, #0] 8022384: b19a cbz r2, 80223ae 8022386: 4684 mov ip, r0 8022388: 3101 adds r1, #1 802238a: 2701 movs r7, #1 802238c: e002 b.n 8022394 802238e: f811 2b01 ldrb.w r2, [r1], #1 8022392: b15a cbz r2, 80223ac 8022394: 4293 cmp r3, r2 8022396: bf14 ite ne 8022398: 2700 movne r7, #0 802239a: f007 0701 andeq.w r7, r7, #1 802239e: f81c 3f01 ldrb.w r3, [ip, #1]! 80223a2: 460d mov r5, r1 80223a4: 2b00 cmp r3, #0 80223a6: d1f2 bne.n 802238e 80223a8: 782b ldrb r3, [r5, #0] 80223aa: bb03 cbnz r3, 80223ee 80223ac: b11f cbz r7, 80223b6 80223ae: 4640 mov r0, r8 80223b0: b007 add sp, #28 80223b2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80223b6: f108 0001 add.w r0, r8, #1 80223ba: 7831 ldrb r1, [r6, #0] 80223bc: f002 fe92 bl 80250e4 80223c0: 1bad subs r5, r5, r6 80223c2: 2d01 cmp r5, #1 80223c4: bf18 it ne 80223c6: 2800 cmpne r0, #0 80223c8: 4607 mov r7, r0 80223ca: bf08 it eq 80223cc: 4680 moveq r8, r0 80223ce: d0ee beq.n 80223ae 80223d0: 44a8 add r8, r5 80223d2: 4540 cmp r0, r8 80223d4: bf94 ite ls 80223d6: ebc0 0408 rsbls r4, r0, r8 80223da: 2401 movhi r4, #1 80223dc: 2d1f cmp r5, #31 80223de: d909 bls.n 80223f4 80223e0: 4621 mov r1, r4 80223e2: 4632 mov r2, r6 80223e4: 462b mov r3, r5 80223e6: f7ff feb3 bl 8022150 80223ea: 4680 mov r8, r0 80223ec: e7df b.n 80223ae 80223ee: f04f 0800 mov.w r8, #0 80223f2: e7dc b.n 80223ae 80223f4: 4629 mov r1, r5 80223f6: aa05 add r2, sp, #20 80223f8: 4630 mov r0, r6 80223fa: f7ff fe4b bl 8022094 80223fe: 9905 ldr r1, [sp, #20] 8022400: 1871 adds r1, r6, r1 8022402: 9001 str r0, [sp, #4] 8022404: 4630 mov r0, r6 8022406: 9a01 ldr r2, [sp, #4] 8022408: f7ff fa6e bl 80218e8 802240c: 2800 cmp r0, #0 802240e: d152 bne.n 80224b6 8022410: 9b01 ldr r3, [sp, #4] 8022412: 4683 mov fp, r0 8022414: 4680 mov r8, r0 8022416: 3b01 subs r3, #1 8022418: 9300 str r3, [sp, #0] 802241a: 18f3 adds r3, r6, r3 802241c: 9303 str r3, [sp, #12] 802241e: 9b01 ldr r3, [sp, #4] 8022420: f1c3 0301 rsb r3, r3, #1 8022424: 9302 str r3, [sp, #8] 8022426: 4622 mov r2, r4 8022428: eb08 0405 add.w r4, r8, r5 802242c: 18b8 adds r0, r7, r2 802242e: 2100 movs r1, #0 8022430: 1aa2 subs r2, r4, r2 8022432: f002 f96d bl 8024710 8022436: 2800 cmp r0, #0 8022438: d1d9 bne.n 80223ee 802243a: 2c00 cmp r4, #0 802243c: d0d7 beq.n 80223ee 802243e: 9b01 ldr r3, [sp, #4] 8022440: 459b cmp fp, r3 8022442: bf28 it cs 8022444: 465b movcs r3, fp 8022446: 429d cmp r5, r3 8022448: d913 bls.n 8022472 802244a: 18f9 adds r1, r7, r3 802244c: 5cf0 ldrb r0, [r6, r3] 802244e: 18f2 adds r2, r6, r3 8022450: f811 1008 ldrb.w r1, [r1, r8] 8022454: 4288 cmp r0, r1 8022456: f040 8085 bne.w 8022564 802245a: eb07 0c08 add.w ip, r7, r8 802245e: e005 b.n 802246c 8022460: f812 1f01 ldrb.w r1, [r2, #1]! 8022464: f81c 0003 ldrb.w r0, [ip, r3] 8022468: 4288 cmp r0, r1 802246a: d17b bne.n 8022564 802246c: 3301 adds r3, #1 802246e: 429d cmp r5, r3 8022470: d8f6 bhi.n 8022460 8022472: e89d 000a ldmia.w sp, {r1, r3} 8022476: 455b cmp r3, fp 8022478: d97d bls.n 8022576 802247a: eb07 0908 add.w r9, r7, r8 802247e: 5c72 ldrb r2, [r6, r1] 8022480: f819 3001 ldrb.w r3, [r9, r1] 8022484: 429a cmp r2, r3 8022486: d176 bne.n 8022576 8022488: 9b03 ldr r3, [sp, #12] 802248a: eb06 0a0b add.w sl, r6, fp 802248e: e006 b.n 802249e 8022490: f819 0002 ldrb.w r0, [r9, r2] 8022494: f813 cd01 ldrb.w ip, [r3, #-1]! 8022498: 4584 cmp ip, r0 802249a: d103 bne.n 80224a4 802249c: 4611 mov r1, r2 802249e: 1e4a subs r2, r1, #1 80224a0: 4553 cmp r3, sl 80224a2: d1f5 bne.n 8022490 80224a4: f10b 0b01 add.w fp, fp, #1 80224a8: 458b cmp fp, r1 80224aa: d866 bhi.n 802257a 80224ac: 9b05 ldr r3, [sp, #20] 80224ae: 4498 add r8, r3 80224b0: ebc3 0b05 rsb fp, r3, r5 80224b4: e7b7 b.n 8022426 80224b6: 9801 ldr r0, [sp, #4] 80224b8: f04f 0b00 mov.w fp, #0 80224bc: 4622 mov r2, r4 80224be: 1a2b subs r3, r5, r0 80224c0: eb06 0900 add.w r9, r6, r0 80224c4: f100 38ff add.w r8, r0, #4294967295 80224c8: 4682 mov sl, r0 80224ca: 4283 cmp r3, r0 80224cc: bf38 it cc 80224ce: 4603 movcc r3, r0 80224d0: 1839 adds r1, r7, r0 80224d2: 3301 adds r3, #1 80224d4: 9100 str r1, [sp, #0] 80224d6: 9305 str r3, [sp, #20] 80224d8: f1c0 0301 rsb r3, r0, #1 80224dc: 9302 str r3, [sp, #8] 80224de: eb0b 0405 add.w r4, fp, r5 80224e2: 18b8 adds r0, r7, r2 80224e4: 2100 movs r1, #0 80224e6: 1aa2 subs r2, r4, r2 80224e8: f002 f912 bl 8024710 80224ec: 2800 cmp r0, #0 80224ee: f47f af7e bne.w 80223ee 80224f2: 2c00 cmp r4, #0 80224f4: f43f af7b beq.w 80223ee 80224f8: 4555 cmp r5, sl 80224fa: bf98 it ls 80224fc: eb07 000b addls.w r0, r7, fp 8022500: d914 bls.n 802252c 8022502: 9800 ldr r0, [sp, #0] 8022504: f899 2000 ldrb.w r2, [r9] 8022508: f810 300b ldrb.w r3, [r0, fp] 802250c: 429a cmp r2, r3 802250e: d124 bne.n 802255a 8022510: 464a mov r2, r9 8022512: 4653 mov r3, sl 8022514: eb07 000b add.w r0, r7, fp 8022518: e005 b.n 8022526 802251a: f812 1f01 ldrb.w r1, [r2, #1]! 802251e: f810 c003 ldrb.w ip, [r0, r3] 8022522: 458c cmp ip, r1 8022524: d11a bne.n 802255c 8022526: 3301 adds r3, #1 8022528: 429d cmp r5, r3 802252a: d8f6 bhi.n 802251a 802252c: f1b8 3fff cmp.w r8, #4294967295 8022530: 4643 mov r3, r8 8022532: f43f af5a beq.w 80223ea 8022536: f816 1008 ldrb.w r1, [r6, r8] 802253a: f810 2008 ldrb.w r2, [r0, r8] 802253e: 4291 cmp r1, r2 8022540: d107 bne.n 8022552 8022542: f113 33ff adds.w r3, r3, #4294967295 8022546: f4ff af50 bcc.w 80223ea 802254a: 5cf1 ldrb r1, [r6, r3] 802254c: 5cc2 ldrb r2, [r0, r3] 802254e: 4291 cmp r1, r2 8022550: d0f7 beq.n 8022542 8022552: 9b05 ldr r3, [sp, #20] 8022554: 449b add fp, r3 8022556: 4622 mov r2, r4 8022558: e7c1 b.n 80224de 802255a: 4653 mov r3, sl 802255c: 9a02 ldr r2, [sp, #8] 802255e: 4493 add fp, r2 8022560: 449b add fp, r3 8022562: e7f8 b.n 8022556 8022564: 9902 ldr r1, [sp, #8] 8022566: f04f 0b00 mov.w fp, #0 802256a: 4488 add r8, r1 802256c: 4498 add r8, r3 802256e: e75a b.n 8022426 8022570: 460d mov r5, r1 8022572: 2701 movs r7, #1 8022574: e718 b.n 80223a8 8022576: 9901 ldr r1, [sp, #4] 8022578: e794 b.n 80224a4 802257a: 44b8 add r8, r7 802257c: e717 b.n 80223ae 802257e: bf00 nop 08022580 <_strtod_r>: 8022580: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8022584: b09d sub sp, #116 ; 0x74 8022586: 468c mov ip, r1 8022588: 4683 mov fp, r0 802258a: 9210 str r2, [sp, #64] ; 0x40 802258c: 4662 mov r2, ip 802258e: 2000 movs r0, #0 8022590: 2100 movs r1, #0 8022592: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022596: e9cd 0106 strd r0, r1, [sp, #24] 802259a: 4611 mov r1, r2 802259c: f812 3b01 ldrb.w r3, [r2], #1 80225a0: 2b2d cmp r3, #45 ; 0x2d 80225a2: f200 8147 bhi.w 8022834 <_strtod_r+0x2b4> 80225a6: e8df f013 tbh [pc, r3, lsl #1] 80225aa: 0131 .short 0x0131 80225ac: 01450145 .word 0x01450145 80225b0: 01450145 .word 0x01450145 80225b4: 01450145 .word 0x01450145 80225b8: 01450145 .word 0x01450145 80225bc: 01640164 .word 0x01640164 80225c0: 01640164 .word 0x01640164 80225c4: 01450164 .word 0x01450164 80225c8: 01450145 .word 0x01450145 80225cc: 01450145 .word 0x01450145 80225d0: 01450145 .word 0x01450145 80225d4: 01450145 .word 0x01450145 80225d8: 01450145 .word 0x01450145 80225dc: 01450145 .word 0x01450145 80225e0: 01450145 .word 0x01450145 80225e4: 01450145 .word 0x01450145 80225e8: 01640145 .word 0x01640145 80225ec: 01450145 .word 0x01450145 80225f0: 01450145 .word 0x01450145 80225f4: 01450145 .word 0x01450145 80225f8: 01450145 .word 0x01450145 80225fc: 01450145 .word 0x01450145 8022600: 0145012e .word 0x0145012e 8022604: 002e .short 0x002e 8022606: 2501 movs r5, #1 8022608: 9512 str r5, [sp, #72] ; 0x48 802260a: 1c4e adds r6, r1, #1 802260c: 9617 str r6, [sp, #92] ; 0x5c 802260e: 784b ldrb r3, [r1, #1] 8022610: 4699 mov r9, r3 8022612: 469a mov sl, r3 8022614: 2b00 cmp r3, #0 8022616: f000 80fc beq.w 8022812 <_strtod_r+0x292> 802261a: 2b30 cmp r3, #48 ; 0x30 802261c: bf18 it ne 802261e: f04f 0900 movne.w r9, #0 8022622: f000 8110 beq.w 8022846 <_strtod_r+0x2c6> 8022626: 2b2f cmp r3, #47 ; 0x2f 8022628: 461d mov r5, r3 802262a: f04f 0a00 mov.w sl, #0 802262e: f340 84f9 ble.w 8023024 <_strtod_r+0xaa4> 8022632: 2b39 cmp r3, #57 ; 0x39 8022634: f300 84f6 bgt.w 8023024 <_strtod_r+0xaa4> 8022638: 1c72 adds r2, r6, #1 802263a: 4657 mov r7, sl 802263c: 4654 mov r4, sl 802263e: e001 b.n 8022644 <_strtod_r+0xc4> 8022640: 2b39 cmp r3, #57 ; 0x39 8022642: dc18 bgt.n 8022676 <_strtod_r+0xf6> 8022644: eb07 0187 add.w r1, r7, r7, lsl #2 8022648: 2c08 cmp r4, #8 802264a: eb03 0141 add.w r1, r3, r1, lsl #1 802264e: bfd8 it le 8022650: f1a1 0730 suble.w r7, r1, #48 ; 0x30 8022654: dd07 ble.n 8022666 <_strtod_r+0xe6> 8022656: eb0a 018a add.w r1, sl, sl, lsl #2 802265a: 2c0f cmp r4, #15 802265c: eb03 0341 add.w r3, r3, r1, lsl #1 8022660: bfd8 it le 8022662: f1a3 0a30 suble.w sl, r3, #48 ; 0x30 8022666: 9217 str r2, [sp, #92] ; 0x5c 8022668: 4690 mov r8, r2 802266a: f812 3b01 ldrb.w r3, [r2], #1 802266e: 3401 adds r4, #1 8022670: 2b2f cmp r3, #47 ; 0x2f 8022672: 461d mov r5, r3 8022674: dce4 bgt.n 8022640 <_strtod_r+0xc0> 8022676: 4658 mov r0, fp 8022678: f8cd c010 str.w ip, [sp, #16] 802267c: f001 fd5a bl 8024134 <_localeconv_r> 8022680: 6801 ldr r1, [r0, #0] 8022682: 4658 mov r0, fp 8022684: 9105 str r1, [sp, #20] 8022686: f001 fd55 bl 8024134 <_localeconv_r> 802268a: 6800 ldr r0, [r0, #0] 802268c: f7ff fbf0 bl 8021e70 8022690: 9905 ldr r1, [sp, #20] 8022692: 4602 mov r2, r0 8022694: 4640 mov r0, r8 8022696: f7ff fc4d bl 8021f34 802269a: f8dd c010 ldr.w ip, [sp, #16] 802269e: 4680 mov r8, r0 80226a0: 2800 cmp r0, #0 80226a2: f000 8142 beq.w 802292a <_strtod_r+0x3aa> 80226a6: 2000 movs r0, #0 80226a8: 46a0 mov r8, r4 80226aa: 4601 mov r1, r0 80226ac: 9009 str r0, [sp, #36] ; 0x24 80226ae: f025 0320 bic.w r3, r5, #32 80226b2: 2b45 cmp r3, #69 ; 0x45 80226b4: f040 80df bne.w 8022876 <_strtod_r+0x2f6> 80226b8: ea48 0300 orr.w r3, r8, r0 80226bc: ea53 0309 orrs.w r3, r3, r9 80226c0: f000 811d beq.w 80228fe <_strtod_r+0x37e> 80226c4: f8dd c05c ldr.w ip, [sp, #92] ; 0x5c 80226c8: f10c 0301 add.w r3, ip, #1 80226cc: 9317 str r3, [sp, #92] ; 0x5c 80226ce: f89c 5001 ldrb.w r5, [ip, #1] 80226d2: 2d2b cmp r5, #43 ; 0x2b 80226d4: f000 84ab beq.w 802302e <_strtod_r+0xaae> 80226d8: 2d2d cmp r5, #45 ; 0x2d 80226da: f000 833d beq.w 8022d58 <_strtod_r+0x7d8> 80226de: 2200 movs r2, #0 80226e0: 920a str r2, [sp, #40] ; 0x28 80226e2: f1a5 0330 sub.w r3, r5, #48 ; 0x30 80226e6: 2b09 cmp r3, #9 80226e8: f200 842c bhi.w 8022f44 <_strtod_r+0x9c4> 80226ec: 2d30 cmp r5, #48 ; 0x30 80226ee: d106 bne.n 80226fe <_strtod_r+0x17e> 80226f0: 9b17 ldr r3, [sp, #92] ; 0x5c 80226f2: 3301 adds r3, #1 80226f4: 9317 str r3, [sp, #92] ; 0x5c 80226f6: f813 5b01 ldrb.w r5, [r3], #1 80226fa: 2d30 cmp r5, #48 ; 0x30 80226fc: d0fa beq.n 80226f4 <_strtod_r+0x174> 80226fe: f1a5 0331 sub.w r3, r5, #49 ; 0x31 8022702: 2b08 cmp r3, #8 8022704: f200 80b7 bhi.w 8022876 <_strtod_r+0x2f6> 8022708: 9a17 ldr r2, [sp, #92] ; 0x5c 802270a: 3d30 subs r5, #48 ; 0x30 802270c: 950d str r5, [sp, #52] ; 0x34 802270e: 1c53 adds r3, r2, #1 8022710: 9317 str r3, [sp, #92] ; 0x5c 8022712: 7855 ldrb r5, [r2, #1] 8022714: 920b str r2, [sp, #44] ; 0x2c 8022716: 2d2f cmp r5, #47 ; 0x2f 8022718: dd16 ble.n 8022748 <_strtod_r+0x1c8> 802271a: 2d39 cmp r5, #57 ; 0x39 802271c: dc14 bgt.n 8022748 <_strtod_r+0x1c8> 802271e: 1c93 adds r3, r2, #2 8022720: 910c str r1, [sp, #48] ; 0x30 8022722: 9a0d ldr r2, [sp, #52] ; 0x34 8022724: e001 b.n 802272a <_strtod_r+0x1aa> 8022726: 2d39 cmp r5, #57 ; 0x39 8022728: dc0b bgt.n 8022742 <_strtod_r+0x1c2> 802272a: 9317 str r3, [sp, #92] ; 0x5c 802272c: 4619 mov r1, r3 802272e: eb02 0282 add.w r2, r2, r2, lsl #2 8022732: 3301 adds r3, #1 8022734: eb05 0242 add.w r2, r5, r2, lsl #1 8022738: f813 5c01 ldrb.w r5, [r3, #-1] 802273c: 3a30 subs r2, #48 ; 0x30 802273e: 2d2f cmp r5, #47 ; 0x2f 8022740: dcf1 bgt.n 8022726 <_strtod_r+0x1a6> 8022742: 460b mov r3, r1 8022744: 990c ldr r1, [sp, #48] ; 0x30 8022746: 920d str r2, [sp, #52] ; 0x34 8022748: 9a0b ldr r2, [sp, #44] ; 0x2c 802274a: 1a9b subs r3, r3, r2 802274c: 2b08 cmp r3, #8 802274e: bfc8 it gt 8022750: f644 621f movwgt r2, #19999 ; 0x4e1f 8022754: dc05 bgt.n 8022762 <_strtod_r+0x1e2> 8022756: 9a0d ldr r2, [sp, #52] ; 0x34 8022758: f644 631f movw r3, #19999 ; 0x4e1f 802275c: 429a cmp r2, r3 802275e: bfa8 it ge 8022760: 461a movge r2, r3 8022762: 9b0a ldr r3, [sp, #40] ; 0x28 8022764: b103 cbz r3, 8022768 <_strtod_r+0x1e8> 8022766: 4252 negs r2, r2 8022768: f1b8 0f00 cmp.w r8, #0 802276c: f000 8088 beq.w 8022880 <_strtod_r+0x300> 8022770: 9d09 ldr r5, [sp, #36] ; 0x24 8022772: 4638 mov r0, r7 8022774: 2c00 cmp r4, #0 8022776: bf08 it eq 8022778: 4644 moveq r4, r8 802277a: 940a str r4, [sp, #40] ; 0x28 802277c: 1b52 subs r2, r2, r5 802277e: 9209 str r2, [sp, #36] ; 0x24 8022780: f7fd fea8 bl 80204d4 <__aeabi_ui2d> 8022784: f1b8 0f10 cmp.w r8, #16 8022788: bfb4 ite lt 802278a: 46c1 movlt r9, r8 802278c: f04f 0910 movge.w r9, #16 8022790: f1b9 0f09 cmp.w r9, #9 8022794: 4602 mov r2, r0 8022796: 460b mov r3, r1 8022798: e9cd 2306 strd r2, r3, [sp, #24] 802279c: dd16 ble.n 80227cc <_strtod_r+0x24c> 802279e: f646 23d0 movw r3, #27344 ; 0x6ad0 80227a2: f6c0 0303 movt r3, #2051 ; 0x803 80227a6: eb03 03c9 add.w r3, r3, r9, lsl #3 80227aa: e953 2312 ldrd r2, r3, [r3, #-72] ; 0x48 80227ae: f7fd ff07 bl 80205c0 <__aeabi_dmul> 80227b2: 4604 mov r4, r0 80227b4: 4650 mov r0, sl 80227b6: 460d mov r5, r1 80227b8: f7fd fe8c bl 80204d4 <__aeabi_ui2d> 80227bc: 4602 mov r2, r0 80227be: 460b mov r3, r1 80227c0: 4620 mov r0, r4 80227c2: 4629 mov r1, r5 80227c4: f7fd fd4a bl 802025c <__adddf3> 80227c8: e9cd 0106 strd r0, r1, [sp, #24] 80227cc: f1b8 0f0f cmp.w r8, #15 80227d0: f300 80f2 bgt.w 80229b8 <_strtod_r+0x438> 80227d4: 9c09 ldr r4, [sp, #36] ; 0x24 80227d6: 2c00 cmp r4, #0 80227d8: f000 80a2 beq.w 8022920 <_strtod_r+0x3a0> 80227dc: f340 8591 ble.w 8023302 <_strtod_r+0xd82> 80227e0: 9d09 ldr r5, [sp, #36] ; 0x24 80227e2: 2d16 cmp r5, #22 80227e4: f300 8545 bgt.w 8023272 <_strtod_r+0xcf2> 80227e8: f646 21d0 movw r1, #27344 ; 0x6ad0 80227ec: e9dd 2306 ldrd r2, r3, [sp, #24] 80227f0: f6c0 0103 movt r1, #2051 ; 0x803 80227f4: eb01 01c5 add.w r1, r1, r5, lsl #3 80227f8: e9d1 0100 ldrd r0, r1, [r1] 80227fc: f7fd fee0 bl 80205c0 <__aeabi_dmul> 8022800: 4681 mov r9, r0 8022802: 468a mov sl, r1 8022804: e009 b.n 802281a <_strtod_r+0x29a> 8022806: 2400 movs r4, #0 8022808: 9412 str r4, [sp, #72] ; 0x48 802280a: e6fe b.n 802260a <_strtod_r+0x8a> 802280c: f04f 0900 mov.w r9, #0 8022810: 46ca mov sl, r9 8022812: 2400 movs r4, #0 8022814: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022818: 9412 str r4, [sp, #72] ; 0x48 802281a: 9c10 ldr r4, [sp, #64] ; 0x40 802281c: b10c cbz r4, 8022822 <_strtod_r+0x2a2> 802281e: 9b17 ldr r3, [sp, #92] ; 0x5c 8022820: 6023 str r3, [r4, #0] 8022822: 9d12 ldr r5, [sp, #72] ; 0x48 8022824: b10d cbz r5, 802282a <_strtod_r+0x2aa> 8022826: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 802282a: 4648 mov r0, r9 802282c: 4651 mov r1, sl 802282e: b01d add sp, #116 ; 0x74 8022830: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8022834: 2500 movs r5, #0 8022836: 2b30 cmp r3, #48 ; 0x30 8022838: 460e mov r6, r1 802283a: 9512 str r5, [sp, #72] ; 0x48 802283c: bf18 it ne 802283e: f04f 0900 movne.w r9, #0 8022842: f47f aef0 bne.w 8022626 <_strtod_r+0xa6> 8022846: 7873 ldrb r3, [r6, #1] 8022848: 2b58 cmp r3, #88 ; 0x58 802284a: f000 8383 beq.w 8022f54 <_strtod_r+0x9d4> 802284e: 1c72 adds r2, r6, #1 8022850: 2b78 cmp r3, #120 ; 0x78 8022852: f000 837f beq.w 8022f54 <_strtod_r+0x9d4> 8022856: 4616 mov r6, r2 8022858: 9217 str r2, [sp, #92] ; 0x5c 802285a: f812 3b01 ldrb.w r3, [r2], #1 802285e: 2b30 cmp r3, #48 ; 0x30 8022860: d0f9 beq.n 8022856 <_strtod_r+0x2d6> 8022862: f04f 0901 mov.w r9, #1 8022866: 2b00 cmp r3, #0 8022868: f47f aedd bne.w 8022626 <_strtod_r+0xa6> 802286c: 4699 mov r9, r3 802286e: 469a mov sl, r3 8022870: e7d3 b.n 802281a <_strtod_r+0x29a> 8022872: 9217 str r2, [sp, #92] ; 0x5c 8022874: e691 b.n 802259a <_strtod_r+0x1a> 8022876: 2200 movs r2, #0 8022878: f1b8 0f00 cmp.w r8, #0 802287c: f47f af78 bne.w 8022770 <_strtod_r+0x1f0> 8022880: ea50 0009 orrs.w r0, r0, r9 8022884: d14c bne.n 8022920 <_strtod_r+0x3a0> 8022886: 2900 cmp r1, #0 8022888: d139 bne.n 80228fe <_strtod_r+0x37e> 802288a: 3d49 subs r5, #73 ; 0x49 802288c: 2d25 cmp r5, #37 ; 0x25 802288e: d836 bhi.n 80228fe <_strtod_r+0x37e> 8022890: e8df f015 tbh [pc, r5, lsl #1] 8022894: 0035026a .word 0x0035026a 8022898: 00350035 .word 0x00350035 802289c: 00260035 .word 0x00260035 80228a0: 00350035 .word 0x00350035 80228a4: 00350035 .word 0x00350035 80228a8: 00350035 .word 0x00350035 80228ac: 00350035 .word 0x00350035 80228b0: 00350035 .word 0x00350035 80228b4: 00350035 .word 0x00350035 80228b8: 00350035 .word 0x00350035 80228bc: 00350035 .word 0x00350035 80228c0: 00350035 .word 0x00350035 80228c4: 00350035 .word 0x00350035 80228c8: 00350035 .word 0x00350035 80228cc: 00350035 .word 0x00350035 80228d0: 00350035 .word 0x00350035 80228d4: 0035026a .word 0x0035026a 80228d8: 00350035 .word 0x00350035 80228dc: 00260035 .word 0x00260035 80228e0: 4853 ldr r0, [pc, #332] ; (8022a30 <_strtod_r+0x4b0>) 80228e2: 9a17 ldr r2, [sp, #92] ; 0x5c 80228e4: f810 1f01 ldrb.w r1, [r0, #1]! 80228e8: 4613 mov r3, r2 80228ea: b169 cbz r1, 8022908 <_strtod_r+0x388> 80228ec: 785b ldrb r3, [r3, #1] 80228ee: 3201 adds r2, #1 80228f0: 2b40 cmp r3, #64 ; 0x40 80228f2: dd02 ble.n 80228fa <_strtod_r+0x37a> 80228f4: 2b5a cmp r3, #90 ; 0x5a 80228f6: bfd8 it le 80228f8: 3320 addle r3, #32 80228fa: 428b cmp r3, r1 80228fc: d0f2 beq.n 80228e4 <_strtod_r+0x364> 80228fe: f8dd 9018 ldr.w r9, [sp, #24] 8022902: f8dd a01c ldr.w sl, [sp, #28] 8022906: e784 b.n 8022812 <_strtod_r+0x292> 8022908: 1c53 adds r3, r2, #1 802290a: 9317 str r3, [sp, #92] ; 0x5c 802290c: 7853 ldrb r3, [r2, #1] 802290e: 2b28 cmp r3, #40 ; 0x28 8022910: f000 8575 beq.w 80233fe <_strtod_r+0xe7e> 8022914: 2300 movs r3, #0 8022916: 9306 str r3, [sp, #24] 8022918: 461c mov r4, r3 802291a: f6cf 74f8 movt r4, #65528 ; 0xfff8 802291e: 9407 str r4, [sp, #28] 8022920: f8dd 9018 ldr.w r9, [sp, #24] 8022924: f8dd a01c ldr.w sl, [sp, #28] 8022928: e777 b.n 802281a <_strtod_r+0x29a> 802292a: 4658 mov r0, fp 802292c: 9d17 ldr r5, [sp, #92] ; 0x5c 802292e: f001 fc01 bl 8024134 <_localeconv_r> 8022932: 6800 ldr r0, [r0, #0] 8022934: f7ff fa9c bl 8021e70 8022938: f8dd c010 ldr.w ip, [sp, #16] 802293c: 182b adds r3, r5, r0 802293e: 9317 str r3, [sp, #92] ; 0x5c 8022940: 5c2d ldrb r5, [r5, r0] 8022942: 2c00 cmp r4, #0 8022944: f040 819b bne.w 8022c7e <_strtod_r+0x6fe> 8022948: 2d30 cmp r5, #48 ; 0x30 802294a: 4620 mov r0, r4 802294c: d105 bne.n 802295a <_strtod_r+0x3da> 802294e: 3301 adds r3, #1 8022950: 9317 str r3, [sp, #92] ; 0x5c 8022952: 3001 adds r0, #1 8022954: 781d ldrb r5, [r3, #0] 8022956: 2d30 cmp r5, #48 ; 0x30 8022958: d0f9 beq.n 802294e <_strtod_r+0x3ce> 802295a: f1a5 0331 sub.w r3, r5, #49 ; 0x31 802295e: 2b08 cmp r3, #8 8022960: f200 819a bhi.w 8022c98 <_strtod_r+0x718> 8022964: 9e17 ldr r6, [sp, #92] ; 0x5c 8022966: f04f 0800 mov.w r8, #0 802296a: 9009 str r0, [sp, #36] ; 0x24 802296c: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022970: 2001 movs r0, #1 8022972: 960a str r6, [sp, #40] ; 0x28 8022974: 2900 cmp r1, #0 8022976: f000 836c beq.w 8023052 <_strtod_r+0xad2> 802297a: 9a09 ldr r2, [sp, #36] ; 0x24 802297c: 2801 cmp r0, #1 802297e: 4402 add r2, r0 8022980: 9209 str r2, [sp, #36] ; 0x24 8022982: f000 8532 beq.w 80233ea <_strtod_r+0xe6a> 8022986: eb08 0200 add.w r2, r8, r0 802298a: 4643 mov r3, r8 802298c: 3a01 subs r2, #1 802298e: f8cd 802c str.w r8, [sp, #44] ; 0x2c 8022992: 4690 mov r8, r2 8022994: e003 b.n 802299e <_strtod_r+0x41e> 8022996: 006f lsls r7, r5, #1 8022998: 4543 cmp r3, r8 802299a: f000 834b beq.w 8023034 <_strtod_r+0xab4> 802299e: 3301 adds r3, #1 80229a0: eb07 0587 add.w r5, r7, r7, lsl #2 80229a4: 1e5a subs r2, r3, #1 80229a6: 2a08 cmp r2, #8 80229a8: ddf5 ble.n 8022996 <_strtod_r+0x416> 80229aa: eb0a 028a add.w r2, sl, sl, lsl #2 80229ae: 2b10 cmp r3, #16 80229b0: bfd8 it le 80229b2: ea4f 0a42 movle.w sl, r2, lsl #1 80229b6: e7ef b.n 8022998 <_strtod_r+0x418> 80229b8: 9d09 ldr r5, [sp, #36] ; 0x24 80229ba: ebc9 0908 rsb r9, r9, r8 80229be: eb05 0409 add.w r4, r5, r9 80229c2: 2c00 cmp r4, #0 80229c4: f340 83de ble.w 8023184 <_strtod_r+0xc04> 80229c8: f014 000f ands.w r0, r4, #15 80229cc: d00d beq.n 80229ea <_strtod_r+0x46a> 80229ce: f646 21d0 movw r1, #27344 ; 0x6ad0 80229d2: e9dd 2306 ldrd r2, r3, [sp, #24] 80229d6: f6c0 0103 movt r1, #2051 ; 0x803 80229da: eb01 01c0 add.w r1, r1, r0, lsl #3 80229de: e9d1 0100 ldrd r0, r1, [r1] 80229e2: f7fd fded bl 80205c0 <__aeabi_dmul> 80229e6: e9cd 0106 strd r0, r1, [sp, #24] 80229ea: f034 040f bics.w r4, r4, #15 80229ee: f040 815f bne.w 8022cb0 <_strtod_r+0x730> 80229f2: f8dd 9018 ldr.w r9, [sp, #24] 80229f6: f8dd a01c ldr.w sl, [sp, #28] 80229fa: 940b str r4, [sp, #44] ; 0x2c 80229fc: 9700 str r7, [sp, #0] 80229fe: 4658 mov r0, fp 8022a00: 4631 mov r1, r6 8022a02: 9a0a ldr r2, [sp, #40] ; 0x28 8022a04: 4643 mov r3, r8 8022a06: f001 ff67 bl 80248d8 <__s2b> 8022a0a: 9d09 ldr r5, [sp, #36] ; 0x24 8022a0c: 2d00 cmp r5, #0 8022a0e: 9011 str r0, [sp, #68] ; 0x44 8022a10: f2c0 8472 blt.w 80232f8 <_strtod_r+0xd78> 8022a14: 2400 movs r4, #0 8022a16: 940d str r4, [sp, #52] ; 0x34 8022a18: 9d09 ldr r5, [sp, #36] ; 0x24 8022a1a: 9c11 ldr r4, [sp, #68] ; 0x44 8022a1c: ea25 75e5 bic.w r5, r5, r5, asr #31 8022a20: f8cd 9024 str.w r9, [sp, #36] ; 0x24 8022a24: 340c adds r4, #12 8022a26: 950e str r5, [sp, #56] ; 0x38 8022a28: 9413 str r4, [sp, #76] ; 0x4c 8022a2a: f8cd a028 str.w sl, [sp, #40] ; 0x28 8022a2e: e073 b.n 8022b18 <_strtod_r+0x598> 8022a30: 08041ecf .word 0x08041ecf 8022a34: 9b0f ldr r3, [sp, #60] ; 0x3c 8022a36: 2b00 cmp r3, #0 8022a38: f000 81a8 beq.w 8022d8c <_strtod_r+0x80c> 8022a3c: f04f 0900 mov.w r9, #0 8022a40: 2500 movs r5, #0 8022a42: f8dd c01c ldr.w ip, [sp, #28] 8022a46: 2400 movs r4, #0 8022a48: f6c3 75f0 movt r5, #16368 ; 0x3ff0 8022a4c: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022a50: f8cd 8030 str.w r8, [sp, #48] ; 0x30 8022a54: f04f 0800 mov.w r8, #0 8022a58: 4643 mov r3, r8 8022a5a: f6c7 78f0 movt r8, #32752 ; 0x7ff0 8022a5e: f6c7 73e0 movt r3, #32736 ; 0x7fe0 8022a62: ea0c 0808 and.w r8, ip, r8 8022a66: 4598 cmp r8, r3 8022a68: f000 81c5 beq.w 8022df6 <_strtod_r+0x876> 8022a6c: 9a0b ldr r2, [sp, #44] ; 0x2c 8022a6e: f1b8 6fd4 cmp.w r8, #111149056 ; 0x6a00000 8022a72: bf8c ite hi 8022a74: 2300 movhi r3, #0 8022a76: 2301 movls r3, #1 8022a78: 2a00 cmp r2, #0 8022a7a: bf08 it eq 8022a7c: 2300 moveq r3, #0 8022a7e: b1eb cbz r3, 8022abc <_strtod_r+0x53c> 8022a80: 980c ldr r0, [sp, #48] ; 0x30 8022a82: 4649 mov r1, r9 8022a84: a388 add r3, pc, #544 ; (adr r3, 8022ca8 <_strtod_r+0x728>) 8022a86: e9d3 2300 ldrd r2, r3, [r3] 8022a8a: f7fe f815 bl 8020ab8 <__aeabi_dcmple> 8022a8e: b188 cbz r0, 8022ab4 <_strtod_r+0x534> 8022a90: 980c ldr r0, [sp, #48] ; 0x30 8022a92: 4649 mov r1, r9 8022a94: f002 fbd6 bl 8025244 <__aeabi_d2uiz> 8022a98: 2800 cmp r0, #0 8022a9a: f000 8246 beq.w 8022f2a <_strtod_r+0x9aa> 8022a9e: f7fd fd19 bl 80204d4 <__aeabi_ui2d> 8022aa2: 4689 mov r9, r1 8022aa4: 900c str r0, [sp, #48] ; 0x30 8022aa6: 9c0f ldr r4, [sp, #60] ; 0x3c 8022aa8: f109 4300 add.w r3, r9, #2147483648 ; 0x80000000 8022aac: b104 cbz r4, 8022ab0 <_strtod_r+0x530> 8022aae: 464b mov r3, r9 8022ab0: 9c0c ldr r4, [sp, #48] ; 0x30 8022ab2: 461d mov r5, r3 8022ab4: f105 63d6 add.w r3, r5, #112197632 ; 0x6b00000 8022ab8: ebc8 0503 rsb r5, r8, r3 8022abc: 9809 ldr r0, [sp, #36] ; 0x24 8022abe: 990a ldr r1, [sp, #40] ; 0x28 8022ac0: f002 f98a bl 8024dd8 <__ulp> 8022ac4: 4602 mov r2, r0 8022ac6: 460b mov r3, r1 8022ac8: 4620 mov r0, r4 8022aca: 4629 mov r1, r5 8022acc: f7fd fd78 bl 80205c0 <__aeabi_dmul> 8022ad0: 4602 mov r2, r0 8022ad2: 460b mov r3, r1 8022ad4: 9809 ldr r0, [sp, #36] ; 0x24 8022ad6: 990a ldr r1, [sp, #40] ; 0x28 8022ad8: f7fd fbc0 bl 802025c <__adddf3> 8022adc: e9cd 0106 strd r0, r1, [sp, #24] 8022ae0: 9c07 ldr r4, [sp, #28] 8022ae2: 9009 str r0, [sp, #36] ; 0x24 8022ae4: 910a str r1, [sp, #40] ; 0x28 8022ae6: 9d0b ldr r5, [sp, #44] ; 0x2c 8022ae8: b935 cbnz r5, 8022af8 <_strtod_r+0x578> 8022aea: 2300 movs r3, #0 8022aec: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022af0: 4023 ands r3, r4 8022af2: 4598 cmp r8, r3 8022af4: f000 81bc beq.w 8022e70 <_strtod_r+0x8f0> 8022af8: 4658 mov r0, fp 8022afa: 9918 ldr r1, [sp, #96] ; 0x60 8022afc: f001 fe8c bl 8024818 <_Bfree> 8022b00: 4658 mov r0, fp 8022b02: 4651 mov r1, sl 8022b04: f001 fe88 bl 8024818 <_Bfree> 8022b08: 4658 mov r0, fp 8022b0a: 4639 mov r1, r7 8022b0c: f001 fe84 bl 8024818 <_Bfree> 8022b10: 4658 mov r0, fp 8022b12: 4631 mov r1, r6 8022b14: f001 fe80 bl 8024818 <_Bfree> 8022b18: 9c11 ldr r4, [sp, #68] ; 0x44 8022b1a: 4658 mov r0, fp 8022b1c: ad16 add r5, sp, #88 ; 0x58 8022b1e: 6861 ldr r1, [r4, #4] 8022b20: f001 fe44 bl 80247ac <_Balloc> 8022b24: 6923 ldr r3, [r4, #16] 8022b26: 9913 ldr r1, [sp, #76] ; 0x4c 8022b28: 1c9a adds r2, r3, #2 8022b2a: 0092 lsls r2, r2, #2 8022b2c: 4682 mov sl, r0 8022b2e: 300c adds r0, #12 8022b30: f7fe ff0c bl 802194c 8022b34: 9a09 ldr r2, [sp, #36] ; 0x24 8022b36: 9b0a ldr r3, [sp, #40] ; 0x28 8022b38: a819 add r0, sp, #100 ; 0x64 8022b3a: 9500 str r5, [sp, #0] 8022b3c: 9001 str r0, [sp, #4] 8022b3e: 4658 mov r0, fp 8022b40: f002 f9c4 bl 8024ecc <__d2b> 8022b44: 2101 movs r1, #1 8022b46: 9018 str r0, [sp, #96] ; 0x60 8022b48: 4658 mov r0, fp 8022b4a: f001 ff5d bl 8024a08 <__i2b> 8022b4e: 9a16 ldr r2, [sp, #88] ; 0x58 8022b50: 9b19 ldr r3, [sp, #100] ; 0x64 8022b52: f46f 717f mvn.w r1, #1020 ; 0x3fc 8022b56: 2a00 cmp r2, #0 8022b58: bfaa itet ge 8022b5a: 9d0d ldrge r5, [sp, #52] ; 0x34 8022b5c: 9c0e ldrlt r4, [sp, #56] ; 0x38 8022b5e: 18ac addge r4, r5, r2 8022b60: 9d0b ldr r5, [sp, #44] ; 0x2c 8022b62: 4607 mov r7, r0 8022b64: bfb8 it lt 8022b66: ebc2 0004 rsblt r0, r2, r4 8022b6a: ebc5 0202 rsb r2, r5, r2 8022b6e: bfb8 it lt 8022b70: 9c0d ldrlt r4, [sp, #52] ; 0x34 8022b72: eb02 0503 add.w r5, r2, r3 8022b76: bfa8 it ge 8022b78: 980e ldrge r0, [sp, #56] ; 0x38 8022b7a: 428d cmp r5, r1 8022b7c: 990d ldr r1, [sp, #52] ; 0x34 8022b7e: bfb4 ite lt 8022b80: f202 4333 addwlt r3, r2, #1075 ; 0x433 8022b84: f1c3 0336 rsbge r3, r3, #54 ; 0x36 8022b88: 18e6 adds r6, r4, r3 8022b8a: 18c3 adds r3, r0, r3 8022b8c: 980b ldr r0, [sp, #44] ; 0x2c 8022b8e: 181d adds r5, r3, r0 8022b90: 42a6 cmp r6, r4 8022b92: bfb4 ite lt 8022b94: 4633 movlt r3, r6 8022b96: 4623 movge r3, r4 8022b98: 42ab cmp r3, r5 8022b9a: bfa8 it ge 8022b9c: 462b movge r3, r5 8022b9e: 2b00 cmp r3, #0 8022ba0: bfc2 ittt gt 8022ba2: ebc3 0606 rsbgt r6, r3, r6 8022ba6: ebc3 0505 rsbgt r5, r3, r5 8022baa: ebc3 0404 rsbgt r4, r3, r4 8022bae: b189 cbz r1, 8022bd4 <_strtod_r+0x654> 8022bb0: 460a mov r2, r1 8022bb2: 4658 mov r0, fp 8022bb4: 4639 mov r1, r7 8022bb6: f001 ffcf bl 8024b58 <__pow5mult> 8022bba: 9a18 ldr r2, [sp, #96] ; 0x60 8022bbc: 4607 mov r7, r0 8022bbe: 4658 mov r0, fp 8022bc0: 4639 mov r1, r7 8022bc2: f001 ff2b bl 8024a1c <__multiply> 8022bc6: 9918 ldr r1, [sp, #96] ; 0x60 8022bc8: 4680 mov r8, r0 8022bca: 4658 mov r0, fp 8022bcc: f001 fe24 bl 8024818 <_Bfree> 8022bd0: f8cd 8060 str.w r8, [sp, #96] ; 0x60 8022bd4: 2e00 cmp r6, #0 8022bd6: dd05 ble.n 8022be4 <_strtod_r+0x664> 8022bd8: 4658 mov r0, fp 8022bda: 9918 ldr r1, [sp, #96] ; 0x60 8022bdc: 4632 mov r2, r6 8022bde: f002 f80d bl 8024bfc <__lshift> 8022be2: 9018 str r0, [sp, #96] ; 0x60 8022be4: 9a0e ldr r2, [sp, #56] ; 0x38 8022be6: b122 cbz r2, 8022bf2 <_strtod_r+0x672> 8022be8: 4651 mov r1, sl 8022bea: 4658 mov r0, fp 8022bec: f001 ffb4 bl 8024b58 <__pow5mult> 8022bf0: 4682 mov sl, r0 8022bf2: 2d00 cmp r5, #0 8022bf4: dd05 ble.n 8022c02 <_strtod_r+0x682> 8022bf6: 4651 mov r1, sl 8022bf8: 4658 mov r0, fp 8022bfa: 462a mov r2, r5 8022bfc: f001 fffe bl 8024bfc <__lshift> 8022c00: 4682 mov sl, r0 8022c02: 2c00 cmp r4, #0 8022c04: dd05 ble.n 8022c12 <_strtod_r+0x692> 8022c06: 4639 mov r1, r7 8022c08: 4658 mov r0, fp 8022c0a: 4622 mov r2, r4 8022c0c: f001 fff6 bl 8024bfc <__lshift> 8022c10: 4607 mov r7, r0 8022c12: 9918 ldr r1, [sp, #96] ; 0x60 8022c14: 4652 mov r2, sl 8022c16: 4658 mov r0, fp 8022c18: f04f 0800 mov.w r8, #0 8022c1c: f002 f866 bl 8024cec <__mdiff> 8022c20: 4639 mov r1, r7 8022c22: 68c4 ldr r4, [r0, #12] 8022c24: 4606 mov r6, r0 8022c26: f8c0 800c str.w r8, [r0, #12] 8022c2a: 940f str r4, [sp, #60] ; 0x3c 8022c2c: f002 f840 bl 8024cb0 <__mcmp> 8022c30: 4540 cmp r0, r8 8022c32: f2c0 8213 blt.w 802305c <_strtod_r+0xadc> 8022c36: f000 8261 beq.w 80230fc <_strtod_r+0xb7c> 8022c3a: 4630 mov r0, r6 8022c3c: 4639 mov r1, r7 8022c3e: f002 f9a3 bl 8024f88 <__ratio> 8022c42: 2200 movs r2, #0 8022c44: f04f 4380 mov.w r3, #1073741824 ; 0x40000000 8022c48: 4604 mov r4, r0 8022c4a: 460d mov r5, r1 8022c4c: f7fd ff34 bl 8020ab8 <__aeabi_dcmple> 8022c50: 2800 cmp r0, #0 8022c52: f47f aeef bne.w 8022a34 <_strtod_r+0x4b4> 8022c56: 2300 movs r3, #0 8022c58: 4620 mov r0, r4 8022c5a: f6c3 73e0 movt r3, #16352 ; 0x3fe0 8022c5e: 4629 mov r1, r5 8022c60: 2200 movs r2, #0 8022c62: f7fd fcad bl 80205c0 <__aeabi_dmul> 8022c66: 9c0f ldr r4, [sp, #60] ; 0x3c 8022c68: 900c str r0, [sp, #48] ; 0x30 8022c6a: 4689 mov r9, r1 8022c6c: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8022c70: b104 cbz r4, 8022c74 <_strtod_r+0x6f4> 8022c72: 460b mov r3, r1 8022c74: 9c0c ldr r4, [sp, #48] ; 0x30 8022c76: 461d mov r5, r3 8022c78: f8dd c01c ldr.w ip, [sp, #28] 8022c7c: e6ea b.n 8022a54 <_strtod_r+0x4d4> 8022c7e: 4640 mov r0, r8 8022c80: 46a0 mov r8, r4 8022c82: 9009 str r0, [sp, #36] ; 0x24 8022c84: f1a5 0130 sub.w r1, r5, #48 ; 0x30 8022c88: 2909 cmp r1, #9 8022c8a: d803 bhi.n 8022c94 <_strtod_r+0x714> 8022c8c: 9a17 ldr r2, [sp, #92] ; 0x5c 8022c8e: 3001 adds r0, #1 8022c90: 920a str r2, [sp, #40] ; 0x28 8022c92: e66f b.n 8022974 <_strtod_r+0x3f4> 8022c94: 2101 movs r1, #1 8022c96: e50a b.n 80226ae <_strtod_r+0x12e> 8022c98: f04f 0800 mov.w r8, #0 8022c9c: 2101 movs r1, #1 8022c9e: f8cd 8024 str.w r8, [sp, #36] ; 0x24 8022ca2: e504 b.n 80226ae <_strtod_r+0x12e> 8022ca4: f3af 8000 nop.w 8022ca8: ffc00000 .word 0xffc00000 8022cac: 41dfffff .word 0x41dfffff 8022cb0: f5b4 7f9a cmp.w r4, #308 ; 0x134 8022cb4: f300 8258 bgt.w 8023168 <_strtod_r+0xbe8> 8022cb8: 1124 asrs r4, r4, #4 8022cba: f646 3ac0 movw sl, #27584 ; 0x6bc0 8022cbe: 2c01 cmp r4, #1 8022cc0: f340 8398 ble.w 80233f4 <_strtod_r+0xe74> 8022cc4: f6c0 0a03 movt sl, #2051 ; 0x803 8022cc8: e9dd 2306 ldrd r2, r3, [sp, #24] 8022ccc: f04f 0900 mov.w r9, #0 8022cd0: 4655 mov r5, sl 8022cd2: f014 0f01 tst.w r4, #1 8022cd6: 4610 mov r0, r2 8022cd8: 4619 mov r1, r3 8022cda: ea4f 0464 mov.w r4, r4, asr #1 8022cde: f109 0901 add.w r9, r9, #1 8022ce2: d005 beq.n 8022cf0 <_strtod_r+0x770> 8022ce4: e9d5 2300 ldrd r2, r3, [r5] 8022ce8: f7fd fc6a bl 80205c0 <__aeabi_dmul> 8022cec: 4602 mov r2, r0 8022cee: 460b mov r3, r1 8022cf0: 3508 adds r5, #8 8022cf2: 2c01 cmp r4, #1 8022cf4: dced bgt.n 8022cd2 <_strtod_r+0x752> 8022cf6: 4610 mov r0, r2 8022cf8: 4619 mov r1, r3 8022cfa: e9cd 0106 strd r0, r1, [sp, #24] 8022cfe: 9907 ldr r1, [sp, #28] 8022d00: eb0a 09c9 add.w r9, sl, r9, lsl #3 8022d04: f1a1 7154 sub.w r1, r1, #55574528 ; 0x3500000 8022d08: 9107 str r1, [sp, #28] 8022d0a: e9dd 2306 ldrd r2, r3, [sp, #24] 8022d0e: e9d9 0100 ldrd r0, r1, [r9] 8022d12: f7fd fc55 bl 80205c0 <__aeabi_dmul> 8022d16: 2300 movs r3, #0 8022d18: 2200 movs r2, #0 8022d1a: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022d1e: f6c7 42a0 movt r2, #31904 ; 0x7ca0 8022d22: e9cd 0106 strd r0, r1, [sp, #24] 8022d26: 9907 ldr r1, [sp, #28] 8022d28: 400b ands r3, r1 8022d2a: 4293 cmp r3, r2 8022d2c: f200 821c bhi.w 8023168 <_strtod_r+0xbe8> 8022d30: 2200 movs r2, #0 8022d32: f6c7 4290 movt r2, #31888 ; 0x7c90 8022d36: 4293 cmp r3, r2 8022d38: f240 8305 bls.w 8023346 <_strtod_r+0xdc6> 8022d3c: f64f 72ff movw r2, #65535 ; 0xffff 8022d40: f04f 30ff mov.w r0, #4294967295 8022d44: 4615 mov r5, r2 8022d46: 2400 movs r4, #0 8022d48: f6c7 75ef movt r5, #32751 ; 0x7fef 8022d4c: 940b str r4, [sp, #44] ; 0x2c 8022d4e: 9507 str r5, [sp, #28] 8022d50: 4681 mov r9, r0 8022d52: 9006 str r0, [sp, #24] 8022d54: 46aa mov sl, r5 8022d56: e651 b.n 80229fc <_strtod_r+0x47c> 8022d58: 2301 movs r3, #1 8022d5a: 930a str r3, [sp, #40] ; 0x28 8022d5c: f10c 0302 add.w r3, ip, #2 8022d60: 9317 str r3, [sp, #92] ; 0x5c 8022d62: f89c 5002 ldrb.w r5, [ip, #2] 8022d66: e4bc b.n 80226e2 <_strtod_r+0x162> 8022d68: 48ab ldr r0, [pc, #684] ; (8023018 <_strtod_r+0xa98>) 8022d6a: 9a17 ldr r2, [sp, #92] ; 0x5c 8022d6c: f810 1f01 ldrb.w r1, [r0, #1]! 8022d70: 4613 mov r3, r2 8022d72: 2900 cmp r1, #0 8022d74: f000 8311 beq.w 802339a <_strtod_r+0xe1a> 8022d78: 785b ldrb r3, [r3, #1] 8022d7a: 3201 adds r2, #1 8022d7c: 2b40 cmp r3, #64 ; 0x40 8022d7e: dd02 ble.n 8022d86 <_strtod_r+0x806> 8022d80: 2b5a cmp r3, #90 ; 0x5a 8022d82: bfd8 it le 8022d84: 3320 addle r3, #32 8022d86: 428b cmp r3, r1 8022d88: d0f0 beq.n 8022d6c <_strtod_r+0x7ec> 8022d8a: e5b8 b.n 80228fe <_strtod_r+0x37e> 8022d8c: 9b06 ldr r3, [sp, #24] 8022d8e: f8dd c01c ldr.w ip, [sp, #28] 8022d92: 2b00 cmp r3, #0 8022d94: f040 80a6 bne.w 8022ee4 <_strtod_r+0x964> 8022d98: f3cc 0313 ubfx r3, ip, #0, #20 8022d9c: bb03 cbnz r3, 8022de0 <_strtod_r+0x860> 8022d9e: 2300 movs r3, #0 8022da0: 4620 mov r0, r4 8022da2: 4629 mov r1, r5 8022da4: 2200 movs r2, #0 8022da6: f6c3 73f0 movt r3, #16368 ; 0x3ff0 8022daa: f8cd c010 str.w ip, [sp, #16] 8022dae: f7fd fe79 bl 8020aa4 <__aeabi_dcmplt> 8022db2: f8dd c010 ldr.w ip, [sp, #16] 8022db6: 2800 cmp r0, #0 8022db8: f040 8246 bne.w 8023248 <_strtod_r+0xcc8> 8022dbc: 2300 movs r3, #0 8022dbe: 2200 movs r2, #0 8022dc0: f6c3 73e0 movt r3, #16352 ; 0x3fe0 8022dc4: 4620 mov r0, r4 8022dc6: 4629 mov r1, r5 8022dc8: f7fd fbfa bl 80205c0 <__aeabi_dmul> 8022dcc: f8dd c010 ldr.w ip, [sp, #16] 8022dd0: 4689 mov r9, r1 8022dd2: 4602 mov r2, r0 8022dd4: f101 4300 add.w r3, r1, #2147483648 ; 0x80000000 8022dd8: 900c str r0, [sp, #48] ; 0x30 8022dda: 4614 mov r4, r2 8022ddc: 461d mov r5, r3 8022dde: e639 b.n 8022a54 <_strtod_r+0x4d4> 8022de0: f04f 0900 mov.w r9, #0 8022de4: 2500 movs r5, #0 8022de6: f8cd 9030 str.w r9, [sp, #48] ; 0x30 8022dea: 2400 movs r4, #0 8022dec: f6cb 75f0 movt r5, #49136 ; 0xbff0 8022df0: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022df4: e62e b.n 8022a54 <_strtod_r+0x4d4> 8022df6: f1ac 7c54 sub.w ip, ip, #55574528 ; 0x3500000 8022dfa: 9a09 ldr r2, [sp, #36] ; 0x24 8022dfc: f8cd c01c str.w ip, [sp, #28] 8022e00: 9b0a ldr r3, [sp, #40] ; 0x28 8022e02: e9dd 0106 ldrd r0, r1, [sp, #24] 8022e06: e9cd 4502 strd r4, r5, [sp, #8] 8022e0a: 4614 mov r4, r2 8022e0c: 461d mov r5, r3 8022e0e: e9cd 4514 strd r4, r5, [sp, #80] ; 0x50 8022e12: f001 ffe1 bl 8024dd8 <__ulp> 8022e16: 4602 mov r2, r0 8022e18: 460b mov r3, r1 8022e1a: e9dd 0102 ldrd r0, r1, [sp, #8] 8022e1e: f7fd fbcf bl 80205c0 <__aeabi_dmul> 8022e22: 4602 mov r2, r0 8022e24: 460b mov r3, r1 8022e26: e9dd 0106 ldrd r0, r1, [sp, #24] 8022e2a: f7fd fa17 bl 802025c <__adddf3> 8022e2e: 2300 movs r3, #0 8022e30: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8022e34: f64f 72ff movw r2, #65535 ; 0xffff 8022e38: f6c7 429f movt r2, #31903 ; 0x7c9f 8022e3c: e9cd 0106 strd r0, r1, [sp, #24] 8022e40: 9c07 ldr r4, [sp, #28] 8022e42: 4023 ands r3, r4 8022e44: 4293 cmp r3, r2 8022e46: d976 bls.n 8022f36 <_strtod_r+0x9b6> 8022e48: f64f 73ff movw r3, #65535 ; 0xffff 8022e4c: 9d15 ldr r5, [sp, #84] ; 0x54 8022e4e: f6c7 73ef movt r3, #32751 ; 0x7fef 8022e52: 429d cmp r5, r3 8022e54: f000 8177 beq.w 8023146 <_strtod_r+0xbc6> 8022e58: f64f 71ff movw r1, #65535 ; 0xffff 8022e5c: f04f 33ff mov.w r3, #4294967295 8022e60: 460a mov r2, r1 8022e62: 9306 str r3, [sp, #24] 8022e64: f6c7 72ef movt r2, #32751 ; 0x7fef 8022e68: 9309 str r3, [sp, #36] ; 0x24 8022e6a: 9207 str r2, [sp, #28] 8022e6c: 920a str r2, [sp, #40] ; 0x28 8022e6e: e643 b.n 8022af8 <_strtod_r+0x578> 8022e70: 4649 mov r1, r9 8022e72: 980c ldr r0, [sp, #48] ; 0x30 8022e74: f7fd fe3e bl 8020af4 <__aeabi_d2iz> 8022e78: f7fd fb3c bl 80204f4 <__aeabi_i2d> 8022e7c: 4602 mov r2, r0 8022e7e: 460b mov r3, r1 8022e80: 980c ldr r0, [sp, #48] ; 0x30 8022e82: 4649 mov r1, r9 8022e84: f7fd f9e8 bl 8020258 <__aeabi_dsub> 8022e88: 9d0f ldr r5, [sp, #60] ; 0x3c 8022e8a: 4680 mov r8, r0 8022e8c: 4689 mov r9, r1 8022e8e: 2d00 cmp r5, #0 8022e90: d137 bne.n 8022f02 <_strtod_r+0x982> 8022e92: 9a06 ldr r2, [sp, #24] 8022e94: 2a00 cmp r2, #0 8022e96: d134 bne.n 8022f02 <_strtod_r+0x982> 8022e98: f3c4 0413 ubfx r4, r4, #0, #20 8022e9c: 2c00 cmp r4, #0 8022e9e: d130 bne.n 8022f02 <_strtod_r+0x982> 8022ea0: a357 add r3, pc, #348 ; (adr r3, 8023000 <_strtod_r+0xa80>) 8022ea2: e9d3 2300 ldrd r2, r3, [r3] 8022ea6: f7fd fdfd bl 8020aa4 <__aeabi_dcmplt> 8022eaa: 2800 cmp r0, #0 8022eac: f43f ae24 beq.w 8022af8 <_strtod_r+0x578> 8022eb0: 4654 mov r4, sl 8022eb2: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 8022eb6: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 8022eba: 4658 mov r0, fp 8022ebc: 9918 ldr r1, [sp, #96] ; 0x60 8022ebe: f001 fcab bl 8024818 <_Bfree> 8022ec2: 4658 mov r0, fp 8022ec4: 4621 mov r1, r4 8022ec6: f001 fca7 bl 8024818 <_Bfree> 8022eca: 4658 mov r0, fp 8022ecc: 4639 mov r1, r7 8022ece: f001 fca3 bl 8024818 <_Bfree> 8022ed2: 4658 mov r0, fp 8022ed4: 9911 ldr r1, [sp, #68] ; 0x44 8022ed6: f001 fc9f bl 8024818 <_Bfree> 8022eda: 4658 mov r0, fp 8022edc: 4631 mov r1, r6 8022ede: f001 fc9b bl 8024818 <_Bfree> 8022ee2: e49a b.n 802281a <_strtod_r+0x29a> 8022ee4: 2b01 cmp r3, #1 8022ee6: f47f af7b bne.w 8022de0 <_strtod_r+0x860> 8022eea: 4661 mov r1, ip 8022eec: 2900 cmp r1, #0 8022eee: f47f af77 bne.w 8022de0 <_strtod_r+0x860> 8022ef2: 4654 mov r4, sl 8022ef4: f04f 0900 mov.w r9, #0 8022ef8: 46ca mov sl, r9 8022efa: 2322 movs r3, #34 ; 0x22 8022efc: f8cb 3000 str.w r3, [fp] 8022f00: e7db b.n 8022eba <_strtod_r+0x93a> 8022f02: 4640 mov r0, r8 8022f04: 4649 mov r1, r9 8022f06: a340 add r3, pc, #256 ; (adr r3, 8023008 <_strtod_r+0xa88>) 8022f08: e9d3 2300 ldrd r2, r3, [r3] 8022f0c: f7fd fdca bl 8020aa4 <__aeabi_dcmplt> 8022f10: 2800 cmp r0, #0 8022f12: d1cd bne.n 8022eb0 <_strtod_r+0x930> 8022f14: 4640 mov r0, r8 8022f16: 4649 mov r1, r9 8022f18: a33d add r3, pc, #244 ; (adr r3, 8023010 <_strtod_r+0xa90>) 8022f1a: e9d3 2300 ldrd r2, r3, [r3] 8022f1e: f7fd fddf bl 8020ae0 <__aeabi_dcmpgt> 8022f22: 2800 cmp r0, #0 8022f24: f43f ade8 beq.w 8022af8 <_strtod_r+0x578> 8022f28: e7c2 b.n 8022eb0 <_strtod_r+0x930> 8022f2a: f04f 0900 mov.w r9, #0 8022f2e: 900c str r0, [sp, #48] ; 0x30 8022f30: f6c3 79f0 movt r9, #16368 ; 0x3ff0 8022f34: e5b7 b.n 8022aa6 <_strtod_r+0x526> 8022f36: 9906 ldr r1, [sp, #24] 8022f38: f104 7454 add.w r4, r4, #55574528 ; 0x3500000 8022f3c: 9407 str r4, [sp, #28] 8022f3e: 940a str r4, [sp, #40] ; 0x28 8022f40: 9109 str r1, [sp, #36] ; 0x24 8022f42: e5d0 b.n 8022ae6 <_strtod_r+0x566> 8022f44: f8cd c05c str.w ip, [sp, #92] ; 0x5c 8022f48: 2200 movs r2, #0 8022f4a: f1b8 0f00 cmp.w r8, #0 8022f4e: f47f ac0f bne.w 8022770 <_strtod_r+0x1f0> 8022f52: e495 b.n 8022880 <_strtod_r+0x300> 8022f54: 9d12 ldr r5, [sp, #72] ; 0x48 8022f56: f240 0404 movw r4, #4 8022f5a: f2c2 0400 movt r4, #8192 ; 0x2000 8022f5e: ab18 add r3, sp, #96 ; 0x60 8022f60: 4658 mov r0, fp 8022f62: e88d 0028 stmia.w sp, {r3, r5} 8022f66: a917 add r1, sp, #92 ; 0x5c 8022f68: 4622 mov r2, r4 8022f6a: ab19 add r3, sp, #100 ; 0x64 8022f6c: f000 fd1c bl 80239a8 <__gethex> 8022f70: f010 0707 ands.w r7, r0, #7 8022f74: 4605 mov r5, r0 8022f76: bf04 itt eq 8022f78: 46b9 moveq r9, r7 8022f7a: 46ca moveq sl, r9 8022f7c: f43f ac4d beq.w 802281a <_strtod_r+0x29a> 8022f80: 2f06 cmp r7, #6 8022f82: f000 816f beq.w 8023264 <_strtod_r+0xce4> 8022f86: 9a18 ldr r2, [sp, #96] ; 0x60 8022f88: b13a cbz r2, 8022f9a <_strtod_r+0xa1a> 8022f8a: 6821 ldr r1, [r4, #0] 8022f8c: a81a add r0, sp, #104 ; 0x68 8022f8e: f002 f845 bl 802501c <__copybits> 8022f92: 4658 mov r0, fp 8022f94: 9918 ldr r1, [sp, #96] ; 0x60 8022f96: f001 fc3f bl 8024818 <_Bfree> 8022f9a: 9b19 ldr r3, [sp, #100] ; 0x64 8022f9c: 2f06 cmp r7, #6 8022f9e: d80b bhi.n 8022fb8 <_strtod_r+0xa38> 8022fa0: e8df f007 tbb [pc, r7] 8022fa4: 141b203c .word 0x141b203c 8022fa8: 2004 .short 0x2004 8022faa: 3c .byte 0x3c 8022fab: 00 .byte 0x00 8022fac: f06f 4400 mvn.w r4, #2147483648 ; 0x80000000 8022fb0: f04f 30ff mov.w r0, #4294967295 8022fb4: 9407 str r4, [sp, #28] 8022fb6: 9006 str r0, [sp, #24] 8022fb8: 072b lsls r3, r5, #28 8022fba: f57f acb1 bpl.w 8022920 <_strtod_r+0x3a0> 8022fbe: 9907 ldr r1, [sp, #28] 8022fc0: f8dd 9018 ldr.w r9, [sp, #24] 8022fc4: f041 4300 orr.w r3, r1, #2147483648 ; 0x80000000 8022fc8: 469a mov sl, r3 8022fca: e426 b.n 802281a <_strtod_r+0x29a> 8022fcc: 2100 movs r1, #0 8022fce: 9106 str r1, [sp, #24] 8022fd0: 460a mov r2, r1 8022fd2: f6c7 72f0 movt r2, #32752 ; 0x7ff0 8022fd6: 9207 str r2, [sp, #28] 8022fd8: e7ee b.n 8022fb8 <_strtod_r+0xa38> 8022fda: 9b1a ldr r3, [sp, #104] ; 0x68 8022fdc: 9c1b ldr r4, [sp, #108] ; 0x6c 8022fde: 9306 str r3, [sp, #24] 8022fe0: 9407 str r4, [sp, #28] 8022fe2: e7e9 b.n 8022fb8 <_strtod_r+0xa38> 8022fe4: 981a ldr r0, [sp, #104] ; 0x68 8022fe6: f203 4333 addw r3, r3, #1075 ; 0x433 8022fea: 9a1b ldr r2, [sp, #108] ; 0x6c 8022fec: f422 1280 bic.w r2, r2, #1048576 ; 0x100000 8022ff0: 9006 str r0, [sp, #24] 8022ff2: ea42 5203 orr.w r2, r2, r3, lsl #20 8022ff6: 9207 str r2, [sp, #28] 8022ff8: e7de b.n 8022fb8 <_strtod_r+0xa38> 8022ffa: bf00 nop 8022ffc: f3af 8000 nop.w 8023000: 94a03595 .word 0x94a03595 8023004: 3fcfffff .word 0x3fcfffff 8023008: 94a03595 .word 0x94a03595 802300c: 3fdfffff .word 0x3fdfffff 8023010: 35afe535 .word 0x35afe535 8023014: 3fe00000 .word 0x3fe00000 8023018: 08041ec3 .word 0x08041ec3 802301c: 2100 movs r1, #0 802301e: 9107 str r1, [sp, #28] 8023020: 9106 str r1, [sp, #24] 8023022: e7c9 b.n 8022fb8 <_strtod_r+0xa38> 8023024: 46b0 mov r8, r6 8023026: 4657 mov r7, sl 8023028: 4654 mov r4, sl 802302a: f7ff bb24 b.w 8022676 <_strtod_r+0xf6> 802302e: 2300 movs r3, #0 8023030: 930a str r3, [sp, #40] ; 0x28 8023032: e693 b.n 8022d5c <_strtod_r+0x7dc> 8023034: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 8023038: eb08 0300 add.w r3, r8, r0 802303c: 3b01 subs r3, #1 802303e: 2b08 cmp r3, #8 8023040: f103 0801 add.w r8, r3, #1 8023044: f300 8172 bgt.w 802332c <_strtod_r+0xdac> 8023048: eb07 0787 add.w r7, r7, r7, lsl #2 802304c: 2000 movs r0, #0 802304e: eb01 0747 add.w r7, r1, r7, lsl #1 8023052: 9d0a ldr r5, [sp, #40] ; 0x28 8023054: 1c6b adds r3, r5, #1 8023056: 9317 str r3, [sp, #92] ; 0x5c 8023058: 786d ldrb r5, [r5, #1] 802305a: e613 b.n 8022c84 <_strtod_r+0x704> 802305c: 9d0f ldr r5, [sp, #60] ; 0x3c 802305e: 4654 mov r4, sl 8023060: bb7d cbnz r5, 80230c2 <_strtod_r+0xb42> 8023062: 9806 ldr r0, [sp, #24] 8023064: bb68 cbnz r0, 80230c2 <_strtod_r+0xb42> 8023066: 9a07 ldr r2, [sp, #28] 8023068: f3c2 0313 ubfx r3, r2, #0, #20 802306c: bb4b cbnz r3, 80230c2 <_strtod_r+0xb42> 802306e: 4643 mov r3, r8 8023070: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8023074: 4013 ands r3, r2 8023076: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 802307a: d922 bls.n 80230c2 <_strtod_r+0xb42> 802307c: 6973 ldr r3, [r6, #20] 802307e: b913 cbnz r3, 8023086 <_strtod_r+0xb06> 8023080: 6933 ldr r3, [r6, #16] 8023082: 2b01 cmp r3, #1 8023084: dd1d ble.n 80230c2 <_strtod_r+0xb42> 8023086: 4631 mov r1, r6 8023088: 2201 movs r2, #1 802308a: 4658 mov r0, fp 802308c: f001 fdb6 bl 8024bfc <__lshift> 8023090: 4639 mov r1, r7 8023092: 4606 mov r6, r0 8023094: f001 fe0c bl 8024cb0 <__mcmp> 8023098: 2800 cmp r0, #0 802309a: dd12 ble.n 80230c2 <_strtod_r+0xb42> 802309c: 9d0b ldr r5, [sp, #44] ; 0x2c 802309e: 2d00 cmp r5, #0 80230a0: f040 8195 bne.w 80233ce <_strtod_r+0xe4e> 80230a4: 9807 ldr r0, [sp, #28] 80230a6: f020 4300 bic.w r3, r0, #2147483648 ; 0x80000000 80230aa: 0d1b lsrs r3, r3, #20 80230ac: 051b lsls r3, r3, #20 80230ae: f5a3 1380 sub.w r3, r3, #1048576 ; 0x100000 80230b2: f04f 32ff mov.w r2, #4294967295 80230b6: 9206 str r2, [sp, #24] 80230b8: ea6f 5313 mvn.w r3, r3, lsr #20 80230bc: ea6f 5303 mvn.w r3, r3, lsl #20 80230c0: 9307 str r3, [sp, #28] 80230c2: 9d0b ldr r5, [sp, #44] ; 0x2c 80230c4: 2d00 cmp r5, #0 80230c6: f000 80c8 beq.w 802325a <_strtod_r+0xcda> 80230ca: 2200 movs r2, #0 80230cc: 2300 movs r3, #0 80230ce: f6c3 1250 movt r2, #14672 ; 0x3950 80230d2: 9314 str r3, [sp, #80] ; 0x50 80230d4: 9215 str r2, [sp, #84] ; 0x54 80230d6: e9dd 0106 ldrd r0, r1, [sp, #24] 80230da: e9dd 2314 ldrd r2, r3, [sp, #80] ; 0x50 80230de: f7fd fa6f bl 80205c0 <__aeabi_dmul> 80230e2: e9cd 0106 strd r0, r1, [sp, #24] 80230e6: 468a mov sl, r1 80230e8: 9907 ldr r1, [sp, #28] 80230ea: 4681 mov r9, r0 80230ec: 2900 cmp r1, #0 80230ee: f47f aee4 bne.w 8022eba <_strtod_r+0x93a> 80230f2: 9a06 ldr r2, [sp, #24] 80230f4: 2a00 cmp r2, #0 80230f6: f47f aee0 bne.w 8022eba <_strtod_r+0x93a> 80230fa: e6fe b.n 8022efa <_strtod_r+0x97a> 80230fc: 9d0f ldr r5, [sp, #60] ; 0x3c 80230fe: 4654 mov r4, sl 8023100: f8dd 9024 ldr.w r9, [sp, #36] ; 0x24 8023104: f8dd a028 ldr.w sl, [sp, #40] ; 0x28 8023108: 2d00 cmp r5, #0 802310a: f000 80d3 beq.w 80232b4 <_strtod_r+0xd34> 802310e: 9b07 ldr r3, [sp, #28] 8023110: f64f 72ff movw r2, #65535 ; 0xffff 8023114: f2c0 020f movt r2, #15 8023118: f023 417f bic.w r1, r3, #4278190080 ; 0xff000000 802311c: f421 0170 bic.w r1, r1, #15728640 ; 0xf00000 8023120: 4291 cmp r1, r2 8023122: 9906 ldr r1, [sp, #24] 8023124: f000 8119 beq.w 802335a <_strtod_r+0xdda> 8023128: 07cb lsls r3, r1, #31 802312a: d5ca bpl.n 80230c2 <_strtod_r+0xb42> 802312c: 4648 mov r0, r9 802312e: 4651 mov r1, sl 8023130: f001 fe52 bl 8024dd8 <__ulp> 8023134: 4602 mov r2, r0 8023136: 460b mov r3, r1 8023138: 4648 mov r0, r9 802313a: 4651 mov r1, sl 802313c: f7fd f88e bl 802025c <__adddf3> 8023140: e9cd 0106 strd r0, r1, [sp, #24] 8023144: e7bd b.n 80230c2 <_strtod_r+0xb42> 8023146: 9814 ldr r0, [sp, #80] ; 0x50 8023148: 3001 adds r0, #1 802314a: f47f ae85 bne.w 8022e58 <_strtod_r+0x8d8> 802314e: 2000 movs r0, #0 8023150: 4654 mov r4, sl 8023152: 4601 mov r1, r0 8023154: 2322 movs r3, #34 ; 0x22 8023156: f6c7 71f0 movt r1, #32752 ; 0x7ff0 802315a: f8cb 3000 str.w r3, [fp] 802315e: 9107 str r1, [sp, #28] 8023160: 4681 mov r9, r0 8023162: 9006 str r0, [sp, #24] 8023164: 468a mov sl, r1 8023166: e6a8 b.n 8022eba <_strtod_r+0x93a> 8023168: 2300 movs r3, #0 802316a: 2500 movs r5, #0 802316c: 461c mov r4, r3 802316e: 9506 str r5, [sp, #24] 8023170: f6c7 74f0 movt r4, #32752 ; 0x7ff0 8023174: 2322 movs r3, #34 ; 0x22 8023176: 9407 str r4, [sp, #28] 8023178: 46a9 mov r9, r5 802317a: f8cb 3000 str.w r3, [fp] 802317e: 46a2 mov sl, r4 8023180: f7ff bb4b b.w 802281a <_strtod_r+0x29a> 8023184: f43f ac35 beq.w 80229f2 <_strtod_r+0x472> 8023188: 4264 negs r4, r4 802318a: f014 020f ands.w r2, r4, #15 802318e: d00d beq.n 80231ac <_strtod_r+0xc2c> 8023190: f646 23d0 movw r3, #27344 ; 0x6ad0 8023194: e9dd 0106 ldrd r0, r1, [sp, #24] 8023198: f6c0 0303 movt r3, #2051 ; 0x803 802319c: eb03 03c2 add.w r3, r3, r2, lsl #3 80231a0: e9d3 2300 ldrd r2, r3, [r3] 80231a4: f7fd fb36 bl 8020814 <__aeabi_ddiv> 80231a8: e9cd 0106 strd r0, r1, [sp, #24] 80231ac: 1124 asrs r4, r4, #4 80231ae: f43f ac20 beq.w 80229f2 <_strtod_r+0x472> 80231b2: 2c1f cmp r4, #31 80231b4: dc40 bgt.n 8023238 <_strtod_r+0xcb8> 80231b6: f014 0f10 tst.w r4, #16 80231ba: bf14 ite ne 80231bc: 256a movne r5, #106 ; 0x6a 80231be: 2500 moveq r5, #0 80231c0: 2c00 cmp r4, #0 80231c2: 950b str r5, [sp, #44] ; 0x2c 80231c4: dd17 ble.n 80231f6 <_strtod_r+0xc76> 80231c6: f646 2598 movw r5, #27288 ; 0x6a98 80231ca: e9dd 2306 ldrd r2, r3, [sp, #24] 80231ce: f6c0 0503 movt r5, #2051 ; 0x803 80231d2: f014 0f01 tst.w r4, #1 80231d6: 4610 mov r0, r2 80231d8: 4619 mov r1, r3 80231da: d005 beq.n 80231e8 <_strtod_r+0xc68> 80231dc: e9d5 2300 ldrd r2, r3, [r5] 80231e0: f7fd f9ee bl 80205c0 <__aeabi_dmul> 80231e4: 4602 mov r2, r0 80231e6: 460b mov r3, r1 80231e8: 3508 adds r5, #8 80231ea: 1064 asrs r4, r4, #1 80231ec: d1f1 bne.n 80231d2 <_strtod_r+0xc52> 80231ee: 4610 mov r0, r2 80231f0: 4619 mov r1, r3 80231f2: e9cd 0106 strd r0, r1, [sp, #24] 80231f6: 9c0b ldr r4, [sp, #44] ; 0x2c 80231f8: b18c cbz r4, 802321e <_strtod_r+0xc9e> 80231fa: 9a07 ldr r2, [sp, #28] 80231fc: f3c2 530a ubfx r3, r2, #20, #11 8023200: f1c3 036b rsb r3, r3, #107 ; 0x6b 8023204: 2b00 cmp r3, #0 8023206: dd0a ble.n 802321e <_strtod_r+0xc9e> 8023208: 2b1f cmp r3, #31 802320a: f340 810a ble.w 8023422 <_strtod_r+0xea2> 802320e: 2100 movs r1, #0 8023210: 2b34 cmp r3, #52 ; 0x34 8023212: 9106 str r1, [sp, #24] 8023214: f340 810d ble.w 8023432 <_strtod_r+0xeb2> 8023218: f04f 725c mov.w r2, #57671680 ; 0x3700000 802321c: 9207 str r2, [sp, #28] 802321e: 9d06 ldr r5, [sp, #24] 8023220: 2200 movs r2, #0 8023222: 9c07 ldr r4, [sp, #28] 8023224: 2300 movs r3, #0 8023226: 4628 mov r0, r5 8023228: 46a9 mov r9, r5 802322a: 4621 mov r1, r4 802322c: 46a2 mov sl, r4 802322e: f7fd fc2f bl 8020a90 <__aeabi_dcmpeq> 8023232: 2800 cmp r0, #0 8023234: f43f abe2 beq.w 80229fc <_strtod_r+0x47c> 8023238: f04f 0900 mov.w r9, #0 802323c: 2322 movs r3, #34 ; 0x22 802323e: 46ca mov sl, r9 8023240: f8cb 3000 str.w r3, [fp] 8023244: f7ff bae9 b.w 802281a <_strtod_r+0x29a> 8023248: 9a0f ldr r2, [sp, #60] ; 0x3c 802324a: 2300 movs r3, #0 802324c: 4699 mov r9, r3 802324e: f6cb 73e0 movt r3, #49120 ; 0xbfe0 8023252: f6c3 79e0 movt r9, #16352 ; 0x3fe0 8023256: 920c str r2, [sp, #48] ; 0x30 8023258: e5bf b.n 8022dda <_strtod_r+0x85a> 802325a: f8dd 9018 ldr.w r9, [sp, #24] 802325e: f8dd a01c ldr.w sl, [sp, #28] 8023262: e62a b.n 8022eba <_strtod_r+0x93a> 8023264: f04f 0900 mov.w r9, #0 8023268: 3601 adds r6, #1 802326a: 46ca mov sl, r9 802326c: 9617 str r6, [sp, #92] ; 0x5c 802326e: f7ff bad4 b.w 802281a <_strtod_r+0x29a> 8023272: 9c09 ldr r4, [sp, #36] ; 0x24 8023274: f1c8 0325 rsb r3, r8, #37 ; 0x25 8023278: 429c cmp r4, r3 802327a: f73f ab9d bgt.w 80229b8 <_strtod_r+0x438> 802327e: f1c8 080f rsb r8, r8, #15 8023282: f646 24d0 movw r4, #27344 ; 0x6ad0 8023286: f6c0 0403 movt r4, #2051 ; 0x803 802328a: e9dd 2306 ldrd r2, r3, [sp, #24] 802328e: eb04 01c8 add.w r1, r4, r8, lsl #3 8023292: e9d1 0100 ldrd r0, r1, [r1] 8023296: f7fd f993 bl 80205c0 <__aeabi_dmul> 802329a: 9d09 ldr r5, [sp, #36] ; 0x24 802329c: ebc8 0805 rsb r8, r8, r5 80232a0: eb04 04c8 add.w r4, r4, r8, lsl #3 80232a4: e9d4 2300 ldrd r2, r3, [r4] 80232a8: f7fd f98a bl 80205c0 <__aeabi_dmul> 80232ac: 4681 mov r9, r0 80232ae: 468a mov sl, r1 80232b0: f7ff bab3 b.w 802281a <_strtod_r+0x29a> 80232b4: 9907 ldr r1, [sp, #28] 80232b6: f3c1 0313 ubfx r3, r1, #0, #20 80232ba: 2b00 cmp r3, #0 80232bc: d141 bne.n 8023342 <_strtod_r+0xdc2> 80232be: 9b06 ldr r3, [sp, #24] 80232c0: 2b00 cmp r3, #0 80232c2: f43f aeeb beq.w 802309c <_strtod_r+0xb1c> 80232c6: 07da lsls r2, r3, #31 80232c8: f57f aefb bpl.w 80230c2 <_strtod_r+0xb42> 80232cc: 4648 mov r0, r9 80232ce: 4651 mov r1, sl 80232d0: f001 fd82 bl 8024dd8 <__ulp> 80232d4: 4602 mov r2, r0 80232d6: 460b mov r3, r1 80232d8: 4648 mov r0, r9 80232da: 4651 mov r1, sl 80232dc: f7fc ffbc bl 8020258 <__aeabi_dsub> 80232e0: 4602 mov r2, r0 80232e2: 460b mov r3, r1 80232e4: e9cd 2306 strd r2, r3, [sp, #24] 80232e8: 2200 movs r2, #0 80232ea: 2300 movs r3, #0 80232ec: f7fd fbd0 bl 8020a90 <__aeabi_dcmpeq> 80232f0: 2800 cmp r0, #0 80232f2: f47f adff bne.w 8022ef4 <_strtod_r+0x974> 80232f6: e6e4 b.n 80230c2 <_strtod_r+0xb42> 80232f8: 9d09 ldr r5, [sp, #36] ; 0x24 80232fa: 426d negs r5, r5 80232fc: 950d str r5, [sp, #52] ; 0x34 80232fe: f7ff bb8b b.w 8022a18 <_strtod_r+0x498> 8023302: 9c09 ldr r4, [sp, #36] ; 0x24 8023304: f114 0f16 cmn.w r4, #22 8023308: f6ff ab56 blt.w 80229b8 <_strtod_r+0x438> 802330c: f646 23d0 movw r3, #27344 ; 0x6ad0 8023310: e9dd 0106 ldrd r0, r1, [sp, #24] 8023314: f6c0 0303 movt r3, #2051 ; 0x803 8023318: eba3 03c4 sub.w r3, r3, r4, lsl #3 802331c: e9d3 2300 ldrd r2, r3, [r3] 8023320: f7fd fa78 bl 8020814 <__aeabi_ddiv> 8023324: 4681 mov r9, r0 8023326: 468a mov sl, r1 8023328: f7ff ba77 b.w 802281a <_strtod_r+0x29a> 802332c: 2000 movs r0, #0 802332e: f1b8 0f10 cmp.w r8, #16 8023332: f73f ae8e bgt.w 8023052 <_strtod_r+0xad2> 8023336: eb0a 0a8a add.w sl, sl, sl, lsl #2 802333a: 2000 movs r0, #0 802333c: eb01 0a4a add.w sl, r1, sl, lsl #1 8023340: e687 b.n 8023052 <_strtod_r+0xad2> 8023342: 9b06 ldr r3, [sp, #24] 8023344: e7bf b.n 80232c6 <_strtod_r+0xd46> 8023346: f101 7154 add.w r1, r1, #55574528 ; 0x3500000 802334a: 2400 movs r4, #0 802334c: 9107 str r1, [sp, #28] 802334e: 468a mov sl, r1 8023350: 940b str r4, [sp, #44] ; 0x2c 8023352: f8dd 9018 ldr.w r9, [sp, #24] 8023356: f7ff bb51 b.w 80229fc <_strtod_r+0x47c> 802335a: 9d0b ldr r5, [sp, #44] ; 0x2c 802335c: b1d5 cbz r5, 8023394 <_strtod_r+0xe14> 802335e: 2200 movs r2, #0 8023360: f6c7 72f0 movt r2, #32752 ; 0x7ff0 8023364: 401a ands r2, r3 8023366: f1b2 6fd4 cmp.w r2, #111149056 ; 0x6a00000 802336a: d813 bhi.n 8023394 <_strtod_r+0xe14> 802336c: 0d12 lsrs r2, r2, #20 802336e: f04f 30ff mov.w r0, #4294967295 8023372: f1c2 026b rsb r2, r2, #107 ; 0x6b 8023376: fa00 f202 lsl.w r2, r0, r2 802337a: 4291 cmp r1, r2 802337c: f47f aed4 bne.w 8023128 <_strtod_r+0xba8> 8023380: 2200 movs r2, #0 8023382: 2000 movs r0, #0 8023384: f6c7 72f0 movt r2, #32752 ; 0x7ff0 8023388: 9006 str r0, [sp, #24] 802338a: 401a ands r2, r3 802338c: f502 1280 add.w r2, r2, #1048576 ; 0x100000 8023390: 9207 str r2, [sp, #28] 8023392: e696 b.n 80230c2 <_strtod_r+0xb42> 8023394: f04f 32ff mov.w r2, #4294967295 8023398: e7ef b.n 802337a <_strtod_r+0xdfa> 802339a: 4c2a ldr r4, [pc, #168] ; (8023444 <_strtod_r+0xec4>) 802339c: 4611 mov r1, r2 802339e: 9217 str r2, [sp, #92] ; 0x5c 80233a0: f814 0f01 ldrb.w r0, [r4, #1]! 80233a4: 460b mov r3, r1 80233a6: b310 cbz r0, 80233ee <_strtod_r+0xe6e> 80233a8: 785b ldrb r3, [r3, #1] 80233aa: 3101 adds r1, #1 80233ac: 2b40 cmp r3, #64 ; 0x40 80233ae: dd02 ble.n 80233b6 <_strtod_r+0xe36> 80233b0: 2b5a cmp r3, #90 ; 0x5a 80233b2: bfd8 it le 80233b4: 3320 addle r3, #32 80233b6: 4283 cmp r3, r0 80233b8: d0f2 beq.n 80233a0 <_strtod_r+0xe20> 80233ba: 3201 adds r2, #1 80233bc: 9217 str r2, [sp, #92] ; 0x5c 80233be: 2500 movs r5, #0 80233c0: 9506 str r5, [sp, #24] 80233c2: 4628 mov r0, r5 80233c4: f6c7 70f0 movt r0, #32752 ; 0x7ff0 80233c8: 9007 str r0, [sp, #28] 80233ca: f7ff baa9 b.w 8022920 <_strtod_r+0x3a0> 80233ce: 9907 ldr r1, [sp, #28] 80233d0: f021 4300 bic.w r3, r1, #2147483648 ; 0x80000000 80233d4: 0d1b lsrs r3, r3, #20 80233d6: 051b lsls r3, r3, #20 80233d8: f1b3 6fd6 cmp.w r3, #112197632 ; 0x6b00000 80233dc: f63f ae67 bhi.w 80230ae <_strtod_r+0xb2e> 80233e0: f1b3 7f5c cmp.w r3, #57671680 ; 0x3700000 80233e4: f63f ae71 bhi.w 80230ca <_strtod_r+0xb4a> 80233e8: e584 b.n 8022ef4 <_strtod_r+0x974> 80233ea: 4643 mov r3, r8 80233ec: e627 b.n 802303e <_strtod_r+0xabe> 80233ee: 3101 adds r1, #1 80233f0: 9117 str r1, [sp, #92] ; 0x5c 80233f2: e7e4 b.n 80233be <_strtod_r+0xe3e> 80233f4: f04f 0900 mov.w r9, #0 80233f8: f6c0 0a03 movt sl, #2051 ; 0x803 80233fc: e47f b.n 8022cfe <_strtod_r+0x77e> 80233fe: a817 add r0, sp, #92 ; 0x5c 8023400: 4911 ldr r1, [pc, #68] ; (8023448 <_strtod_r+0xec8>) 8023402: aa1a add r2, sp, #104 ; 0x68 8023404: f000 fd7e bl 8023f04 <__hexnan> 8023408: 2805 cmp r0, #5 802340a: f47f aa83 bne.w 8022914 <_strtod_r+0x394> 802340e: 9b1b ldr r3, [sp, #108] ; 0x6c 8023410: 9a1a ldr r2, [sp, #104] ; 0x68 8023412: f043 43ff orr.w r3, r3, #2139095040 ; 0x7f800000 8023416: f443 03e0 orr.w r3, r3, #7340032 ; 0x700000 802341a: 9307 str r3, [sp, #28] 802341c: 9206 str r2, [sp, #24] 802341e: f7ff ba7f b.w 8022920 <_strtod_r+0x3a0> 8023422: f04f 32ff mov.w r2, #4294967295 8023426: 9c06 ldr r4, [sp, #24] 8023428: fa02 f303 lsl.w r3, r2, r3 802342c: 401c ands r4, r3 802342e: 9406 str r4, [sp, #24] 8023430: e6f5 b.n 802321e <_strtod_r+0xc9e> 8023432: f04f 31ff mov.w r1, #4294967295 8023436: 3b20 subs r3, #32 8023438: fa01 f303 lsl.w r3, r1, r3 802343c: 4013 ands r3, r2 802343e: 9307 str r3, [sp, #28] 8023440: e6ed b.n 802321e <_strtod_r+0xc9e> 8023442: bf00 nop 8023444: 08041ec7 .word 0x08041ec7 8023448: 20000018 .word 0x20000018 0802344c : 802344c: f240 032c movw r3, #44 ; 0x2c 8023450: 460a mov r2, r1 8023452: f2c2 0300 movt r3, #8192 ; 0x2000 8023456: 4601 mov r1, r0 8023458: 6818 ldr r0, [r3, #0] 802345a: f7ff b891 b.w 8022580 <_strtod_r> 802345e: bf00 nop 08023460 : 8023460: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8023464: f240 062c movw r6, #44 ; 0x2c 8023468: f2c2 0600 movt r6, #8192 ; 0x2000 802346c: 460a mov r2, r1 802346e: 4601 mov r1, r0 8023470: f04f 0801 mov.w r8, #1 8023474: 6830 ldr r0, [r6, #0] 8023476: f7ff f883 bl 8022580 <_strtod_r> 802347a: 460d mov r5, r1 802347c: 4604 mov r4, r0 802347e: f7fd fb61 bl 8020b44 <__aeabi_d2f> 8023482: 2100 movs r1, #0 8023484: 4607 mov r7, r0 8023486: f7fd fcff bl 8020e88 <__aeabi_fcmpeq> 802348a: b908 cbnz r0, 8023490 802348c: f04f 0800 mov.w r8, #0 8023490: 4620 mov r0, r4 8023492: 4629 mov r1, r5 8023494: 2200 movs r2, #0 8023496: 2300 movs r3, #0 8023498: f04f 0901 mov.w r9, #1 802349c: f7fd faf8 bl 8020a90 <__aeabi_dcmpeq> 80234a0: b108 cbz r0, 80234a6 80234a2: f04f 0900 mov.w r9, #0 80234a6: ea08 0809 and.w r8, r8, r9 80234aa: f018 0fff tst.w r8, #255 ; 0xff 80234ae: d116 bne.n 80234de 80234b0: f64f 71ff movw r1, #65535 ; 0xffff 80234b4: 4638 mov r0, r7 80234b6: f6c7 717f movt r1, #32639 ; 0x7f7f 80234ba: f7fd fd0d bl 8020ed8 <__aeabi_fcmpgt> 80234be: b9a0 cbnz r0, 80234ea 80234c0: 4638 mov r0, r7 80234c2: f46f 0100 mvn.w r1, #8388608 ; 0x800000 80234c6: f7fd fce9 bl 8020e9c <__aeabi_fcmplt> 80234ca: b158 cbz r0, 80234e4 80234cc: 4620 mov r0, r4 80234ce: 4629 mov r1, r5 80234d0: f04f 32ff mov.w r2, #4294967295 80234d4: f46f 1380 mvn.w r3, #1048576 ; 0x100000 80234d8: f7fd fae4 bl 8020aa4 <__aeabi_dcmplt> 80234dc: b910 cbnz r0, 80234e4 80234de: 6833 ldr r3, [r6, #0] 80234e0: 2222 movs r2, #34 ; 0x22 80234e2: 601a str r2, [r3, #0] 80234e4: 4638 mov r0, r7 80234e6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80234ea: f64f 73ff movw r3, #65535 ; 0xffff 80234ee: 4620 mov r0, r4 80234f0: 4629 mov r1, r5 80234f2: f04f 32ff mov.w r2, #4294967295 80234f6: f6c7 73ef movt r3, #32751 ; 0x7fef 80234fa: f7fd faf1 bl 8020ae0 <__aeabi_dcmpgt> 80234fe: 2800 cmp r0, #0 8023500: d0ed beq.n 80234de 8023502: e7dd b.n 80234c0 8023504: f3af 8000 nop.w 08023508 <_strtol_r>: 8023508: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802350c: f240 0400 movw r4, #0 8023510: f2c2 0400 movt r4, #8192 ; 0x2000 8023514: b085 sub sp, #20 8023516: 4699 mov r9, r3 8023518: 460b mov r3, r1 802351a: f8d4 8000 ldr.w r8, [r4] 802351e: 9102 str r1, [sp, #8] 8023520: 9003 str r0, [sp, #12] 8023522: 461c mov r4, r3 8023524: f814 5b01 ldrb.w r5, [r4], #1 8023528: eb08 0105 add.w r1, r8, r5 802352c: 4623 mov r3, r4 802352e: 7849 ldrb r1, [r1, #1] 8023530: f001 0108 and.w r1, r1, #8 8023534: b2c9 uxtb r1, r1 8023536: 2900 cmp r1, #0 8023538: d1f3 bne.n 8023522 <_strtol_r+0x1a> 802353a: 2d2d cmp r5, #45 ; 0x2d 802353c: d07b beq.n 8023636 <_strtol_r+0x12e> 802353e: 2d2b cmp r5, #43 ; 0x2b 8023540: bf05 ittet eq 8023542: 4624 moveq r4, r4 8023544: 460b moveq r3, r1 8023546: 460b movne r3, r1 8023548: f814 5b01 ldrbeq.w r5, [r4], #1 802354c: f039 0110 bics.w r1, r9, #16 8023550: d112 bne.n 8023578 <_strtol_r+0x70> 8023552: f1d9 0001 rsbs r0, r9, #1 8023556: bf38 it cc 8023558: 2000 movcc r0, #0 802355a: 2d30 cmp r5, #48 ; 0x30 802355c: d004 beq.n 8023568 <_strtol_r+0x60> 802355e: b158 cbz r0, 8023578 <_strtol_r+0x70> 8023560: f04f 090a mov.w r9, #10 8023564: 46cb mov fp, r9 8023566: e008 b.n 802357a <_strtol_r+0x72> 8023568: 7821 ldrb r1, [r4, #0] 802356a: f001 01df and.w r1, r1, #223 ; 0xdf 802356e: 2958 cmp r1, #88 ; 0x58 8023570: d065 beq.n 802363e <_strtol_r+0x136> 8023572: b108 cbz r0, 8023578 <_strtol_r+0x70> 8023574: f04f 0908 mov.w r9, #8 8023578: 46cb mov fp, r9 802357a: 2b00 cmp r3, #0 802357c: 4659 mov r1, fp 802357e: bf0c ite eq 8023580: f06f 4600 mvneq.w r6, #2147483648 ; 0x80000000 8023584: f04f 4600 movne.w r6, #2147483648 ; 0x80000000 8023588: e88d 000c stmia.w sp, {r2, r3} 802358c: 4630 mov r0, r6 802358e: 2700 movs r7, #0 8023590: f7fe f964 bl 802185c <__aeabi_uidivmod> 8023594: 4630 mov r0, r6 8023596: 468a mov sl, r1 8023598: 4659 mov r1, fp 802359a: f7fe f831 bl 8021600 <__aeabi_uidiv> 802359e: 46bc mov ip, r7 80235a0: e89d 000c ldmia.w sp, {r2, r3} 80235a4: e016 b.n 80235d4 <_strtol_r+0xcc> 80235a6: 3d30 subs r5, #48 ; 0x30 80235a8: 45a9 cmp r9, r5 80235aa: dd25 ble.n 80235f8 <_strtol_r+0xf0> 80235ac: 4584 cmp ip, r0 80235ae: bf94 ite ls 80235b0: 2100 movls r1, #0 80235b2: 2101 movhi r1, #1 80235b4: ea51 77d7 orrs.w r7, r1, r7, lsr #31 80235b8: d129 bne.n 802360e <_strtol_r+0x106> 80235ba: 4555 cmp r5, sl 80235bc: bfd4 ite le 80235be: 2100 movle r1, #0 80235c0: 2101 movgt r1, #1 80235c2: 4584 cmp ip, r0 80235c4: bf18 it ne 80235c6: 2100 movne r1, #0 80235c8: bb09 cbnz r1, 802360e <_strtol_r+0x106> 80235ca: fb0b 5c0c mla ip, fp, ip, r5 80235ce: 2701 movs r7, #1 80235d0: f814 5b01 ldrb.w r5, [r4], #1 80235d4: eb08 0105 add.w r1, r8, r5 80235d8: 7849 ldrb r1, [r1, #1] 80235da: f001 0604 and.w r6, r1, #4 80235de: b2f6 uxtb r6, r6 80235e0: 2e00 cmp r6, #0 80235e2: d1e0 bne.n 80235a6 <_strtol_r+0x9e> 80235e4: f011 0103 ands.w r1, r1, #3 80235e8: d006 beq.n 80235f8 <_strtol_r+0xf0> 80235ea: 2901 cmp r1, #1 80235ec: bf14 ite ne 80235ee: 2157 movne r1, #87 ; 0x57 80235f0: 2137 moveq r1, #55 ; 0x37 80235f2: 1a6d subs r5, r5, r1 80235f4: 45a9 cmp r9, r5 80235f6: dcd9 bgt.n 80235ac <_strtol_r+0xa4> 80235f8: 1c79 adds r1, r7, #1 80235fa: d00b beq.n 8023614 <_strtol_r+0x10c> 80235fc: b9c3 cbnz r3, 8023630 <_strtol_r+0x128> 80235fe: 4660 mov r0, ip 8023600: b112 cbz r2, 8023608 <_strtol_r+0x100> 8023602: b997 cbnz r7, 802362a <_strtol_r+0x122> 8023604: 9b02 ldr r3, [sp, #8] 8023606: 6013 str r3, [r2, #0] 8023608: b005 add sp, #20 802360a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802360e: f04f 37ff mov.w r7, #4294967295 8023612: e7dd b.n 80235d0 <_strtol_r+0xc8> 8023614: 9903 ldr r1, [sp, #12] 8023616: 2b00 cmp r3, #0 8023618: bf0c ite eq 802361a: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 802361e: f04f 4000 movne.w r0, #2147483648 ; 0x80000000 8023622: 2322 movs r3, #34 ; 0x22 8023624: 600b str r3, [r1, #0] 8023626: 2a00 cmp r2, #0 8023628: d0ee beq.n 8023608 <_strtol_r+0x100> 802362a: 3c01 subs r4, #1 802362c: 9402 str r4, [sp, #8] 802362e: e7e9 b.n 8023604 <_strtol_r+0xfc> 8023630: f1cc 0c00 rsb ip, ip, #0 8023634: e7e3 b.n 80235fe <_strtol_r+0xf6> 8023636: f814 5b01 ldrb.w r5, [r4], #1 802363a: 2301 movs r3, #1 802363c: e786 b.n 802354c <_strtol_r+0x44> 802363e: f04f 0910 mov.w r9, #16 8023642: 7865 ldrb r5, [r4, #1] 8023644: 46cb mov fp, r9 8023646: 3402 adds r4, #2 8023648: e797 b.n 802357a <_strtol_r+0x72> 802364a: bf00 nop 0802364c : 802364c: b430 push {r4, r5} 802364e: f240 042c movw r4, #44 ; 0x2c 8023652: f2c2 0400 movt r4, #8192 ; 0x2000 8023656: 460d mov r5, r1 8023658: 4613 mov r3, r2 802365a: 4601 mov r1, r0 802365c: 462a mov r2, r5 802365e: 6820 ldr r0, [r4, #0] 8023660: bc30 pop {r4, r5} 8023662: f7ff bf51 b.w 8023508 <_strtol_r> 8023666: bf00 nop 08023668 <_malloc_trim_r>: 8023668: b5f8 push {r3, r4, r5, r6, r7, lr} 802366a: f240 149c movw r4, #412 ; 0x19c 802366e: f2c2 0400 movt r4, #8192 ; 0x2000 8023672: 460f mov r7, r1 8023674: 4605 mov r5, r0 8023676: f001 f895 bl 80247a4 <__malloc_lock> 802367a: 68a3 ldr r3, [r4, #8] 802367c: 685e ldr r6, [r3, #4] 802367e: f026 0603 bic.w r6, r6, #3 8023682: f606 73ef addw r3, r6, #4079 ; 0xfef 8023686: 1bdf subs r7, r3, r7 8023688: 0b3f lsrs r7, r7, #12 802368a: 3f01 subs r7, #1 802368c: 033f lsls r7, r7, #12 802368e: f5b7 5f80 cmp.w r7, #4096 ; 0x1000 8023692: db07 blt.n 80236a4 <_malloc_trim_r+0x3c> 8023694: 2100 movs r1, #0 8023696: 4628 mov r0, r5 8023698: f001 fd10 bl 80250bc <_sbrk_r> 802369c: 68a3 ldr r3, [r4, #8] 802369e: 199b adds r3, r3, r6 80236a0: 4298 cmp r0, r3 80236a2: d004 beq.n 80236ae <_malloc_trim_r+0x46> 80236a4: 4628 mov r0, r5 80236a6: f001 f87f bl 80247a8 <__malloc_unlock> 80236aa: 2000 movs r0, #0 80236ac: bdf8 pop {r3, r4, r5, r6, r7, pc} 80236ae: 4279 negs r1, r7 80236b0: 4628 mov r0, r5 80236b2: f001 fd03 bl 80250bc <_sbrk_r> 80236b6: 3001 adds r0, #1 80236b8: d010 beq.n 80236dc <_malloc_trim_r+0x74> 80236ba: f641 13a8 movw r3, #6568 ; 0x19a8 80236be: 68a1 ldr r1, [r4, #8] 80236c0: f2c2 0300 movt r3, #8192 ; 0x2000 80236c4: 1bf6 subs r6, r6, r7 80236c6: 4628 mov r0, r5 80236c8: f046 0601 orr.w r6, r6, #1 80236cc: 681a ldr r2, [r3, #0] 80236ce: 604e str r6, [r1, #4] 80236d0: 1bd7 subs r7, r2, r7 80236d2: 601f str r7, [r3, #0] 80236d4: f001 f868 bl 80247a8 <__malloc_unlock> 80236d8: 2001 movs r0, #1 80236da: bdf8 pop {r3, r4, r5, r6, r7, pc} 80236dc: 2100 movs r1, #0 80236de: 4628 mov r0, r5 80236e0: f001 fcec bl 80250bc <_sbrk_r> 80236e4: 68a3 ldr r3, [r4, #8] 80236e6: 1ac2 subs r2, r0, r3 80236e8: 2a0f cmp r2, #15 80236ea: dddb ble.n 80236a4 <_malloc_trim_r+0x3c> 80236ec: f240 54a4 movw r4, #1444 ; 0x5a4 80236f0: f641 11a8 movw r1, #6568 ; 0x19a8 80236f4: f2c2 0400 movt r4, #8192 ; 0x2000 80236f8: f2c2 0100 movt r1, #8192 ; 0x2000 80236fc: f042 0201 orr.w r2, r2, #1 8023700: 605a str r2, [r3, #4] 8023702: 6823 ldr r3, [r4, #0] 8023704: 1ac0 subs r0, r0, r3 8023706: 6008 str r0, [r1, #0] 8023708: e7cc b.n 80236a4 <_malloc_trim_r+0x3c> 802370a: bf00 nop 0802370c <_free_r>: 802370c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8023710: 460e mov r6, r1 8023712: 4680 mov r8, r0 8023714: 2900 cmp r1, #0 8023716: d05c beq.n 80237d2 <_free_r+0xc6> 8023718: f001 f844 bl 80247a4 <__malloc_lock> 802371c: f240 159c movw r5, #412 ; 0x19c 8023720: f856 1c04 ldr.w r1, [r6, #-4] 8023724: f2c2 0500 movt r5, #8192 ; 0x2000 8023728: f1a6 0408 sub.w r4, r6, #8 802372c: f021 0301 bic.w r3, r1, #1 8023730: 68af ldr r7, [r5, #8] 8023732: 18e2 adds r2, r4, r3 8023734: 4297 cmp r7, r2 8023736: 6850 ldr r0, [r2, #4] 8023738: f020 0003 bic.w r0, r0, #3 802373c: d067 beq.n 802380e <_free_r+0x102> 802373e: f011 0101 ands.w r1, r1, #1 8023742: 6050 str r0, [r2, #4] 8023744: d035 beq.n 80237b2 <_free_r+0xa6> 8023746: 2100 movs r1, #0 8023748: 1816 adds r6, r2, r0 802374a: 6876 ldr r6, [r6, #4] 802374c: f016 0f01 tst.w r6, #1 8023750: d106 bne.n 8023760 <_free_r+0x54> 8023752: 181b adds r3, r3, r0 8023754: 6890 ldr r0, [r2, #8] 8023756: 2900 cmp r1, #0 8023758: d04d beq.n 80237f6 <_free_r+0xea> 802375a: 68d2 ldr r2, [r2, #12] 802375c: 60c2 str r2, [r0, #12] 802375e: 6090 str r0, [r2, #8] 8023760: f043 0201 orr.w r2, r3, #1 8023764: 50e3 str r3, [r4, r3] 8023766: 6062 str r2, [r4, #4] 8023768: b9f1 cbnz r1, 80237a8 <_free_r+0x9c> 802376a: f5b3 7f00 cmp.w r3, #512 ; 0x200 802376e: d332 bcc.n 80237d6 <_free_r+0xca> 8023770: 0a5a lsrs r2, r3, #9 8023772: 2a04 cmp r2, #4 8023774: d86c bhi.n 8023850 <_free_r+0x144> 8023776: 0998 lsrs r0, r3, #6 8023778: 3038 adds r0, #56 ; 0x38 802377a: 0041 lsls r1, r0, #1 802377c: eb05 0581 add.w r5, r5, r1, lsl #2 8023780: f240 119c movw r1, #412 ; 0x19c 8023784: f2c2 0100 movt r1, #8192 ; 0x2000 8023788: 68aa ldr r2, [r5, #8] 802378a: 42aa cmp r2, r5 802378c: d06b beq.n 8023866 <_free_r+0x15a> 802378e: 6851 ldr r1, [r2, #4] 8023790: f021 0103 bic.w r1, r1, #3 8023794: 428b cmp r3, r1 8023796: d202 bcs.n 802379e <_free_r+0x92> 8023798: 6892 ldr r2, [r2, #8] 802379a: 4295 cmp r5, r2 802379c: d1f7 bne.n 802378e <_free_r+0x82> 802379e: 68d3 ldr r3, [r2, #12] 80237a0: 60e3 str r3, [r4, #12] 80237a2: 60a2 str r2, [r4, #8] 80237a4: 60d4 str r4, [r2, #12] 80237a6: 609c str r4, [r3, #8] 80237a8: 4640 mov r0, r8 80237aa: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 80237ae: f000 bffb b.w 80247a8 <__malloc_unlock> 80237b2: f856 6c08 ldr.w r6, [r6, #-8] 80237b6: f105 0c08 add.w ip, r5, #8 80237ba: 1ba4 subs r4, r4, r6 80237bc: 199b adds r3, r3, r6 80237be: 68a6 ldr r6, [r4, #8] 80237c0: 4566 cmp r6, ip 80237c2: d043 beq.n 802384c <_free_r+0x140> 80237c4: f8d4 c00c ldr.w ip, [r4, #12] 80237c8: f8c6 c00c str.w ip, [r6, #12] 80237cc: f8cc 6008 str.w r6, [ip, #8] 80237d0: e7ba b.n 8023748 <_free_r+0x3c> 80237d2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80237d6: 08db lsrs r3, r3, #3 80237d8: 2101 movs r1, #1 80237da: 6868 ldr r0, [r5, #4] 80237dc: eb05 02c3 add.w r2, r5, r3, lsl #3 80237e0: 109b asrs r3, r3, #2 80237e2: fa01 f303 lsl.w r3, r1, r3 80237e6: 60e2 str r2, [r4, #12] 80237e8: 6891 ldr r1, [r2, #8] 80237ea: 4318 orrs r0, r3 80237ec: 6068 str r0, [r5, #4] 80237ee: 60a1 str r1, [r4, #8] 80237f0: 60cc str r4, [r1, #12] 80237f2: 6094 str r4, [r2, #8] 80237f4: e7d8 b.n 80237a8 <_free_r+0x9c> 80237f6: 4e29 ldr r6, [pc, #164] ; (802389c <_free_r+0x190>) 80237f8: 42b0 cmp r0, r6 80237fa: d1ae bne.n 802375a <_free_r+0x4e> 80237fc: 616c str r4, [r5, #20] 80237fe: f043 0201 orr.w r2, r3, #1 8023802: 612c str r4, [r5, #16] 8023804: 60e0 str r0, [r4, #12] 8023806: 60a0 str r0, [r4, #8] 8023808: 6062 str r2, [r4, #4] 802380a: 50e3 str r3, [r4, r3] 802380c: e7cc b.n 80237a8 <_free_r+0x9c> 802380e: 18c0 adds r0, r0, r3 8023810: 07cb lsls r3, r1, #31 8023812: d407 bmi.n 8023824 <_free_r+0x118> 8023814: f856 3c08 ldr.w r3, [r6, #-8] 8023818: 1ae4 subs r4, r4, r3 802381a: 18c0 adds r0, r0, r3 802381c: 68a2 ldr r2, [r4, #8] 802381e: 68e3 ldr r3, [r4, #12] 8023820: 60d3 str r3, [r2, #12] 8023822: 609a str r2, [r3, #8] 8023824: f240 52a8 movw r2, #1448 ; 0x5a8 8023828: f040 0301 orr.w r3, r0, #1 802382c: f2c2 0200 movt r2, #8192 ; 0x2000 8023830: 6063 str r3, [r4, #4] 8023832: 60ac str r4, [r5, #8] 8023834: 6813 ldr r3, [r2, #0] 8023836: 4298 cmp r0, r3 8023838: d3b6 bcc.n 80237a8 <_free_r+0x9c> 802383a: f641 13a4 movw r3, #6564 ; 0x19a4 802383e: 4640 mov r0, r8 8023840: f2c2 0300 movt r3, #8192 ; 0x2000 8023844: 6819 ldr r1, [r3, #0] 8023846: f7ff ff0f bl 8023668 <_malloc_trim_r> 802384a: e7ad b.n 80237a8 <_free_r+0x9c> 802384c: 2101 movs r1, #1 802384e: e77b b.n 8023748 <_free_r+0x3c> 8023850: f102 005b add.w r0, r2, #91 ; 0x5b 8023854: 0041 lsls r1, r0, #1 8023856: 2a14 cmp r2, #20 8023858: d990 bls.n 802377c <_free_r+0x70> 802385a: 2a54 cmp r2, #84 ; 0x54 802385c: d80c bhi.n 8023878 <_free_r+0x16c> 802385e: 0b18 lsrs r0, r3, #12 8023860: 306e adds r0, #110 ; 0x6e 8023862: 0041 lsls r1, r0, #1 8023864: e78a b.n 802377c <_free_r+0x70> 8023866: 2601 movs r6, #1 8023868: 684d ldr r5, [r1, #4] 802386a: 1080 asrs r0, r0, #2 802386c: 4613 mov r3, r2 802386e: fa06 f000 lsl.w r0, r6, r0 8023872: 4305 orrs r5, r0 8023874: 604d str r5, [r1, #4] 8023876: e793 b.n 80237a0 <_free_r+0x94> 8023878: f5b2 7faa cmp.w r2, #340 ; 0x154 802387c: d803 bhi.n 8023886 <_free_r+0x17a> 802387e: 0bd8 lsrs r0, r3, #15 8023880: 3077 adds r0, #119 ; 0x77 8023882: 0041 lsls r1, r0, #1 8023884: e77a b.n 802377c <_free_r+0x70> 8023886: f240 5154 movw r1, #1364 ; 0x554 802388a: 428a cmp r2, r1 802388c: d803 bhi.n 8023896 <_free_r+0x18a> 802388e: 0c98 lsrs r0, r3, #18 8023890: 307c adds r0, #124 ; 0x7c 8023892: 0041 lsls r1, r0, #1 8023894: e772 b.n 802377c <_free_r+0x70> 8023896: 21fc movs r1, #252 ; 0xfc 8023898: 207e movs r0, #126 ; 0x7e 802389a: e76f b.n 802377c <_free_r+0x70> 802389c: 200001a4 .word 0x200001a4 080238a0 : 80238a0: 6902 ldr r2, [r0, #16] 80238a2: 114b asrs r3, r1, #5 80238a4: e92d 01f0 stmdb sp!, {r4, r5, r6, r7, r8} 80238a8: 4293 cmp r3, r2 80238aa: f100 0714 add.w r7, r0, #20 80238ae: da2d bge.n 802390c 80238b0: 3304 adds r3, #4 80238b2: eb00 0282 add.w r2, r0, r2, lsl #2 80238b6: 3214 adds r2, #20 80238b8: f011 011f ands.w r1, r1, #31 80238bc: eb00 0383 add.w r3, r0, r3, lsl #2 80238c0: f103 0c04 add.w ip, r3, #4 80238c4: d029 beq.n 802391a 80238c6: 685c ldr r4, [r3, #4] 80238c8: f10c 0304 add.w r3, ip, #4 80238cc: 429a cmp r2, r3 80238ce: f1c1 0820 rsb r8, r1, #32 80238d2: fa24 f401 lsr.w r4, r4, r1 80238d6: d938 bls.n 802394a 80238d8: 463d mov r5, r7 80238da: 681e ldr r6, [r3, #0] 80238dc: fa06 f608 lsl.w r6, r6, r8 80238e0: 4334 orrs r4, r6 80238e2: f845 4b04 str.w r4, [r5], #4 80238e6: f853 4b04 ldr.w r4, [r3], #4 80238ea: 429a cmp r2, r3 80238ec: fa24 f401 lsr.w r4, r4, r1 80238f0: d8f3 bhi.n 80238da 80238f2: ebcc 0302 rsb r3, ip, r2 80238f6: 3b05 subs r3, #5 80238f8: f023 0303 bic.w r3, r3, #3 80238fc: 18c3 adds r3, r0, r3 80238fe: 3318 adds r3, #24 8023900: 601c str r4, [r3, #0] 8023902: b1e4 cbz r4, 802393e 8023904: 3304 adds r3, #4 8023906: 1bdf subs r7, r3, r7 8023908: 10bf asrs r7, r7, #2 802390a: e01a b.n 8023942 802390c: 2300 movs r3, #0 802390e: 6103 str r3, [r0, #16] 8023910: 2300 movs r3, #0 8023912: 6143 str r3, [r0, #20] 8023914: e8bd 01f0 ldmia.w sp!, {r4, r5, r6, r7, r8} 8023918: 4770 bx lr 802391a: 4562 cmp r2, ip 802391c: bf84 itt hi 802391e: 4663 movhi r3, ip 8023920: 4639 movhi r1, r7 8023922: d9f3 bls.n 802390c 8023924: f853 4b04 ldr.w r4, [r3], #4 8023928: 429a cmp r2, r3 802392a: f841 4b04 str.w r4, [r1], #4 802392e: d8f9 bhi.n 8023924 8023930: ea6f 030c mvn.w r3, ip 8023934: 189b adds r3, r3, r2 8023936: f023 0303 bic.w r3, r3, #3 802393a: 18c3 adds r3, r0, r3 802393c: 3318 adds r3, #24 802393e: 1bdf subs r7, r3, r7 8023940: 10bf asrs r7, r7, #2 8023942: 6107 str r7, [r0, #16] 8023944: 2f00 cmp r7, #0 8023946: d1e5 bne.n 8023914 8023948: e7e2 b.n 8023910 802394a: 463b mov r3, r7 802394c: e7d8 b.n 8023900 802394e: bf00 nop 08023950 <__hexdig_init>: 8023950: f641 60e4 movw r0, #7908 ; 0x1ee4 8023954: f245 230c movw r3, #21004 ; 0x520c 8023958: f6c0 0004 movt r0, #2052 ; 0x804 802395c: 2110 movs r1, #16 802395e: 2230 movs r2, #48 ; 0x30 8023960: f2c2 0301 movt r3, #8193 ; 0x2001 8023964: 5499 strb r1, [r3, r2] 8023966: 3101 adds r1, #1 8023968: f810 2f01 ldrb.w r2, [r0, #1]! 802396c: b2c9 uxtb r1, r1 802396e: 2a00 cmp r2, #0 8023970: d1f8 bne.n 8023964 <__hexdig_init+0x14> 8023972: f641 60dc movw r0, #7900 ; 0x1edc 8023976: 211a movs r1, #26 8023978: f6c0 0004 movt r0, #2052 ; 0x804 802397c: 2261 movs r2, #97 ; 0x61 802397e: 5499 strb r1, [r3, r2] 8023980: 3101 adds r1, #1 8023982: f810 2f01 ldrb.w r2, [r0, #1]! 8023986: b2c9 uxtb r1, r1 8023988: 2a00 cmp r2, #0 802398a: d1f8 bne.n 802397e <__hexdig_init+0x2e> 802398c: f641 60d4 movw r0, #7892 ; 0x1ed4 8023990: 211a movs r1, #26 8023992: f6c0 0004 movt r0, #2052 ; 0x804 8023996: 2241 movs r2, #65 ; 0x41 8023998: 5499 strb r1, [r3, r2] 802399a: 3101 adds r1, #1 802399c: f810 2f01 ldrb.w r2, [r0, #1]! 80239a0: b2c9 uxtb r1, r1 80239a2: 2a00 cmp r2, #0 80239a4: d1f8 bne.n 8023998 <__hexdig_init+0x48> 80239a6: 4770 bx lr 080239a8 <__gethex>: 80239a8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80239ac: b08b sub sp, #44 ; 0x2c 80239ae: 4688 mov r8, r1 80239b0: f245 260c movw r6, #21004 ; 0x520c 80239b4: 9206 str r2, [sp, #24] 80239b6: f2c2 0601 movt r6, #8193 ; 0x2001 80239ba: 9309 str r3, [sp, #36] ; 0x24 80239bc: 9007 str r0, [sp, #28] 80239be: f000 fbb9 bl 8024134 <_localeconv_r> 80239c2: 6800 ldr r0, [r0, #0] 80239c4: 9002 str r0, [sp, #8] 80239c6: f7fe fa53 bl 8021e70 80239ca: 9b02 ldr r3, [sp, #8] 80239cc: 181a adds r2, r3, r0 80239ce: f896 3030 ldrb.w r3, [r6, #48] ; 0x30 80239d2: 9003 str r0, [sp, #12] 80239d4: f812 ac01 ldrb.w sl, [r2, #-1] 80239d8: 2b00 cmp r3, #0 80239da: f000 810e beq.w 8023bfa <__gethex+0x252> 80239de: f8d8 3000 ldr.w r3, [r8] 80239e2: 1c9d adds r5, r3, #2 80239e4: 789a ldrb r2, [r3, #2] 80239e6: 2a30 cmp r2, #48 ; 0x30 80239e8: f040 8200 bne.w 8023dec <__gethex+0x444> 80239ec: 3303 adds r3, #3 80239ee: 2700 movs r7, #0 80239f0: 461d mov r5, r3 80239f2: f813 2b01 ldrb.w r2, [r3], #1 80239f6: 3701 adds r7, #1 80239f8: 2a30 cmp r2, #48 ; 0x30 80239fa: d0f9 beq.n 80239f0 <__gethex+0x48> 80239fc: f816 b002 ldrb.w fp, [r6, r2] 8023a00: f245 290c movw r9, #21004 ; 0x520c 8023a04: f2c2 0901 movt r9, #8193 ; 0x2001 8023a08: f1bb 0f00 cmp.w fp, #0 8023a0c: f000 80f8 beq.w 8023c00 <__gethex+0x258> 8023a10: 782b ldrb r3, [r5, #0] 8023a12: f04f 0b00 mov.w fp, #0 8023a16: f819 4003 ldrb.w r4, [r9, r3] 8023a1a: 2c00 cmp r4, #0 8023a1c: f000 8200 beq.w 8023e20 <__gethex+0x478> 8023a20: 1c6a adds r2, r5, #1 8023a22: 4614 mov r4, r2 8023a24: 3201 adds r2, #1 8023a26: 7823 ldrb r3, [r4, #0] 8023a28: 5cf3 ldrb r3, [r6, r3] 8023a2a: 2b00 cmp r3, #0 8023a2c: d1f9 bne.n 8023a22 <__gethex+0x7a> 8023a2e: 4699 mov r9, r3 8023a30: 4620 mov r0, r4 8023a32: 9902 ldr r1, [sp, #8] 8023a34: 9a03 ldr r2, [sp, #12] 8023a36: f7fe fa7d bl 8021f34 8023a3a: b1e8 cbz r0, 8023a78 <__gethex+0xd0> 8023a3c: 7823 ldrb r3, [r4, #0] 8023a3e: f1bb 0f00 cmp.w fp, #0 8023a42: f000 81c1 beq.w 8023dc8 <__gethex+0x420> 8023a46: ebc4 0b0b rsb fp, r4, fp 8023a4a: ea4f 028b mov.w r2, fp, lsl #2 8023a4e: 9205 str r2, [sp, #20] 8023a50: 2b50 cmp r3, #80 ; 0x50 8023a52: f000 809b beq.w 8023b8c <__gethex+0x1e4> 8023a56: 2b70 cmp r3, #112 ; 0x70 8023a58: f000 8098 beq.w 8023b8c <__gethex+0x1e4> 8023a5c: 4622 mov r2, r4 8023a5e: f8c8 2000 str.w r2, [r8] 8023a62: f1b9 0f00 cmp.w r9, #0 8023a66: d00d beq.n 8023a84 <__gethex+0xdc> 8023a68: 2f00 cmp r7, #0 8023a6a: bf0c ite eq 8023a6c: 2706 moveq r7, #6 8023a6e: 2700 movne r7, #0 8023a70: 4638 mov r0, r7 8023a72: b00b add sp, #44 ; 0x2c 8023a74: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8023a78: f1bb 0f00 cmp.w fp, #0 8023a7c: f000 81be beq.w 8023dfc <__gethex+0x454> 8023a80: 7823 ldrb r3, [r4, #0] 8023a82: e7e0 b.n 8023a46 <__gethex+0x9e> 8023a84: 1b63 subs r3, r4, r5 8023a86: 4649 mov r1, r9 8023a88: 3b01 subs r3, #1 8023a8a: 2b07 cmp r3, #7 8023a8c: dd03 ble.n 8023a96 <__gethex+0xee> 8023a8e: 105b asrs r3, r3, #1 8023a90: 3101 adds r1, #1 8023a92: 2b07 cmp r3, #7 8023a94: dcfb bgt.n 8023a8e <__gethex+0xe6> 8023a96: 9807 ldr r0, [sp, #28] 8023a98: f000 fe88 bl 80247ac <_Balloc> 8023a9c: 42a5 cmp r5, r4 8023a9e: f100 0314 add.w r3, r0, #20 8023aa2: 9004 str r0, [sp, #16] 8023aa4: 9308 str r3, [sp, #32] 8023aa6: f080 81db bcs.w 8023e60 <__gethex+0x4b8> 8023aaa: 469b mov fp, r3 8023aac: 9b03 ldr r3, [sp, #12] 8023aae: f04f 0800 mov.w r8, #0 8023ab2: 4647 mov r7, r8 8023ab4: f1c3 0c01 rsb ip, r3, #1 8023ab8: e00f b.n 8023ada <__gethex+0x132> 8023aba: 2f20 cmp r7, #32 8023abc: d05f beq.n 8023b7e <__gethex+0x1d6> 8023abe: 463a mov r2, r7 8023ac0: 3704 adds r7, #4 8023ac2: f814 3c01 ldrb.w r3, [r4, #-1] 8023ac6: 464c mov r4, r9 8023ac8: 42a5 cmp r5, r4 8023aca: 5cf3 ldrb r3, [r6, r3] 8023acc: f003 030f and.w r3, r3, #15 8023ad0: fa03 f302 lsl.w r3, r3, r2 8023ad4: ea48 0803 orr.w r8, r8, r3 8023ad8: d219 bcs.n 8023b0e <__gethex+0x166> 8023ada: f814 3c01 ldrb.w r3, [r4, #-1] 8023ade: f104 39ff add.w r9, r4, #4294967295 8023ae2: 4553 cmp r3, sl 8023ae4: d1e9 bne.n 8023aba <__gethex+0x112> 8023ae6: eb09 030c add.w r3, r9, ip 8023aea: 429d cmp r5, r3 8023aec: d8e5 bhi.n 8023aba <__gethex+0x112> 8023aee: 4618 mov r0, r3 8023af0: 9902 ldr r1, [sp, #8] 8023af2: 9a03 ldr r2, [sp, #12] 8023af4: 9301 str r3, [sp, #4] 8023af6: f8cd c000 str.w ip, [sp] 8023afa: f7fe fa1b bl 8021f34 8023afe: 9b01 ldr r3, [sp, #4] 8023b00: f8dd c000 ldr.w ip, [sp] 8023b04: 2800 cmp r0, #0 8023b06: d1d8 bne.n 8023aba <__gethex+0x112> 8023b08: 461c mov r4, r3 8023b0a: 42a5 cmp r5, r4 8023b0c: d3e5 bcc.n 8023ada <__gethex+0x132> 8023b0e: 9b08 ldr r3, [sp, #32] 8023b10: 4640 mov r0, r8 8023b12: f84b 8b04 str.w r8, [fp], #4 8023b16: 9904 ldr r1, [sp, #16] 8023b18: ebc3 0b0b rsb fp, r3, fp 8023b1c: ea4f 03ab mov.w r3, fp, asr #2 8023b20: 610b str r3, [r1, #16] 8023b22: 015d lsls r5, r3, #5 8023b24: f000 ff24 bl 8024970 <__hi0bits> 8023b28: 9a06 ldr r2, [sp, #24] 8023b2a: 6814 ldr r4, [r2, #0] 8023b2c: 1a28 subs r0, r5, r0 8023b2e: 42a0 cmp r0, r4 8023b30: f300 8125 bgt.w 8023d7e <__gethex+0x3d6> 8023b34: f2c0 814b blt.w 8023dce <__gethex+0x426> 8023b38: 2500 movs r5, #0 8023b3a: 9806 ldr r0, [sp, #24] 8023b3c: 9905 ldr r1, [sp, #20] 8023b3e: 6883 ldr r3, [r0, #8] 8023b40: 4299 cmp r1, r3 8023b42: f300 80f6 bgt.w 8023d32 <__gethex+0x38a> 8023b46: 9806 ldr r0, [sp, #24] 8023b48: 9905 ldr r1, [sp, #20] 8023b4a: 6843 ldr r3, [r0, #4] 8023b4c: 4299 cmp r1, r3 8023b4e: f280 8100 bge.w 8023d52 <__gethex+0x3aa> 8023b52: 1a5e subs r6, r3, r1 8023b54: 42b4 cmp r4, r6 8023b56: dc76 bgt.n 8023c46 <__gethex+0x29e> 8023b58: 68c2 ldr r2, [r0, #12] 8023b5a: 2a02 cmp r2, #2 8023b5c: f000 816f beq.w 8023e3e <__gethex+0x496> 8023b60: 2a03 cmp r2, #3 8023b62: f000 8198 beq.w 8023e96 <__gethex+0x4ee> 8023b66: 2a01 cmp r2, #1 8023b68: f000 8186 beq.w 8023e78 <__gethex+0x4d0> 8023b6c: 9807 ldr r0, [sp, #28] 8023b6e: 2750 movs r7, #80 ; 0x50 8023b70: 9904 ldr r1, [sp, #16] 8023b72: f000 fe51 bl 8024818 <_Bfree> 8023b76: 9814 ldr r0, [sp, #80] ; 0x50 8023b78: 2300 movs r3, #0 8023b7a: 6003 str r3, [r0, #0] 8023b7c: e778 b.n 8023a70 <__gethex+0xc8> 8023b7e: f84b 8b04 str.w r8, [fp], #4 8023b82: f04f 0800 mov.w r8, #0 8023b86: 2704 movs r7, #4 8023b88: 4642 mov r2, r8 8023b8a: e79a b.n 8023ac2 <__gethex+0x11a> 8023b8c: 7863 ldrb r3, [r4, #1] 8023b8e: 2b2b cmp r3, #43 ; 0x2b 8023b90: f000 80f2 beq.w 8023d78 <__gethex+0x3d0> 8023b94: 2b2d cmp r3, #45 ; 0x2d 8023b96: f000 80ea beq.w 8023d6e <__gethex+0x3c6> 8023b9a: 1c60 adds r0, r4, #1 8023b9c: f04f 0b00 mov.w fp, #0 8023ba0: 5cf1 ldrb r1, [r6, r3] 8023ba2: f245 230c movw r3, #21004 ; 0x520c 8023ba6: f2c2 0301 movt r3, #8193 ; 0x2001 8023baa: 2900 cmp r1, #0 8023bac: f43f af56 beq.w 8023a5c <__gethex+0xb4> 8023bb0: 2919 cmp r1, #25 8023bb2: f73f af53 bgt.w 8023a5c <__gethex+0xb4> 8023bb6: f890 c001 ldrb.w ip, [r0, #1] 8023bba: 3910 subs r1, #16 8023bbc: 1c42 adds r2, r0, #1 8023bbe: f813 300c ldrb.w r3, [r3, ip] 8023bc2: b193 cbz r3, 8023bea <__gethex+0x242> 8023bc4: 2b19 cmp r3, #25 8023bc6: dc10 bgt.n 8023bea <__gethex+0x242> 8023bc8: 3002 adds r0, #2 8023bca: e001 b.n 8023bd0 <__gethex+0x228> 8023bcc: 2b19 cmp r3, #25 8023bce: dc0c bgt.n 8023bea <__gethex+0x242> 8023bd0: 4602 mov r2, r0 8023bd2: eb01 0181 add.w r1, r1, r1, lsl #2 8023bd6: 3001 adds r0, #1 8023bd8: f892 c000 ldrb.w ip, [r2] 8023bdc: eb03 0141 add.w r1, r3, r1, lsl #1 8023be0: 3910 subs r1, #16 8023be2: f816 300c ldrb.w r3, [r6, ip] 8023be6: 2b00 cmp r3, #0 8023be8: d1f0 bne.n 8023bcc <__gethex+0x224> 8023bea: f1bb 0f00 cmp.w fp, #0 8023bee: d000 beq.n 8023bf2 <__gethex+0x24a> 8023bf0: 4249 negs r1, r1 8023bf2: 9b05 ldr r3, [sp, #20] 8023bf4: 185b adds r3, r3, r1 8023bf6: 9305 str r3, [sp, #20] 8023bf8: e731 b.n 8023a5e <__gethex+0xb6> 8023bfa: f7ff fea9 bl 8023950 <__hexdig_init> 8023bfe: e6ee b.n 80239de <__gethex+0x36> 8023c00: 4628 mov r0, r5 8023c02: 9902 ldr r1, [sp, #8] 8023c04: 9a03 ldr r2, [sp, #12] 8023c06: f7fe f995 bl 8021f34 8023c0a: 2800 cmp r0, #0 8023c0c: f040 809a bne.w 8023d44 <__gethex+0x39c> 8023c10: 9803 ldr r0, [sp, #12] 8023c12: 182c adds r4, r5, r0 8023c14: 5c2b ldrb r3, [r5, r0] 8023c16: f819 2003 ldrb.w r2, [r9, r3] 8023c1a: 2a00 cmp r2, #0 8023c1c: f000 80e8 beq.w 8023df0 <__gethex+0x448> 8023c20: 2b30 cmp r3, #48 ; 0x30 8023c22: f040 8108 bne.w 8023e36 <__gethex+0x48e> 8023c26: 1c63 adds r3, r4, #1 8023c28: 461d mov r5, r3 8023c2a: f813 2b01 ldrb.w r2, [r3], #1 8023c2e: 2a30 cmp r2, #48 ; 0x30 8023c30: d0fa beq.n 8023c28 <__gethex+0x280> 8023c32: 5cb3 ldrb r3, [r6, r2] 8023c34: 2b00 cmp r3, #0 8023c36: f040 80ff bne.w 8023e38 <__gethex+0x490> 8023c3a: f04f 0901 mov.w r9, #1 8023c3e: 46a3 mov fp, r4 8023c40: 464f mov r7, r9 8023c42: 462c mov r4, r5 8023c44: e6f4 b.n 8023a30 <__gethex+0x88> 8023c46: 1e77 subs r7, r6, #1 8023c48: 2d00 cmp r5, #0 8023c4a: f040 80e7 bne.w 8023e1c <__gethex+0x474> 8023c4e: 2f00 cmp r7, #0 8023c50: dd04 ble.n 8023c5c <__gethex+0x2b4> 8023c52: 9804 ldr r0, [sp, #16] 8023c54: 4639 mov r1, r7 8023c56: f001 fa05 bl 8025064 <__any_on> 8023c5a: 4605 mov r5, r0 8023c5c: 9908 ldr r1, [sp, #32] 8023c5e: 117b asrs r3, r7, #5 8023c60: 2201 movs r2, #1 8023c62: f007 071f and.w r7, r7, #31 8023c66: 9804 ldr r0, [sp, #16] 8023c68: 1ba4 subs r4, r4, r6 8023c6a: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8023c6e: fa02 f207 lsl.w r2, r2, r7 8023c72: 4631 mov r1, r6 8023c74: 421a tst r2, r3 8023c76: bf18 it ne 8023c78: f045 0502 orrne.w r5, r5, #2 8023c7c: f7ff fe10 bl 80238a0 8023c80: 9b06 ldr r3, [sp, #24] 8023c82: 2702 movs r7, #2 8023c84: 685b ldr r3, [r3, #4] 8023c86: 9305 str r3, [sp, #20] 8023c88: 2d00 cmp r5, #0 8023c8a: d069 beq.n 8023d60 <__gethex+0x3b8> 8023c8c: 9806 ldr r0, [sp, #24] 8023c8e: 68c3 ldr r3, [r0, #12] 8023c90: 2b02 cmp r3, #2 8023c92: f000 80ea beq.w 8023e6a <__gethex+0x4c2> 8023c96: 2b03 cmp r3, #3 8023c98: d05d beq.n 8023d56 <__gethex+0x3ae> 8023c9a: 2b01 cmp r3, #1 8023c9c: d15e bne.n 8023d5c <__gethex+0x3b4> 8023c9e: 07aa lsls r2, r5, #30 8023ca0: d55c bpl.n 8023d5c <__gethex+0x3b4> 8023ca2: 9908 ldr r1, [sp, #32] 8023ca4: 680b ldr r3, [r1, #0] 8023ca6: 432b orrs r3, r5 8023ca8: 07db lsls r3, r3, #31 8023caa: d557 bpl.n 8023d5c <__gethex+0x3b4> 8023cac: 9b04 ldr r3, [sp, #16] 8023cae: 2600 movs r6, #0 8023cb0: 9904 ldr r1, [sp, #16] 8023cb2: 691d ldr r5, [r3, #16] 8023cb4: 9b08 ldr r3, [sp, #32] 8023cb6: eb01 0085 add.w r0, r1, r5, lsl #2 8023cba: 3014 adds r0, #20 8023cbc: 4619 mov r1, r3 8023cbe: f853 2b04 ldr.w r2, [r3], #4 8023cc2: f1b2 3fff cmp.w r2, #4294967295 8023cc6: f040 80eb bne.w 8023ea0 <__gethex+0x4f8> 8023cca: 4298 cmp r0, r3 8023ccc: f843 6c04 str.w r6, [r3, #-4] 8023cd0: d8f4 bhi.n 8023cbc <__gethex+0x314> 8023cd2: 9a04 ldr r2, [sp, #16] 8023cd4: 6893 ldr r3, [r2, #8] 8023cd6: 429d cmp r5, r3 8023cd8: bfb8 it lt 8023cda: 462b movlt r3, r5 8023cdc: f280 80f9 bge.w 8023ed2 <__gethex+0x52a> 8023ce0: 9904 ldr r1, [sp, #16] 8023ce2: eb01 0283 add.w r2, r1, r3, lsl #2 8023ce6: 3301 adds r3, #1 8023ce8: 610b str r3, [r1, #16] 8023cea: 2301 movs r3, #1 8023cec: 6153 str r3, [r2, #20] 8023cee: 2f02 cmp r7, #2 8023cf0: f000 80d9 beq.w 8023ea6 <__gethex+0x4fe> 8023cf4: 9904 ldr r1, [sp, #16] 8023cf6: 690b ldr r3, [r1, #16] 8023cf8: 429d cmp r5, r3 8023cfa: db0e blt.n 8023d1a <__gethex+0x372> 8023cfc: f014 041f ands.w r4, r4, #31 8023d00: f000 80ac beq.w 8023e5c <__gethex+0x4b4> 8023d04: 9b04 ldr r3, [sp, #16] 8023d06: eb03 0585 add.w r5, r3, r5, lsl #2 8023d0a: 6928 ldr r0, [r5, #16] 8023d0c: f000 fe30 bl 8024970 <__hi0bits> 8023d10: f1c4 0320 rsb r3, r4, #32 8023d14: 4298 cmp r0, r3 8023d16: f280 80a1 bge.w 8023e5c <__gethex+0x4b4> 8023d1a: 9804 ldr r0, [sp, #16] 8023d1c: 2101 movs r1, #1 8023d1e: f7ff fdbf bl 80238a0 8023d22: 9a06 ldr r2, [sp, #24] 8023d24: 9805 ldr r0, [sp, #20] 8023d26: 6893 ldr r3, [r2, #8] 8023d28: 3001 adds r0, #1 8023d2a: 9005 str r0, [sp, #20] 8023d2c: 4298 cmp r0, r3 8023d2e: f340 8095 ble.w 8023e5c <__gethex+0x4b4> 8023d32: 9807 ldr r0, [sp, #28] 8023d34: 27a3 movs r7, #163 ; 0xa3 8023d36: 9904 ldr r1, [sp, #16] 8023d38: f000 fd6e bl 8024818 <_Bfree> 8023d3c: 9a14 ldr r2, [sp, #80] ; 0x50 8023d3e: 2300 movs r3, #0 8023d40: 6013 str r3, [r2, #0] 8023d42: e695 b.n 8023a70 <__gethex+0xc8> 8023d44: 782b ldrb r3, [r5, #0] 8023d46: 462c mov r4, r5 8023d48: f8cd b014 str.w fp, [sp, #20] 8023d4c: f04f 0901 mov.w r9, #1 8023d50: e67e b.n 8023a50 <__gethex+0xa8> 8023d52: 2701 movs r7, #1 8023d54: e798 b.n 8023c88 <__gethex+0x2e0> 8023d56: 9b15 ldr r3, [sp, #84] ; 0x54 8023d58: 2b00 cmp r3, #0 8023d5a: d1a7 bne.n 8023cac <__gethex+0x304> 8023d5c: f047 0710 orr.w r7, r7, #16 8023d60: 9b04 ldr r3, [sp, #16] 8023d62: 9814 ldr r0, [sp, #80] ; 0x50 8023d64: 6003 str r3, [r0, #0] 8023d66: 9b05 ldr r3, [sp, #20] 8023d68: 9809 ldr r0, [sp, #36] ; 0x24 8023d6a: 6003 str r3, [r0, #0] 8023d6c: e680 b.n 8023a70 <__gethex+0xc8> 8023d6e: f04f 0b01 mov.w fp, #1 8023d72: 78a3 ldrb r3, [r4, #2] 8023d74: 1ca0 adds r0, r4, #2 8023d76: e713 b.n 8023ba0 <__gethex+0x1f8> 8023d78: f04f 0b00 mov.w fp, #0 8023d7c: e7f9 b.n 8023d72 <__gethex+0x3ca> 8023d7e: 1b06 subs r6, r0, r4 8023d80: 9804 ldr r0, [sp, #16] 8023d82: 4631 mov r1, r6 8023d84: f001 f96e bl 8025064 <__any_on> 8023d88: 4605 mov r5, r0 8023d8a: b1a8 cbz r0, 8023db8 <__gethex+0x410> 8023d8c: 1e73 subs r3, r6, #1 8023d8e: 9804 ldr r0, [sp, #16] 8023d90: 2501 movs r5, #1 8023d92: f003 011f and.w r1, r3, #31 8023d96: 115a asrs r2, r3, #5 8023d98: fa05 f101 lsl.w r1, r5, r1 8023d9c: eb00 0282 add.w r2, r0, r2, lsl #2 8023da0: 6952 ldr r2, [r2, #20] 8023da2: 4211 tst r1, r2 8023da4: d008 beq.n 8023db8 <__gethex+0x410> 8023da6: 42ab cmp r3, r5 8023da8: dd05 ble.n 8023db6 <__gethex+0x40e> 8023daa: 9804 ldr r0, [sp, #16] 8023dac: 1eb1 subs r1, r6, #2 8023dae: f001 f959 bl 8025064 <__any_on> 8023db2: 2503 movs r5, #3 8023db4: b900 cbnz r0, 8023db8 <__gethex+0x410> 8023db6: 2502 movs r5, #2 8023db8: 9804 ldr r0, [sp, #16] 8023dba: 4631 mov r1, r6 8023dbc: f7ff fd70 bl 80238a0 8023dc0: 9b05 ldr r3, [sp, #20] 8023dc2: 199b adds r3, r3, r6 8023dc4: 9305 str r3, [sp, #20] 8023dc6: e6b8 b.n 8023b3a <__gethex+0x192> 8023dc8: f8cd b014 str.w fp, [sp, #20] 8023dcc: e640 b.n 8023a50 <__gethex+0xa8> 8023dce: 1a25 subs r5, r4, r0 8023dd0: 9904 ldr r1, [sp, #16] 8023dd2: 462a mov r2, r5 8023dd4: 9807 ldr r0, [sp, #28] 8023dd6: f000 ff11 bl 8024bfc <__lshift> 8023dda: 9b05 ldr r3, [sp, #20] 8023ddc: 1b5b subs r3, r3, r5 8023dde: 2500 movs r5, #0 8023de0: 9305 str r3, [sp, #20] 8023de2: 9004 str r0, [sp, #16] 8023de4: f100 0314 add.w r3, r0, #20 8023de8: 9308 str r3, [sp, #32] 8023dea: e6a6 b.n 8023b3a <__gethex+0x192> 8023dec: 2700 movs r7, #0 8023dee: e605 b.n 80239fc <__gethex+0x54> 8023df0: 9205 str r2, [sp, #20] 8023df2: f04f 0901 mov.w r9, #1 8023df6: e62b b.n 8023a50 <__gethex+0xa8> 8023df8: 462c mov r4, r5 8023dfa: 4681 mov r9, r0 8023dfc: 9903 ldr r1, [sp, #12] 8023dfe: eb04 0b01 add.w fp, r4, r1 8023e02: 5c63 ldrb r3, [r4, r1] 8023e04: 5cf2 ldrb r2, [r6, r3] 8023e06: 2a00 cmp r2, #0 8023e08: d07a beq.n 8023f00 <__gethex+0x558> 8023e0a: f10b 0201 add.w r2, fp, #1 8023e0e: 4614 mov r4, r2 8023e10: f812 3b01 ldrb.w r3, [r2], #1 8023e14: 5cf1 ldrb r1, [r6, r3] 8023e16: 2900 cmp r1, #0 8023e18: d1f9 bne.n 8023e0e <__gethex+0x466> 8023e1a: e614 b.n 8023a46 <__gethex+0x9e> 8023e1c: 2501 movs r5, #1 8023e1e: e71d b.n 8023c5c <__gethex+0x2b4> 8023e20: 4628 mov r0, r5 8023e22: 9902 ldr r1, [sp, #8] 8023e24: 9a03 ldr r2, [sp, #12] 8023e26: f7fe f885 bl 8021f34 8023e2a: 2800 cmp r0, #0 8023e2c: d0e4 beq.n 8023df8 <__gethex+0x450> 8023e2e: 46a1 mov r9, r4 8023e30: 462c mov r4, r5 8023e32: 46cb mov fp, r9 8023e34: e602 b.n 8023a3c <__gethex+0x94> 8023e36: 4625 mov r5, r4 8023e38: 46a3 mov fp, r4 8023e3a: 2701 movs r7, #1 8023e3c: e5f0 b.n 8023a20 <__gethex+0x78> 8023e3e: 9815 ldr r0, [sp, #84] ; 0x54 8023e40: 2800 cmp r0, #0 8023e42: f47f ae93 bne.w 8023b6c <__gethex+0x1c4> 8023e46: 9a09 ldr r2, [sp, #36] ; 0x24 8023e48: 2762 movs r7, #98 ; 0x62 8023e4a: 9804 ldr r0, [sp, #16] 8023e4c: 9908 ldr r1, [sp, #32] 8023e4e: 6013 str r3, [r2, #0] 8023e50: 2301 movs r3, #1 8023e52: 9a14 ldr r2, [sp, #80] ; 0x50 8023e54: 6103 str r3, [r0, #16] 8023e56: 600b str r3, [r1, #0] 8023e58: 6010 str r0, [r2, #0] 8023e5a: e609 b.n 8023a70 <__gethex+0xc8> 8023e5c: 2721 movs r7, #33 ; 0x21 8023e5e: e77f b.n 8023d60 <__gethex+0x3b8> 8023e60: f8dd b020 ldr.w fp, [sp, #32] 8023e64: f04f 0800 mov.w r8, #0 8023e68: e651 b.n 8023b0e <__gethex+0x166> 8023e6a: 9a15 ldr r2, [sp, #84] ; 0x54 8023e6c: f1c2 0301 rsb r3, r2, #1 8023e70: 2b00 cmp r3, #0 8023e72: f43f af73 beq.w 8023d5c <__gethex+0x3b4> 8023e76: e719 b.n 8023cac <__gethex+0x304> 8023e78: 42a6 cmp r6, r4 8023e7a: f47f ae77 bne.w 8023b6c <__gethex+0x1c4> 8023e7e: 2c01 cmp r4, #1 8023e80: dde1 ble.n 8023e46 <__gethex+0x49e> 8023e82: 9804 ldr r0, [sp, #16] 8023e84: 1e61 subs r1, r4, #1 8023e86: f001 f8ed bl 8025064 <__any_on> 8023e8a: 2800 cmp r0, #0 8023e8c: f43f ae6e beq.w 8023b6c <__gethex+0x1c4> 8023e90: 9a06 ldr r2, [sp, #24] 8023e92: 6853 ldr r3, [r2, #4] 8023e94: e7d7 b.n 8023e46 <__gethex+0x49e> 8023e96: 9915 ldr r1, [sp, #84] ; 0x54 8023e98: 2900 cmp r1, #0 8023e9a: f43f ae67 beq.w 8023b6c <__gethex+0x1c4> 8023e9e: e7d2 b.n 8023e46 <__gethex+0x49e> 8023ea0: 3201 adds r2, #1 8023ea2: 600a str r2, [r1, #0] 8023ea4: e723 b.n 8023cee <__gethex+0x346> 8023ea6: 9a06 ldr r2, [sp, #24] 8023ea8: 2722 movs r7, #34 ; 0x22 8023eaa: 6813 ldr r3, [r2, #0] 8023eac: 3b01 subs r3, #1 8023eae: 42a3 cmp r3, r4 8023eb0: f47f af56 bne.w 8023d60 <__gethex+0x3b8> 8023eb4: 1163 asrs r3, r4, #5 8023eb6: 9804 ldr r0, [sp, #16] 8023eb8: 2201 movs r2, #1 8023eba: f004 041f and.w r4, r4, #31 8023ebe: eb00 0383 add.w r3, r0, r3, lsl #2 8023ec2: fa02 f204 lsl.w r2, r2, r4 8023ec6: 695b ldr r3, [r3, #20] 8023ec8: 421a tst r2, r3 8023eca: bf14 ite ne 8023ecc: 2721 movne r7, #33 ; 0x21 8023ece: 2722 moveq r7, #34 ; 0x22 8023ed0: e746 b.n 8023d60 <__gethex+0x3b8> 8023ed2: 6851 ldr r1, [r2, #4] 8023ed4: 9807 ldr r0, [sp, #28] 8023ed6: 3101 adds r1, #1 8023ed8: f000 fc68 bl 80247ac <_Balloc> 8023edc: 4606 mov r6, r0 8023ede: 9804 ldr r0, [sp, #16] 8023ee0: f100 010c add.w r1, r0, #12 8023ee4: 6903 ldr r3, [r0, #16] 8023ee6: f106 000c add.w r0, r6, #12 8023eea: 1c9a adds r2, r3, #2 8023eec: 0092 lsls r2, r2, #2 8023eee: f7fd fd2d bl 802194c 8023ef2: 9904 ldr r1, [sp, #16] 8023ef4: 9807 ldr r0, [sp, #28] 8023ef6: 9604 str r6, [sp, #16] 8023ef8: f000 fc8e bl 8024818 <_Bfree> 8023efc: 6933 ldr r3, [r6, #16] 8023efe: e6ef b.n 8023ce0 <__gethex+0x338> 8023f00: 465c mov r4, fp 8023f02: e5a0 b.n 8023a46 <__gethex+0x9e> 08023f04 <__hexnan>: 8023f04: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8023f08: f245 280c movw r8, #21004 ; 0x520c 8023f0c: f2c2 0801 movt r8, #8193 ; 0x2001 8023f10: b085 sub sp, #20 8023f12: 460c mov r4, r1 8023f14: 4692 mov sl, r2 8023f16: f898 3030 ldrb.w r3, [r8, #48] ; 0x30 8023f1a: 9002 str r0, [sp, #8] 8023f1c: 2b00 cmp r3, #0 8023f1e: f000 80ad beq.w 802407c <__hexnan+0x178> 8023f22: 6823 ldr r3, [r4, #0] 8023f24: 115a asrs r2, r3, #5 8023f26: f013 031f ands.w r3, r3, #31 8023f2a: 9303 str r3, [sp, #12] 8023f2c: eb0a 0282 add.w r2, sl, r2, lsl #2 8023f30: 9200 str r2, [sp, #0] 8023f32: d001 beq.n 8023f38 <__hexnan+0x34> 8023f34: 3204 adds r2, #4 8023f36: 9200 str r2, [sp, #0] 8023f38: 9a00 ldr r2, [sp, #0] 8023f3a: 2300 movs r3, #0 8023f3c: 4699 mov r9, r3 8023f3e: 9900 ldr r1, [sp, #0] 8023f40: 46cb mov fp, r9 8023f42: 464e mov r6, r9 8023f44: f842 3c04 str.w r3, [r2, #-4] 8023f48: 3904 subs r1, #4 8023f4a: 9b02 ldr r3, [sp, #8] 8023f4c: 9101 str r1, [sp, #4] 8023f4e: f8dd c004 ldr.w ip, [sp, #4] 8023f52: 6819 ldr r1, [r3, #0] 8023f54: 4664 mov r4, ip 8023f56: 784b ldrb r3, [r1, #1] 8023f58: 2b00 cmp r3, #0 8023f5a: d033 beq.n 8023fc4 <__hexnan+0xc0> 8023f5c: f818 2003 ldrb.w r2, [r8, r3] 8023f60: 2a00 cmp r2, #0 8023f62: d16f bne.n 8024044 <__hexnan+0x140> 8023f64: 2b20 cmp r3, #32 8023f66: f200 8083 bhi.w 8024070 <__hexnan+0x16c> 8023f6a: 455e cmp r6, fp 8023f6c: dd26 ble.n 8023fbc <__hexnan+0xb8> 8023f6e: f1b9 0f07 cmp.w r9, #7 8023f72: bfcc ite gt 8023f74: 2300 movgt r3, #0 8023f76: 2301 movle r3, #1 8023f78: 4564 cmp r4, ip 8023f7a: bf28 it cs 8023f7c: 2300 movcs r3, #0 8023f7e: b193 cbz r3, 8023fa6 <__hexnan+0xa2> 8023f80: f1c9 0908 rsb r9, r9, #8 8023f84: 6822 ldr r2, [r4, #0] 8023f86: 4623 mov r3, r4 8023f88: ea4f 0989 mov.w r9, r9, lsl #2 8023f8c: f1c9 0720 rsb r7, r9, #32 8023f90: 6858 ldr r0, [r3, #4] 8023f92: fa00 f507 lsl.w r5, r0, r7 8023f96: 4315 orrs r5, r2 8023f98: fa20 f209 lsr.w r2, r0, r9 8023f9c: 601d str r5, [r3, #0] 8023f9e: f843 2f04 str.w r2, [r3, #4]! 8023fa2: 459c cmp ip, r3 8023fa4: d8f4 bhi.n 8023f90 <__hexnan+0x8c> 8023fa6: 4554 cmp r4, sl 8023fa8: bf98 it ls 8023faa: f04f 0908 movls.w r9, #8 8023fae: d905 bls.n 8023fbc <__hexnan+0xb8> 8023fb0: 2200 movs r2, #0 8023fb2: 3c04 subs r4, #4 8023fb4: 6022 str r2, [r4, #0] 8023fb6: 46b3 mov fp, r6 8023fb8: 46a4 mov ip, r4 8023fba: 4691 mov r9, r2 8023fbc: 3101 adds r1, #1 8023fbe: 784b ldrb r3, [r1, #1] 8023fc0: 2b00 cmp r3, #0 8023fc2: d1cb bne.n 8023f5c <__hexnan+0x58> 8023fc4: 2e00 cmp r6, #0 8023fc6: d055 beq.n 8024074 <__hexnan+0x170> 8023fc8: f1b9 0f07 cmp.w r9, #7 8023fcc: bfcc ite gt 8023fce: 2300 movgt r3, #0 8023fd0: 2301 movle r3, #1 8023fd2: 4564 cmp r4, ip 8023fd4: bf28 it cs 8023fd6: 2300 movcs r3, #0 8023fd8: b193 cbz r3, 8024000 <__hexnan+0xfc> 8023fda: f1c9 0908 rsb r9, r9, #8 8023fde: 6822 ldr r2, [r4, #0] 8023fe0: 4623 mov r3, r4 8023fe2: ea4f 0989 mov.w r9, r9, lsl #2 8023fe6: f1c9 0520 rsb r5, r9, #32 8023fea: 6859 ldr r1, [r3, #4] 8023fec: fa01 f005 lsl.w r0, r1, r5 8023ff0: 4310 orrs r0, r2 8023ff2: fa21 f209 lsr.w r2, r1, r9 8023ff6: 6018 str r0, [r3, #0] 8023ff8: f843 2f04 str.w r2, [r3, #4]! 8023ffc: 4563 cmp r3, ip 8023ffe: d3f4 bcc.n 8023fea <__hexnan+0xe6> 8024000: 45a2 cmp sl, r4 8024002: d23e bcs.n 8024082 <__hexnan+0x17e> 8024004: 9801 ldr r0, [sp, #4] 8024006: 4652 mov r2, sl 8024008: f854 1b04 ldr.w r1, [r4], #4 802400c: 4613 mov r3, r2 802400e: 42a0 cmp r0, r4 8024010: f843 1b04 str.w r1, [r3], #4 8024014: 461a mov r2, r3 8024016: d2f7 bcs.n 8024008 <__hexnan+0x104> 8024018: 9901 ldr r1, [sp, #4] 802401a: 2200 movs r2, #0 802401c: f843 2b04 str.w r2, [r3], #4 8024020: 4299 cmp r1, r3 8024022: d2fb bcs.n 802401c <__hexnan+0x118> 8024024: 9900 ldr r1, [sp, #0] 8024026: f851 3c04 ldr.w r3, [r1, #-4] 802402a: b94b cbnz r3, 8024040 <__hexnan+0x13c> 802402c: 9b01 ldr r3, [sp, #4] 802402e: 459a cmp sl, r3 8024030: d102 bne.n 8024038 <__hexnan+0x134> 8024032: e038 b.n 80240a6 <__hexnan+0x1a2> 8024034: 459a cmp sl, r3 8024036: d037 beq.n 80240a8 <__hexnan+0x1a4> 8024038: f853 2d04 ldr.w r2, [r3, #-4]! 802403c: 2a00 cmp r2, #0 802403e: d0f9 beq.n 8024034 <__hexnan+0x130> 8024040: 2005 movs r0, #5 8024042: e018 b.n 8024076 <__hexnan+0x172> 8024044: f109 0901 add.w r9, r9, #1 8024048: 3601 adds r6, #1 802404a: f1b9 0f08 cmp.w r9, #8 802404e: dc07 bgt.n 8024060 <__hexnan+0x15c> 8024050: 6823 ldr r3, [r4, #0] 8024052: 011b lsls r3, r3, #4 8024054: f002 020f and.w r2, r2, #15 8024058: 3101 adds r1, #1 802405a: 431a orrs r2, r3 802405c: 6022 str r2, [r4, #0] 802405e: e7ae b.n 8023fbe <__hexnan+0xba> 8024060: 4554 cmp r4, sl 8024062: d9ab bls.n 8023fbc <__hexnan+0xb8> 8024064: 2300 movs r3, #0 8024066: 3c04 subs r4, #4 8024068: 6023 str r3, [r4, #0] 802406a: f04f 0901 mov.w r9, #1 802406e: e7f1 b.n 8024054 <__hexnan+0x150> 8024070: 2b29 cmp r3, #41 ; 0x29 8024072: d01d beq.n 80240b0 <__hexnan+0x1ac> 8024074: 2004 movs r0, #4 8024076: b005 add sp, #20 8024078: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802407c: f7ff fc68 bl 8023950 <__hexdig_init> 8024080: e74f b.n 8023f22 <__hexnan+0x1e> 8024082: 9a03 ldr r2, [sp, #12] 8024084: 2a00 cmp r2, #0 8024086: d0cd beq.n 8024024 <__hexnan+0x120> 8024088: 9a00 ldr r2, [sp, #0] 802408a: 9903 ldr r1, [sp, #12] 802408c: f852 3c04 ldr.w r3, [r2, #-4] 8024090: f1c1 0220 rsb r2, r1, #32 8024094: f04f 31ff mov.w r1, #4294967295 8024098: fa21 f202 lsr.w r2, r1, r2 802409c: 4013 ands r3, r2 802409e: 9a00 ldr r2, [sp, #0] 80240a0: f842 3c04 str.w r3, [r2, #-4] 80240a4: e7c1 b.n 802402a <__hexnan+0x126> 80240a6: 4653 mov r3, sl 80240a8: 2201 movs r2, #1 80240aa: 2005 movs r0, #5 80240ac: 601a str r2, [r3, #0] 80240ae: e7e2 b.n 8024076 <__hexnan+0x172> 80240b0: 9b02 ldr r3, [sp, #8] 80240b2: 3102 adds r1, #2 80240b4: 6019 str r1, [r3, #0] 80240b6: 2e00 cmp r6, #0 80240b8: d186 bne.n 8023fc8 <__hexnan+0xc4> 80240ba: e7db b.n 8024074 <__hexnan+0x170> 080240bc <_setlocale_r>: 80240bc: b510 push {r4, lr} 80240be: 4614 mov r4, r2 80240c0: b13a cbz r2, 80240d2 <_setlocale_r+0x16> 80240c2: f641 61f4 movw r1, #7924 ; 0x1ef4 80240c6: 4610 mov r0, r2 80240c8: f6c0 0104 movt r1, #2052 ; 0x804 80240cc: f7fd fd84 bl 8021bd8 80240d0: b920 cbnz r0, 80240dc <_setlocale_r+0x20> 80240d2: f641 60f0 movw r0, #7920 ; 0x1ef0 80240d6: f6c0 0004 movt r0, #2052 ; 0x804 80240da: bd10 pop {r4, pc} 80240dc: f641 61f0 movw r1, #7920 ; 0x1ef0 80240e0: 4620 mov r0, r4 80240e2: f6c0 0104 movt r1, #2052 ; 0x804 80240e6: f7fd fd77 bl 8021bd8 80240ea: 2800 cmp r0, #0 80240ec: d0f1 beq.n 80240d2 <_setlocale_r+0x16> 80240ee: f641 61fc movw r1, #7932 ; 0x1efc 80240f2: 4620 mov r0, r4 80240f4: f6c0 0104 movt r1, #2052 ; 0x804 80240f8: f7fd fd6e bl 8021bd8 80240fc: f641 63f0 movw r3, #7920 ; 0x1ef0 8024100: f6c0 0304 movt r3, #2052 ; 0x804 8024104: 2800 cmp r0, #0 8024106: bf0c ite eq 8024108: 4618 moveq r0, r3 802410a: 2000 movne r0, #0 802410c: bd10 pop {r4, pc} 802410e: bf00 nop 08024110 <__locale_charset>: 8024110: f240 1020 movw r0, #288 ; 0x120 8024114: f2c2 0000 movt r0, #8192 ; 0x2000 8024118: 4770 bx lr 802411a: bf00 nop 0802411c <__locale_mb_cur_max>: 802411c: f240 1320 movw r3, #288 ; 0x120 8024120: f2c2 0300 movt r3, #8192 ; 0x2000 8024124: 6a18 ldr r0, [r3, #32] 8024126: 4770 bx lr 08024128 <__locale_msgcharset>: 8024128: 4800 ldr r0, [pc, #0] ; (802412c <__locale_msgcharset+0x4>) 802412a: 4770 bx lr 802412c: 20000144 .word 0x20000144 08024130 <__locale_cjk_lang>: 8024130: 2000 movs r0, #0 8024132: 4770 bx lr 08024134 <_localeconv_r>: 8024134: 4800 ldr r0, [pc, #0] ; (8024138 <_localeconv_r+0x4>) 8024136: 4770 bx lr 8024138: 20000164 .word 0x20000164 0802413c : 802413c: f240 032c movw r3, #44 ; 0x2c 8024140: 460a mov r2, r1 8024142: f2c2 0300 movt r3, #8192 ; 0x2000 8024146: 4601 mov r1, r0 8024148: 6818 ldr r0, [r3, #0] 802414a: f7ff bfb7 b.w 80240bc <_setlocale_r> 802414e: bf00 nop 08024150 : 8024150: 4800 ldr r0, [pc, #0] ; (8024154 ) 8024152: 4770 bx lr 8024154: 20000164 .word 0x20000164 08024158 : 8024158: f240 032c movw r3, #44 ; 0x2c 802415c: 4601 mov r1, r0 802415e: f2c2 0300 movt r3, #8192 ; 0x2000 8024162: 6818 ldr r0, [r3, #0] 8024164: f000 b808 b.w 8024178 <_malloc_r> 08024168 : 8024168: f240 032c movw r3, #44 ; 0x2c 802416c: 4601 mov r1, r0 802416e: f2c2 0300 movt r3, #8192 ; 0x2000 8024172: 6818 ldr r0, [r3, #0] 8024174: f7ff baca b.w 802370c <_free_r> 08024178 <_malloc_r>: 8024178: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802417c: f101 040b add.w r4, r1, #11 8024180: 2c16 cmp r4, #22 8024182: b083 sub sp, #12 8024184: 4607 mov r7, r0 8024186: d930 bls.n 80241ea <_malloc_r+0x72> 8024188: f024 0407 bic.w r4, r4, #7 802418c: 0fe3 lsrs r3, r4, #31 802418e: 428c cmp r4, r1 8024190: bf2c ite cs 8024192: 4619 movcs r1, r3 8024194: f043 0101 orrcc.w r1, r3, #1 8024198: 2900 cmp r1, #0 802419a: d12f bne.n 80241fc <_malloc_r+0x84> 802419c: 4638 mov r0, r7 802419e: f000 fb01 bl 80247a4 <__malloc_lock> 80241a2: f5b4 7ffc cmp.w r4, #504 ; 0x1f8 80241a6: d22e bcs.n 8024206 <_malloc_r+0x8e> 80241a8: ea4f 0cd4 mov.w ip, r4, lsr #3 80241ac: f240 169c movw r6, #412 ; 0x19c 80241b0: f2c2 0600 movt r6, #8192 ; 0x2000 80241b4: eb06 02cc add.w r2, r6, ip, lsl #3 80241b8: 68d3 ldr r3, [r2, #12] 80241ba: 4293 cmp r3, r2 80241bc: f000 8211 beq.w 80245e2 <_malloc_r+0x46a> 80241c0: 6859 ldr r1, [r3, #4] 80241c2: f103 0808 add.w r8, r3, #8 80241c6: 68da ldr r2, [r3, #12] 80241c8: 4638 mov r0, r7 80241ca: f021 0403 bic.w r4, r1, #3 80241ce: 6899 ldr r1, [r3, #8] 80241d0: 191b adds r3, r3, r4 80241d2: 685c ldr r4, [r3, #4] 80241d4: 60ca str r2, [r1, #12] 80241d6: f044 0401 orr.w r4, r4, #1 80241da: 6091 str r1, [r2, #8] 80241dc: 605c str r4, [r3, #4] 80241de: f000 fae3 bl 80247a8 <__malloc_unlock> 80241e2: 4640 mov r0, r8 80241e4: b003 add sp, #12 80241e6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80241ea: 2300 movs r3, #0 80241ec: 2410 movs r4, #16 80241ee: 428c cmp r4, r1 80241f0: bf2c ite cs 80241f2: 4619 movcs r1, r3 80241f4: f043 0101 orrcc.w r1, r3, #1 80241f8: 2900 cmp r1, #0 80241fa: d0cf beq.n 802419c <_malloc_r+0x24> 80241fc: 230c movs r3, #12 80241fe: f04f 0800 mov.w r8, #0 8024202: 603b str r3, [r7, #0] 8024204: e7ed b.n 80241e2 <_malloc_r+0x6a> 8024206: ea5f 2c54 movs.w ip, r4, lsr #9 802420a: bf04 itt eq 802420c: ea4f 0cd4 moveq.w ip, r4, lsr #3 8024210: ea4f 054c moveq.w r5, ip, lsl #1 8024214: f040 808f bne.w 8024336 <_malloc_r+0x1be> 8024218: f240 169c movw r6, #412 ; 0x19c 802421c: f2c2 0600 movt r6, #8192 ; 0x2000 8024220: eb06 0585 add.w r5, r6, r5, lsl #2 8024224: 68eb ldr r3, [r5, #12] 8024226: 429d cmp r5, r3 8024228: d106 bne.n 8024238 <_malloc_r+0xc0> 802422a: e00d b.n 8024248 <_malloc_r+0xd0> 802422c: 2a00 cmp r2, #0 802422e: f280 8155 bge.w 80244dc <_malloc_r+0x364> 8024232: 68db ldr r3, [r3, #12] 8024234: 429d cmp r5, r3 8024236: d007 beq.n 8024248 <_malloc_r+0xd0> 8024238: 6859 ldr r1, [r3, #4] 802423a: f021 0103 bic.w r1, r1, #3 802423e: 1b0a subs r2, r1, r4 8024240: 2a0f cmp r2, #15 8024242: ddf3 ble.n 802422c <_malloc_r+0xb4> 8024244: f10c 3cff add.w ip, ip, #4294967295 8024248: f10c 0c01 add.w ip, ip, #1 802424c: f240 129c movw r2, #412 ; 0x19c 8024250: 6933 ldr r3, [r6, #16] 8024252: f2c2 0200 movt r2, #8192 ; 0x2000 8024256: f102 0e08 add.w lr, r2, #8 802425a: 4573 cmp r3, lr 802425c: bf08 it eq 802425e: f8d2 9004 ldreq.w r9, [r2, #4] 8024262: d022 beq.n 80242aa <_malloc_r+0x132> 8024264: 6858 ldr r0, [r3, #4] 8024266: f020 0003 bic.w r0, r0, #3 802426a: 1b01 subs r1, r0, r4 802426c: 290f cmp r1, #15 802426e: f300 8184 bgt.w 802457a <_malloc_r+0x402> 8024272: 2900 cmp r1, #0 8024274: f8c2 e014 str.w lr, [r2, #20] 8024278: f8c2 e010 str.w lr, [r2, #16] 802427c: da66 bge.n 802434c <_malloc_r+0x1d4> 802427e: f5b0 7f00 cmp.w r0, #512 ; 0x200 8024282: f080 814e bcs.w 8024522 <_malloc_r+0x3aa> 8024286: 08c1 lsrs r1, r0, #3 8024288: f04f 0801 mov.w r8, #1 802428c: eb02 00c1 add.w r0, r2, r1, lsl #3 8024290: 1089 asrs r1, r1, #2 8024292: fa08 f801 lsl.w r8, r8, r1 8024296: 6851 ldr r1, [r2, #4] 8024298: 6885 ldr r5, [r0, #8] 802429a: 60d8 str r0, [r3, #12] 802429c: ea48 0901 orr.w r9, r8, r1 80242a0: f8c2 9004 str.w r9, [r2, #4] 80242a4: 609d str r5, [r3, #8] 80242a6: 60eb str r3, [r5, #12] 80242a8: 6083 str r3, [r0, #8] 80242aa: 2201 movs r2, #1 80242ac: ea4f 03ac mov.w r3, ip, asr #2 80242b0: fa02 f303 lsl.w r3, r2, r3 80242b4: 454b cmp r3, r9 80242b6: d854 bhi.n 8024362 <_malloc_r+0x1ea> 80242b8: ea19 0f03 tst.w r9, r3 80242bc: d10d bne.n 80242da <_malloc_r+0x162> 80242be: 4093 lsls r3, r2 80242c0: f02c 0c03 bic.w ip, ip, #3 80242c4: ea19 0f03 tst.w r9, r3 80242c8: f10c 0c04 add.w ip, ip, #4 80242cc: d105 bne.n 80242da <_malloc_r+0x162> 80242ce: 005b lsls r3, r3, #1 80242d0: f10c 0c04 add.w ip, ip, #4 80242d4: ea19 0f03 tst.w r9, r3 80242d8: d0f9 beq.n 80242ce <_malloc_r+0x156> 80242da: eb06 09cc add.w r9, r6, ip, lsl #3 80242de: 46e0 mov r8, ip 80242e0: 4648 mov r0, r9 80242e2: 68c2 ldr r2, [r0, #12] 80242e4: 4290 cmp r0, r2 80242e6: d107 bne.n 80242f8 <_malloc_r+0x180> 80242e8: e15b b.n 80245a2 <_malloc_r+0x42a> 80242ea: 2900 cmp r1, #0 80242ec: f280 8183 bge.w 80245f6 <_malloc_r+0x47e> 80242f0: 68d2 ldr r2, [r2, #12] 80242f2: 4290 cmp r0, r2 80242f4: f000 8155 beq.w 80245a2 <_malloc_r+0x42a> 80242f8: 6855 ldr r5, [r2, #4] 80242fa: f025 0503 bic.w r5, r5, #3 80242fe: 1b29 subs r1, r5, r4 8024300: 290f cmp r1, #15 8024302: ddf2 ble.n 80242ea <_malloc_r+0x172> 8024304: 4690 mov r8, r2 8024306: 1913 adds r3, r2, r4 8024308: 68d5 ldr r5, [r2, #12] 802430a: f044 0001 orr.w r0, r4, #1 802430e: f858 4f08 ldr.w r4, [r8, #8]! 8024312: f041 0c01 orr.w ip, r1, #1 8024316: 6050 str r0, [r2, #4] 8024318: 4638 mov r0, r7 802431a: f8c3 c004 str.w ip, [r3, #4] 802431e: 60e5 str r5, [r4, #12] 8024320: 60ac str r4, [r5, #8] 8024322: 6173 str r3, [r6, #20] 8024324: 6133 str r3, [r6, #16] 8024326: f8c3 e00c str.w lr, [r3, #12] 802432a: f8c3 e008 str.w lr, [r3, #8] 802432e: 5059 str r1, [r3, r1] 8024330: f000 fa3a bl 80247a8 <__malloc_unlock> 8024334: e755 b.n 80241e2 <_malloc_r+0x6a> 8024336: f1bc 0f04 cmp.w ip, #4 802433a: f200 80de bhi.w 80244fa <_malloc_r+0x382> 802433e: ea4f 1c94 mov.w ip, r4, lsr #6 8024342: f10c 0c38 add.w ip, ip, #56 ; 0x38 8024346: ea4f 054c mov.w r5, ip, lsl #1 802434a: e765 b.n 8024218 <_malloc_r+0xa0> 802434c: 181a adds r2, r3, r0 802434e: f103 0808 add.w r8, r3, #8 8024352: 4638 mov r0, r7 8024354: 6853 ldr r3, [r2, #4] 8024356: f043 0301 orr.w r3, r3, #1 802435a: 6053 str r3, [r2, #4] 802435c: f000 fa24 bl 80247a8 <__malloc_unlock> 8024360: e73f b.n 80241e2 <_malloc_r+0x6a> 8024362: 68b5 ldr r5, [r6, #8] 8024364: 686b ldr r3, [r5, #4] 8024366: f023 0a03 bic.w sl, r3, #3 802436a: 4554 cmp r4, sl 802436c: d804 bhi.n 8024378 <_malloc_r+0x200> 802436e: ebc4 030a rsb r3, r4, sl 8024372: 2b0f cmp r3, #15 8024374: f300 80a4 bgt.w 80244c0 <_malloc_r+0x348> 8024378: f641 19a4 movw r9, #6564 ; 0x19a4 802437c: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 8024380: f2c2 0900 movt r9, #8192 ; 0x2000 8024384: eb05 020a add.w r2, r5, sl 8024388: 3101 adds r1, #1 802438a: f8d9 3000 ldr.w r3, [r9] 802438e: 4423 add r3, r4 8024390: bf08 it eq 8024392: f103 0b10 addeq.w fp, r3, #16 8024396: d006 beq.n 80243a6 <_malloc_r+0x22e> 8024398: f503 5380 add.w r3, r3, #4096 ; 0x1000 802439c: 330f adds r3, #15 802439e: f423 637f bic.w r3, r3, #4080 ; 0xff0 80243a2: f023 0b0f bic.w fp, r3, #15 80243a6: 4638 mov r0, r7 80243a8: 4659 mov r1, fp 80243aa: 9201 str r2, [sp, #4] 80243ac: f000 fe86 bl 80250bc <_sbrk_r> 80243b0: 9a01 ldr r2, [sp, #4] 80243b2: 1c41 adds r1, r0, #1 80243b4: 4680 mov r8, r0 80243b6: f000 8168 beq.w 802468a <_malloc_r+0x512> 80243ba: 4282 cmp r2, r0 80243bc: f200 8131 bhi.w 8024622 <_malloc_r+0x4aa> 80243c0: f8d9 3004 ldr.w r3, [r9, #4] 80243c4: 4542 cmp r2, r8 80243c6: 445b add r3, fp 80243c8: f8c9 3004 str.w r3, [r9, #4] 80243cc: f000 8166 beq.w 802469c <_malloc_r+0x524> 80243d0: f8d6 1408 ldr.w r1, [r6, #1032] ; 0x408 80243d4: f240 109c movw r0, #412 ; 0x19c 80243d8: f2c2 0000 movt r0, #8192 ; 0x2000 80243dc: 3101 adds r1, #1 80243de: bf17 itett ne 80243e0: ebc2 0208 rsbne r2, r2, r8 80243e4: f8c0 8408 streq.w r8, [r0, #1032] ; 0x408 80243e8: 189b addne r3, r3, r2 80243ea: f8c9 3004 strne.w r3, [r9, #4] 80243ee: f018 0307 ands.w r3, r8, #7 80243f2: 4638 mov r0, r7 80243f4: bf1f itttt ne 80243f6: f1c3 0208 rsbne r2, r3, #8 80243fa: f5c3 5380 rsbne r3, r3, #4096 ; 0x1000 80243fe: 4490 addne r8, r2 8024400: f103 0208 addne.w r2, r3, #8 8024404: eb08 030b add.w r3, r8, fp 8024408: bf08 it eq 802440a: f44f 5280 moveq.w r2, #4096 ; 0x1000 802440e: 051b lsls r3, r3, #20 8024410: 0d1b lsrs r3, r3, #20 8024412: ebc3 0b02 rsb fp, r3, r2 8024416: 4659 mov r1, fp 8024418: f000 fe50 bl 80250bc <_sbrk_r> 802441c: 1c43 adds r3, r0, #1 802441e: f000 8149 beq.w 80246b4 <_malloc_r+0x53c> 8024422: ebc8 0100 rsb r1, r8, r0 8024426: 4459 add r1, fp 8024428: f041 0101 orr.w r1, r1, #1 802442c: f8d9 3004 ldr.w r3, [r9, #4] 8024430: 42b5 cmp r5, r6 8024432: f641 12a4 movw r2, #6564 ; 0x19a4 8024436: f8c6 8008 str.w r8, [r6, #8] 802443a: 445b add r3, fp 802443c: f2c2 0200 movt r2, #8192 ; 0x2000 8024440: f8c8 1004 str.w r1, [r8, #4] 8024444: f8c9 3004 str.w r3, [r9, #4] 8024448: d018 beq.n 802447c <_malloc_r+0x304> 802444a: f1ba 0f0f cmp.w sl, #15 802444e: f240 810b bls.w 8024668 <_malloc_r+0x4f0> 8024452: f1aa 000c sub.w r0, sl, #12 8024456: 6869 ldr r1, [r5, #4] 8024458: f020 0007 bic.w r0, r0, #7 802445c: f04f 0c05 mov.w ip, #5 8024460: eb05 0e00 add.w lr, r5, r0 8024464: 280f cmp r0, #15 8024466: f001 0101 and.w r1, r1, #1 802446a: ea40 0101 orr.w r1, r0, r1 802446e: 6069 str r1, [r5, #4] 8024470: f8ce c004 str.w ip, [lr, #4] 8024474: f8ce c008 str.w ip, [lr, #8] 8024478: f200 8120 bhi.w 80246bc <_malloc_r+0x544> 802447c: f641 12a4 movw r2, #6564 ; 0x19a4 8024480: f8d9 102c ldr.w r1, [r9, #44] ; 0x2c 8024484: f2c2 0200 movt r2, #8192 ; 0x2000 8024488: 68b5 ldr r5, [r6, #8] 802448a: 428b cmp r3, r1 802448c: f8d9 1030 ldr.w r1, [r9, #48] ; 0x30 8024490: bf88 it hi 8024492: 62d3 strhi r3, [r2, #44] ; 0x2c 8024494: f641 12a4 movw r2, #6564 ; 0x19a4 8024498: f2c2 0200 movt r2, #8192 ; 0x2000 802449c: 428b cmp r3, r1 802449e: bf88 it hi 80244a0: 6313 strhi r3, [r2, #48] ; 0x30 80244a2: 686a ldr r2, [r5, #4] 80244a4: f022 0203 bic.w r2, r2, #3 80244a8: 4294 cmp r4, r2 80244aa: ebc4 0302 rsb r3, r4, r2 80244ae: d801 bhi.n 80244b4 <_malloc_r+0x33c> 80244b0: 2b0f cmp r3, #15 80244b2: dc05 bgt.n 80244c0 <_malloc_r+0x348> 80244b4: 4638 mov r0, r7 80244b6: f04f 0800 mov.w r8, #0 80244ba: f000 f975 bl 80247a8 <__malloc_unlock> 80244be: e690 b.n 80241e2 <_malloc_r+0x6a> 80244c0: 192a adds r2, r5, r4 80244c2: f043 0301 orr.w r3, r3, #1 80244c6: f044 0401 orr.w r4, r4, #1 80244ca: 4638 mov r0, r7 80244cc: 606c str r4, [r5, #4] 80244ce: f105 0808 add.w r8, r5, #8 80244d2: 6053 str r3, [r2, #4] 80244d4: 60b2 str r2, [r6, #8] 80244d6: f000 f967 bl 80247a8 <__malloc_unlock> 80244da: e682 b.n 80241e2 <_malloc_r+0x6a> 80244dc: 1859 adds r1, r3, r1 80244de: 68da ldr r2, [r3, #12] 80244e0: 689c ldr r4, [r3, #8] 80244e2: 4638 mov r0, r7 80244e4: 684d ldr r5, [r1, #4] 80244e6: f103 0808 add.w r8, r3, #8 80244ea: f045 0501 orr.w r5, r5, #1 80244ee: 60e2 str r2, [r4, #12] 80244f0: 6094 str r4, [r2, #8] 80244f2: 604d str r5, [r1, #4] 80244f4: f000 f958 bl 80247a8 <__malloc_unlock> 80244f8: e673 b.n 80241e2 <_malloc_r+0x6a> 80244fa: f1bc 0f14 cmp.w ip, #20 80244fe: bf9c itt ls 8024500: f10c 0c5b addls.w ip, ip, #91 ; 0x5b 8024504: ea4f 054c movls.w r5, ip, lsl #1 8024508: f67f ae86 bls.w 8024218 <_malloc_r+0xa0> 802450c: f1bc 0f54 cmp.w ip, #84 ; 0x54 8024510: f200 8093 bhi.w 802463a <_malloc_r+0x4c2> 8024514: ea4f 3c14 mov.w ip, r4, lsr #12 8024518: f10c 0c6e add.w ip, ip, #110 ; 0x6e 802451c: ea4f 054c mov.w r5, ip, lsl #1 8024520: e67a b.n 8024218 <_malloc_r+0xa0> 8024522: 0a42 lsrs r2, r0, #9 8024524: 2a04 cmp r2, #4 8024526: d975 bls.n 8024614 <_malloc_r+0x49c> 8024528: 2a14 cmp r2, #20 802452a: bf9c itt ls 802452c: f102 095b addls.w r9, r2, #91 ; 0x5b 8024530: ea4f 0549 movls.w r5, r9, lsl #1 8024534: d908 bls.n 8024548 <_malloc_r+0x3d0> 8024536: 2a54 cmp r2, #84 ; 0x54 8024538: f200 80c9 bhi.w 80246ce <_malloc_r+0x556> 802453c: ea4f 3910 mov.w r9, r0, lsr #12 8024540: f109 096e add.w r9, r9, #110 ; 0x6e 8024544: ea4f 0549 mov.w r5, r9, lsl #1 8024548: eb06 0585 add.w r5, r6, r5, lsl #2 802454c: f240 189c movw r8, #412 ; 0x19c 8024550: f2c2 0800 movt r8, #8192 ; 0x2000 8024554: 68aa ldr r2, [r5, #8] 8024556: 42aa cmp r2, r5 8024558: d079 beq.n 802464e <_malloc_r+0x4d6> 802455a: 6851 ldr r1, [r2, #4] 802455c: f021 0103 bic.w r1, r1, #3 8024560: 4288 cmp r0, r1 8024562: d202 bcs.n 802456a <_malloc_r+0x3f2> 8024564: 6892 ldr r2, [r2, #8] 8024566: 4295 cmp r5, r2 8024568: d1f7 bne.n 802455a <_malloc_r+0x3e2> 802456a: 68d0 ldr r0, [r2, #12] 802456c: f8d6 9004 ldr.w r9, [r6, #4] 8024570: 60d8 str r0, [r3, #12] 8024572: 609a str r2, [r3, #8] 8024574: 60d3 str r3, [r2, #12] 8024576: 6083 str r3, [r0, #8] 8024578: e697 b.n 80242aa <_malloc_r+0x132> 802457a: 191d adds r5, r3, r4 802457c: f041 0601 orr.w r6, r1, #1 8024580: 6155 str r5, [r2, #20] 8024582: f044 0401 orr.w r4, r4, #1 8024586: 6115 str r5, [r2, #16] 8024588: 4638 mov r0, r7 802458a: 605c str r4, [r3, #4] 802458c: f103 0808 add.w r8, r3, #8 8024590: f8c5 e00c str.w lr, [r5, #12] 8024594: f8c5 e008 str.w lr, [r5, #8] 8024598: 606e str r6, [r5, #4] 802459a: 5069 str r1, [r5, r1] 802459c: f000 f904 bl 80247a8 <__malloc_unlock> 80245a0: e61f b.n 80241e2 <_malloc_r+0x6a> 80245a2: f108 0801 add.w r8, r8, #1 80245a6: 3008 adds r0, #8 80245a8: f018 0f03 tst.w r8, #3 80245ac: f47f ae99 bne.w 80242e2 <_malloc_r+0x16a> 80245b0: 464a mov r2, r9 80245b2: f01c 0f03 tst.w ip, #3 80245b6: f1a2 0108 sub.w r1, r2, #8 80245ba: f10c 3cff add.w ip, ip, #4294967295 80245be: f000 809e beq.w 80246fe <_malloc_r+0x586> 80245c2: 6812 ldr r2, [r2, #0] 80245c4: 428a cmp r2, r1 80245c6: d0f4 beq.n 80245b2 <_malloc_r+0x43a> 80245c8: 6872 ldr r2, [r6, #4] 80245ca: 005b lsls r3, r3, #1 80245cc: 4293 cmp r3, r2 80245ce: f63f aec8 bhi.w 8024362 <_malloc_r+0x1ea> 80245d2: 2b00 cmp r3, #0 80245d4: f43f aec5 beq.w 8024362 <_malloc_r+0x1ea> 80245d8: 421a tst r2, r3 80245da: f000 8095 beq.w 8024708 <_malloc_r+0x590> 80245de: 46c4 mov ip, r8 80245e0: e67b b.n 80242da <_malloc_r+0x162> 80245e2: f103 0208 add.w r2, r3, #8 80245e6: 695b ldr r3, [r3, #20] 80245e8: 429a cmp r2, r3 80245ea: bf08 it eq 80245ec: f10c 0c02 addeq.w ip, ip, #2 80245f0: f43f ae2c beq.w 802424c <_malloc_r+0xd4> 80245f4: e5e4 b.n 80241c0 <_malloc_r+0x48> 80245f6: 4690 mov r8, r2 80245f8: 1955 adds r5, r2, r5 80245fa: 68d3 ldr r3, [r2, #12] 80245fc: 4638 mov r0, r7 80245fe: f858 2f08 ldr.w r2, [r8, #8]! 8024602: 6869 ldr r1, [r5, #4] 8024604: 60d3 str r3, [r2, #12] 8024606: f041 0101 orr.w r1, r1, #1 802460a: 609a str r2, [r3, #8] 802460c: 6069 str r1, [r5, #4] 802460e: f000 f8cb bl 80247a8 <__malloc_unlock> 8024612: e5e6 b.n 80241e2 <_malloc_r+0x6a> 8024614: ea4f 1990 mov.w r9, r0, lsr #6 8024618: f109 0938 add.w r9, r9, #56 ; 0x38 802461c: ea4f 0549 mov.w r5, r9, lsl #1 8024620: e792 b.n 8024548 <_malloc_r+0x3d0> 8024622: 42b5 cmp r5, r6 8024624: f240 139c movw r3, #412 ; 0x19c 8024628: f2c2 0300 movt r3, #8192 ; 0x2000 802462c: f43f aec8 beq.w 80243c0 <_malloc_r+0x248> 8024630: 689d ldr r5, [r3, #8] 8024632: 686a ldr r2, [r5, #4] 8024634: f022 0203 bic.w r2, r2, #3 8024638: e736 b.n 80244a8 <_malloc_r+0x330> 802463a: f5bc 7faa cmp.w ip, #340 ; 0x154 802463e: d819 bhi.n 8024674 <_malloc_r+0x4fc> 8024640: ea4f 3cd4 mov.w ip, r4, lsr #15 8024644: f10c 0c77 add.w ip, ip, #119 ; 0x77 8024648: ea4f 054c mov.w r5, ip, lsl #1 802464c: e5e4 b.n 8024218 <_malloc_r+0xa0> 802464e: 2501 movs r5, #1 8024650: f8d8 1004 ldr.w r1, [r8, #4] 8024654: ea4f 09a9 mov.w r9, r9, asr #2 8024658: 4610 mov r0, r2 802465a: fa05 f509 lsl.w r5, r5, r9 802465e: ea45 0901 orr.w r9, r5, r1 8024662: f8c8 9004 str.w r9, [r8, #4] 8024666: e783 b.n 8024570 <_malloc_r+0x3f8> 8024668: 2301 movs r3, #1 802466a: 4645 mov r5, r8 802466c: f8c8 3004 str.w r3, [r8, #4] 8024670: 2200 movs r2, #0 8024672: e719 b.n 80244a8 <_malloc_r+0x330> 8024674: f240 5354 movw r3, #1364 ; 0x554 8024678: 459c cmp ip, r3 802467a: d80b bhi.n 8024694 <_malloc_r+0x51c> 802467c: ea4f 4c94 mov.w ip, r4, lsr #18 8024680: f10c 0c7c add.w ip, ip, #124 ; 0x7c 8024684: ea4f 054c mov.w r5, ip, lsl #1 8024688: e5c6 b.n 8024218 <_malloc_r+0xa0> 802468a: 68b5 ldr r5, [r6, #8] 802468c: 686a ldr r2, [r5, #4] 802468e: f022 0203 bic.w r2, r2, #3 8024692: e709 b.n 80244a8 <_malloc_r+0x330> 8024694: 25fc movs r5, #252 ; 0xfc 8024696: f04f 0c7e mov.w ip, #126 ; 0x7e 802469a: e5bd b.n 8024218 <_malloc_r+0xa0> 802469c: 0511 lsls r1, r2, #20 802469e: 0d09 lsrs r1, r1, #20 80246a0: 2900 cmp r1, #0 80246a2: f47f ae95 bne.w 80243d0 <_malloc_r+0x258> 80246a6: 68b2 ldr r2, [r6, #8] 80246a8: eb0b 010a add.w r1, fp, sl 80246ac: f041 0101 orr.w r1, r1, #1 80246b0: 6051 str r1, [r2, #4] 80246b2: e6e3 b.n 802447c <_malloc_r+0x304> 80246b4: 2101 movs r1, #1 80246b6: f04f 0b00 mov.w fp, #0 80246ba: e6b7 b.n 802442c <_malloc_r+0x2b4> 80246bc: 4638 mov r0, r7 80246be: f105 0108 add.w r1, r5, #8 80246c2: 9201 str r2, [sp, #4] 80246c4: f7ff f822 bl 802370c <_free_r> 80246c8: 9a01 ldr r2, [sp, #4] 80246ca: 6853 ldr r3, [r2, #4] 80246cc: e6d6 b.n 802447c <_malloc_r+0x304> 80246ce: f5b2 7faa cmp.w r2, #340 ; 0x154 80246d2: d806 bhi.n 80246e2 <_malloc_r+0x56a> 80246d4: ea4f 39d0 mov.w r9, r0, lsr #15 80246d8: f109 0977 add.w r9, r9, #119 ; 0x77 80246dc: ea4f 0549 mov.w r5, r9, lsl #1 80246e0: e732 b.n 8024548 <_malloc_r+0x3d0> 80246e2: f240 5154 movw r1, #1364 ; 0x554 80246e6: 25fc movs r5, #252 ; 0xfc 80246e8: 428a cmp r2, r1 80246ea: f04f 097e mov.w r9, #126 ; 0x7e 80246ee: bf9e ittt ls 80246f0: ea4f 4990 movls.w r9, r0, lsr #18 80246f4: f109 097c addls.w r9, r9, #124 ; 0x7c 80246f8: ea4f 0549 movls.w r5, r9, lsl #1 80246fc: e724 b.n 8024548 <_malloc_r+0x3d0> 80246fe: 6872 ldr r2, [r6, #4] 8024700: ea22 0203 bic.w r2, r2, r3 8024704: 6072 str r2, [r6, #4] 8024706: e760 b.n 80245ca <_malloc_r+0x452> 8024708: 005b lsls r3, r3, #1 802470a: f108 0804 add.w r8, r8, #4 802470e: e763 b.n 80245d8 <_malloc_r+0x460> 08024710 : 8024710: 0783 lsls r3, r0, #30 8024712: b2c9 uxtb r1, r1 8024714: b470 push {r4, r5, r6} 8024716: d040 beq.n 802479a 8024718: 1e54 subs r4, r2, #1 802471a: 2a00 cmp r2, #0 802471c: d03f beq.n 802479e 802471e: 7803 ldrb r3, [r0, #0] 8024720: 428b cmp r3, r1 8024722: d021 beq.n 8024768 8024724: 1c43 adds r3, r0, #1 8024726: e004 b.n 8024732 8024728: b304 cbz r4, 802476c 802472a: 7802 ldrb r2, [r0, #0] 802472c: 3c01 subs r4, #1 802472e: 428a cmp r2, r1 8024730: d01a beq.n 8024768 8024732: f013 0f03 tst.w r3, #3 8024736: 4618 mov r0, r3 8024738: f103 0301 add.w r3, r3, #1 802473c: d1f4 bne.n 8024728 802473e: 2c03 cmp r4, #3 8024740: d816 bhi.n 8024770 8024742: 1e65 subs r5, r4, #1 8024744: b194 cbz r4, 802476c 8024746: 7803 ldrb r3, [r0, #0] 8024748: 428b cmp r3, r1 802474a: d00d beq.n 8024768 802474c: 1c42 adds r2, r0, #1 802474e: 2300 movs r3, #0 8024750: e002 b.n 8024758 8024752: 7804 ldrb r4, [r0, #0] 8024754: 428c cmp r4, r1 8024756: d007 beq.n 8024768 8024758: 429d cmp r5, r3 802475a: 4610 mov r0, r2 802475c: f103 0301 add.w r3, r3, #1 8024760: f102 0201 add.w r2, r2, #1 8024764: d1f5 bne.n 8024752 8024766: 2000 movs r0, #0 8024768: bc70 pop {r4, r5, r6} 802476a: 4770 bx lr 802476c: 4620 mov r0, r4 802476e: e7fb b.n 8024768 8024770: ea41 2601 orr.w r6, r1, r1, lsl #8 8024774: ea46 4606 orr.w r6, r6, r6, lsl #16 8024778: 4602 mov r2, r0 802477a: 3004 adds r0, #4 802477c: 6813 ldr r3, [r2, #0] 802477e: 4073 eors r3, r6 8024780: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8024784: ea25 0303 bic.w r3, r5, r3 8024788: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802478c: d103 bne.n 8024796 802478e: 3c04 subs r4, #4 8024790: 2c03 cmp r4, #3 8024792: d8f1 bhi.n 8024778 8024794: e7d5 b.n 8024742 8024796: 4610 mov r0, r2 8024798: e7d3 b.n 8024742 802479a: 4614 mov r4, r2 802479c: e7cf b.n 802473e 802479e: 4610 mov r0, r2 80247a0: e7e2 b.n 8024768 80247a2: bf00 nop 080247a4 <__malloc_lock>: 80247a4: 4770 bx lr 80247a6: bf00 nop 080247a8 <__malloc_unlock>: 80247a8: 4770 bx lr 80247aa: bf00 nop 080247ac <_Balloc>: 80247ac: b570 push {r4, r5, r6, lr} 80247ae: 4606 mov r6, r0 80247b0: 6a44 ldr r4, [r0, #36] ; 0x24 80247b2: 460d mov r5, r1 80247b4: b15c cbz r4, 80247ce <_Balloc+0x22> 80247b6: 68e2 ldr r2, [r4, #12] 80247b8: b19a cbz r2, 80247e2 <_Balloc+0x36> 80247ba: f852 0025 ldr.w r0, [r2, r5, lsl #2] 80247be: b1e0 cbz r0, 80247fa <_Balloc+0x4e> 80247c0: 6801 ldr r1, [r0, #0] 80247c2: f842 1025 str.w r1, [r2, r5, lsl #2] 80247c6: 2200 movs r2, #0 80247c8: 6102 str r2, [r0, #16] 80247ca: 60c2 str r2, [r0, #12] 80247cc: bd70 pop {r4, r5, r6, pc} 80247ce: 2010 movs r0, #16 80247d0: f7ff fcc2 bl 8024158 80247d4: 2300 movs r3, #0 80247d6: 4604 mov r4, r0 80247d8: 6270 str r0, [r6, #36] ; 0x24 80247da: 6043 str r3, [r0, #4] 80247dc: 6083 str r3, [r0, #8] 80247de: 6003 str r3, [r0, #0] 80247e0: 60c3 str r3, [r0, #12] 80247e2: 2221 movs r2, #33 ; 0x21 80247e4: 4630 mov r0, r6 80247e6: 2104 movs r1, #4 80247e8: f000 fcfc bl 80251e4 <_calloc_r> 80247ec: 6a73 ldr r3, [r6, #36] ; 0x24 80247ee: 60e0 str r0, [r4, #12] 80247f0: 68da ldr r2, [r3, #12] 80247f2: 2a00 cmp r2, #0 80247f4: d1e1 bne.n 80247ba <_Balloc+0xe> 80247f6: 2000 movs r0, #0 80247f8: bd70 pop {r4, r5, r6, pc} 80247fa: 2301 movs r3, #1 80247fc: 4630 mov r0, r6 80247fe: 4619 mov r1, r3 8024800: fa03 f405 lsl.w r4, r3, r5 8024804: 1d62 adds r2, r4, #5 8024806: 0092 lsls r2, r2, #2 8024808: f000 fcec bl 80251e4 <_calloc_r> 802480c: 2800 cmp r0, #0 802480e: d0f2 beq.n 80247f6 <_Balloc+0x4a> 8024810: 6045 str r5, [r0, #4] 8024812: 6084 str r4, [r0, #8] 8024814: e7d7 b.n 80247c6 <_Balloc+0x1a> 8024816: bf00 nop 08024818 <_Bfree>: 8024818: b530 push {r4, r5, lr} 802481a: 4604 mov r4, r0 802481c: 6a45 ldr r5, [r0, #36] ; 0x24 802481e: b083 sub sp, #12 8024820: b155 cbz r5, 8024838 <_Bfree+0x20> 8024822: b139 cbz r1, 8024834 <_Bfree+0x1c> 8024824: 6a63 ldr r3, [r4, #36] ; 0x24 8024826: 684a ldr r2, [r1, #4] 8024828: 68db ldr r3, [r3, #12] 802482a: f853 0022 ldr.w r0, [r3, r2, lsl #2] 802482e: 6008 str r0, [r1, #0] 8024830: f843 1022 str.w r1, [r3, r2, lsl #2] 8024834: b003 add sp, #12 8024836: bd30 pop {r4, r5, pc} 8024838: 2010 movs r0, #16 802483a: 9101 str r1, [sp, #4] 802483c: f7ff fc8c bl 8024158 8024840: 9901 ldr r1, [sp, #4] 8024842: 6260 str r0, [r4, #36] ; 0x24 8024844: 6045 str r5, [r0, #4] 8024846: 6085 str r5, [r0, #8] 8024848: 6005 str r5, [r0, #0] 802484a: 60c5 str r5, [r0, #12] 802484c: e7e9 b.n 8024822 <_Bfree+0xa> 802484e: bf00 nop 08024850 <__multadd>: 8024850: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8024854: 4688 mov r8, r1 8024856: f8d1 a010 ldr.w sl, [r1, #16] 802485a: b082 sub sp, #8 802485c: 4681 mov r9, r0 802485e: f101 0514 add.w r5, r1, #20 8024862: 2400 movs r4, #0 8024864: 682f ldr r7, [r5, #0] 8024866: 3401 adds r4, #1 8024868: b2be uxth r6, r7 802486a: 0c3f lsrs r7, r7, #16 802486c: fb02 3606 mla r6, r2, r6, r3 8024870: fb02 f307 mul.w r3, r2, r7 8024874: eb03 4316 add.w r3, r3, r6, lsr #16 8024878: b2b6 uxth r6, r6 802487a: eb06 4603 add.w r6, r6, r3, lsl #16 802487e: 0c1b lsrs r3, r3, #16 8024880: 45a2 cmp sl, r4 8024882: f845 6b04 str.w r6, [r5], #4 8024886: dced bgt.n 8024864 <__multadd+0x14> 8024888: b153 cbz r3, 80248a0 <__multadd+0x50> 802488a: f8d8 2008 ldr.w r2, [r8, #8] 802488e: 4592 cmp sl, r2 8024890: da0a bge.n 80248a8 <__multadd+0x58> 8024892: eb08 028a add.w r2, r8, sl, lsl #2 8024896: f10a 0101 add.w r1, sl, #1 802489a: f8c8 1010 str.w r1, [r8, #16] 802489e: 6153 str r3, [r2, #20] 80248a0: 4640 mov r0, r8 80248a2: b002 add sp, #8 80248a4: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 80248a8: f8d8 1004 ldr.w r1, [r8, #4] 80248ac: 4648 mov r0, r9 80248ae: 9301 str r3, [sp, #4] 80248b0: 3101 adds r1, #1 80248b2: f7ff ff7b bl 80247ac <_Balloc> 80248b6: f8d8 2010 ldr.w r2, [r8, #16] 80248ba: f108 010c add.w r1, r8, #12 80248be: 3202 adds r2, #2 80248c0: 0092 lsls r2, r2, #2 80248c2: 4604 mov r4, r0 80248c4: 300c adds r0, #12 80248c6: f7fd f841 bl 802194c 80248ca: 4641 mov r1, r8 80248cc: 4648 mov r0, r9 80248ce: 46a0 mov r8, r4 80248d0: f7ff ffa2 bl 8024818 <_Bfree> 80248d4: 9b01 ldr r3, [sp, #4] 80248d6: e7dc b.n 8024892 <__multadd+0x42> 080248d8 <__s2b>: 80248d8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80248dc: f648 6539 movw r5, #36409 ; 0x8e39 80248e0: 461f mov r7, r3 80248e2: f6c3 05e3 movt r5, #14563 ; 0x38e3 80248e6: 3308 adds r3, #8 80248e8: 4606 mov r6, r0 80248ea: 460c mov r4, r1 80248ec: 4690 mov r8, r2 80248ee: fb85 1003 smull r1, r0, r5, r3 80248f2: 17db asrs r3, r3, #31 80248f4: ebc3 0060 rsb r0, r3, r0, asr #1 80248f8: 2801 cmp r0, #1 80248fa: dd37 ble.n 802496c <__s2b+0x94> 80248fc: 2501 movs r5, #1 80248fe: 2100 movs r1, #0 8024900: 006d lsls r5, r5, #1 8024902: 3101 adds r1, #1 8024904: 42a8 cmp r0, r5 8024906: dcfb bgt.n 8024900 <__s2b+0x28> 8024908: 4630 mov r0, r6 802490a: f7ff ff4f bl 80247ac <_Balloc> 802490e: 9b08 ldr r3, [sp, #32] 8024910: 6143 str r3, [r0, #20] 8024912: 2301 movs r3, #1 8024914: f1b8 0f09 cmp.w r8, #9 8024918: 4601 mov r1, r0 802491a: 6103 str r3, [r0, #16] 802491c: dd22 ble.n 8024964 <__s2b+0x8c> 802491e: f104 0909 add.w r9, r4, #9 8024922: 4444 add r4, r8 8024924: 464d mov r5, r9 8024926: f815 3b01 ldrb.w r3, [r5], #1 802492a: 220a movs r2, #10 802492c: 4630 mov r0, r6 802492e: 3b30 subs r3, #48 ; 0x30 8024930: f7ff ff8e bl 8024850 <__multadd> 8024934: 42a5 cmp r5, r4 8024936: 4601 mov r1, r0 8024938: d1f5 bne.n 8024926 <__s2b+0x4e> 802493a: eb09 0408 add.w r4, r9, r8 802493e: 3c08 subs r4, #8 8024940: 4547 cmp r7, r8 8024942: dd0c ble.n 802495e <__s2b+0x86> 8024944: ebc8 0707 rsb r7, r8, r7 8024948: 19e7 adds r7, r4, r7 802494a: f814 3b01 ldrb.w r3, [r4], #1 802494e: 220a movs r2, #10 8024950: 4630 mov r0, r6 8024952: 3b30 subs r3, #48 ; 0x30 8024954: f7ff ff7c bl 8024850 <__multadd> 8024958: 42bc cmp r4, r7 802495a: 4601 mov r1, r0 802495c: d1f5 bne.n 802494a <__s2b+0x72> 802495e: 4608 mov r0, r1 8024960: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8024964: 340a adds r4, #10 8024966: f04f 0809 mov.w r8, #9 802496a: e7e9 b.n 8024940 <__s2b+0x68> 802496c: 2100 movs r1, #0 802496e: e7cb b.n 8024908 <__s2b+0x30> 08024970 <__hi0bits>: 8024970: 4603 mov r3, r0 8024972: 2000 movs r0, #0 8024974: 0c1a lsrs r2, r3, #16 8024976: d101 bne.n 802497c <__hi0bits+0xc> 8024978: 041b lsls r3, r3, #16 802497a: 2010 movs r0, #16 802497c: f013 4f7f tst.w r3, #4278190080 ; 0xff000000 8024980: d101 bne.n 8024986 <__hi0bits+0x16> 8024982: 3008 adds r0, #8 8024984: 021b lsls r3, r3, #8 8024986: f013 4f70 tst.w r3, #4026531840 ; 0xf0000000 802498a: d101 bne.n 8024990 <__hi0bits+0x20> 802498c: 3004 adds r0, #4 802498e: 011b lsls r3, r3, #4 8024990: f013 4f40 tst.w r3, #3221225472 ; 0xc0000000 8024994: d101 bne.n 802499a <__hi0bits+0x2a> 8024996: 3002 adds r0, #2 8024998: 009b lsls r3, r3, #2 802499a: 2b00 cmp r3, #0 802499c: db02 blt.n 80249a4 <__hi0bits+0x34> 802499e: 005b lsls r3, r3, #1 80249a0: d401 bmi.n 80249a6 <__hi0bits+0x36> 80249a2: 2020 movs r0, #32 80249a4: 4770 bx lr 80249a6: 3001 adds r0, #1 80249a8: 4770 bx lr 80249aa: bf00 nop 080249ac <__lo0bits>: 80249ac: 6803 ldr r3, [r0, #0] 80249ae: 4602 mov r2, r0 80249b0: f013 0007 ands.w r0, r3, #7 80249b4: d007 beq.n 80249c6 <__lo0bits+0x1a> 80249b6: 07d9 lsls r1, r3, #31 80249b8: d41f bmi.n 80249fa <__lo0bits+0x4e> 80249ba: 0798 lsls r0, r3, #30 80249bc: d41f bmi.n 80249fe <__lo0bits+0x52> 80249be: 089b lsrs r3, r3, #2 80249c0: 2002 movs r0, #2 80249c2: 6013 str r3, [r2, #0] 80249c4: 4770 bx lr 80249c6: b299 uxth r1, r3 80249c8: b909 cbnz r1, 80249ce <__lo0bits+0x22> 80249ca: 0c1b lsrs r3, r3, #16 80249cc: 2010 movs r0, #16 80249ce: f013 0fff tst.w r3, #255 ; 0xff 80249d2: d101 bne.n 80249d8 <__lo0bits+0x2c> 80249d4: 3008 adds r0, #8 80249d6: 0a1b lsrs r3, r3, #8 80249d8: 0719 lsls r1, r3, #28 80249da: d101 bne.n 80249e0 <__lo0bits+0x34> 80249dc: 3004 adds r0, #4 80249de: 091b lsrs r3, r3, #4 80249e0: 0799 lsls r1, r3, #30 80249e2: d101 bne.n 80249e8 <__lo0bits+0x3c> 80249e4: 3002 adds r0, #2 80249e6: 089b lsrs r3, r3, #2 80249e8: 07d9 lsls r1, r3, #31 80249ea: d404 bmi.n 80249f6 <__lo0bits+0x4a> 80249ec: 085b lsrs r3, r3, #1 80249ee: d101 bne.n 80249f4 <__lo0bits+0x48> 80249f0: 2020 movs r0, #32 80249f2: 4770 bx lr 80249f4: 3001 adds r0, #1 80249f6: 6013 str r3, [r2, #0] 80249f8: 4770 bx lr 80249fa: 2000 movs r0, #0 80249fc: 4770 bx lr 80249fe: 085b lsrs r3, r3, #1 8024a00: 2001 movs r0, #1 8024a02: 6013 str r3, [r2, #0] 8024a04: 4770 bx lr 8024a06: bf00 nop 08024a08 <__i2b>: 8024a08: b510 push {r4, lr} 8024a0a: 460c mov r4, r1 8024a0c: 2101 movs r1, #1 8024a0e: f7ff fecd bl 80247ac <_Balloc> 8024a12: 2201 movs r2, #1 8024a14: 6144 str r4, [r0, #20] 8024a16: 6102 str r2, [r0, #16] 8024a18: bd10 pop {r4, pc} 8024a1a: bf00 nop 08024a1c <__multiply>: 8024a1c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024a20: 460c mov r4, r1 8024a22: 690e ldr r6, [r1, #16] 8024a24: b085 sub sp, #20 8024a26: 6915 ldr r5, [r2, #16] 8024a28: 4617 mov r7, r2 8024a2a: 42ae cmp r6, r5 8024a2c: da04 bge.n 8024a38 <__multiply+0x1c> 8024a2e: 4632 mov r2, r6 8024a30: 463c mov r4, r7 8024a32: 462e mov r6, r5 8024a34: 460f mov r7, r1 8024a36: 4615 mov r5, r2 8024a38: 68a3 ldr r3, [r4, #8] 8024a3a: eb06 0805 add.w r8, r6, r5 8024a3e: 6861 ldr r1, [r4, #4] 8024a40: 4598 cmp r8, r3 8024a42: bfc8 it gt 8024a44: 3101 addgt r1, #1 8024a46: f7ff feb1 bl 80247ac <_Balloc> 8024a4a: eb00 0988 add.w r9, r0, r8, lsl #2 8024a4e: f100 0314 add.w r3, r0, #20 8024a52: f109 0914 add.w r9, r9, #20 8024a56: 9001 str r0, [sp, #4] 8024a58: 2000 movs r0, #0 8024a5a: 454b cmp r3, r9 8024a5c: d203 bcs.n 8024a66 <__multiply+0x4a> 8024a5e: f843 0b04 str.w r0, [r3], #4 8024a62: 4599 cmp r9, r3 8024a64: d8fb bhi.n 8024a5e <__multiply+0x42> 8024a66: eb07 0585 add.w r5, r7, r5, lsl #2 8024a6a: eb04 0686 add.w r6, r4, r6, lsl #2 8024a6e: 3714 adds r7, #20 8024a70: 3514 adds r5, #20 8024a72: 3414 adds r4, #20 8024a74: 3614 adds r6, #20 8024a76: 42af cmp r7, r5 8024a78: d257 bcs.n 8024b2a <__multiply+0x10e> 8024a7a: 9a01 ldr r2, [sp, #4] 8024a7c: f8cd 9008 str.w r9, [sp, #8] 8024a80: 46a9 mov r9, r5 8024a82: f8cd 800c str.w r8, [sp, #12] 8024a86: f102 0c18 add.w ip, r2, #24 8024a8a: 46a0 mov r8, r4 8024a8c: f857 4b04 ldr.w r4, [r7], #4 8024a90: b2a0 uxth r0, r4 8024a92: b1f0 cbz r0, 8024ad2 <__multiply+0xb6> 8024a94: 4642 mov r2, r8 8024a96: f1ac 0304 sub.w r3, ip, #4 8024a9a: 2400 movs r4, #0 8024a9c: f852 1b04 ldr.w r1, [r2], #4 8024aa0: 681d ldr r5, [r3, #0] 8024aa2: fa1f fa81 uxth.w sl, r1 8024aa6: 0c09 lsrs r1, r1, #16 8024aa8: fa1f fb85 uxth.w fp, r5 8024aac: 0c2d lsrs r5, r5, #16 8024aae: fb00 ba0a mla sl, r0, sl, fp 8024ab2: fb00 5101 mla r1, r0, r1, r5 8024ab6: 4454 add r4, sl 8024ab8: eb01 4114 add.w r1, r1, r4, lsr #16 8024abc: b2a4 uxth r4, r4 8024abe: ea44 4501 orr.w r5, r4, r1, lsl #16 8024ac2: 0c0c lsrs r4, r1, #16 8024ac4: 4296 cmp r6, r2 8024ac6: f843 5b04 str.w r5, [r3], #4 8024aca: d8e7 bhi.n 8024a9c <__multiply+0x80> 8024acc: 601c str r4, [r3, #0] 8024ace: f857 4c04 ldr.w r4, [r7, #-4] 8024ad2: 0c24 lsrs r4, r4, #16 8024ad4: d021 beq.n 8024b1a <__multiply+0xfe> 8024ad6: f85c 1c04 ldr.w r1, [ip, #-4] 8024ada: 4642 mov r2, r8 8024adc: 4663 mov r3, ip 8024ade: 2500 movs r5, #0 8024ae0: 4608 mov r0, r1 8024ae2: f8b2 a000 ldrh.w sl, [r2] 8024ae6: 0c00 lsrs r0, r0, #16 8024ae8: b289 uxth r1, r1 8024aea: 469b mov fp, r3 8024aec: fb04 000a mla r0, r4, sl, r0 8024af0: 1945 adds r5, r0, r5 8024af2: ea41 4105 orr.w r1, r1, r5, lsl #16 8024af6: f843 1c04 str.w r1, [r3, #-4] 8024afa: f853 0b04 ldr.w r0, [r3], #4 8024afe: f852 1b04 ldr.w r1, [r2], #4 8024b02: fa1f fa80 uxth.w sl, r0 8024b06: 0c09 lsrs r1, r1, #16 8024b08: fb04 a101 mla r1, r4, r1, sl 8024b0c: eb01 4115 add.w r1, r1, r5, lsr #16 8024b10: 0c0d lsrs r5, r1, #16 8024b12: 4296 cmp r6, r2 8024b14: d8e5 bhi.n 8024ae2 <__multiply+0xc6> 8024b16: f8cb 1000 str.w r1, [fp] 8024b1a: 45b9 cmp r9, r7 8024b1c: f10c 0c04 add.w ip, ip, #4 8024b20: d8b4 bhi.n 8024a8c <__multiply+0x70> 8024b22: f8dd 9008 ldr.w r9, [sp, #8] 8024b26: f8dd 800c ldr.w r8, [sp, #12] 8024b2a: f1b8 0f00 cmp.w r8, #0 8024b2e: dd0b ble.n 8024b48 <__multiply+0x12c> 8024b30: f859 3c04 ldr.w r3, [r9, #-4] 8024b34: f1a9 0904 sub.w r9, r9, #4 8024b38: b11b cbz r3, 8024b42 <__multiply+0x126> 8024b3a: e005 b.n 8024b48 <__multiply+0x12c> 8024b3c: f859 3d04 ldr.w r3, [r9, #-4]! 8024b40: b913 cbnz r3, 8024b48 <__multiply+0x12c> 8024b42: f1b8 0801 subs.w r8, r8, #1 8024b46: d1f9 bne.n 8024b3c <__multiply+0x120> 8024b48: 9b01 ldr r3, [sp, #4] 8024b4a: 4618 mov r0, r3 8024b4c: f8c3 8010 str.w r8, [r3, #16] 8024b50: b005 add sp, #20 8024b52: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024b56: bf00 nop 08024b58 <__pow5mult>: 8024b58: f012 0303 ands.w r3, r2, #3 8024b5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8024b60: 4614 mov r4, r2 8024b62: 4680 mov r8, r0 8024b64: 460f mov r7, r1 8024b66: d128 bne.n 8024bba <__pow5mult+0x62> 8024b68: 10a4 asrs r4, r4, #2 8024b6a: d01a beq.n 8024ba2 <__pow5mult+0x4a> 8024b6c: f8d8 5024 ldr.w r5, [r8, #36] ; 0x24 8024b70: 2d00 cmp r5, #0 8024b72: d02e beq.n 8024bd2 <__pow5mult+0x7a> 8024b74: 68ae ldr r6, [r5, #8] 8024b76: b92e cbnz r6, 8024b84 <__pow5mult+0x2c> 8024b78: e036 b.n 8024be8 <__pow5mult+0x90> 8024b7a: 1064 asrs r4, r4, #1 8024b7c: d011 beq.n 8024ba2 <__pow5mult+0x4a> 8024b7e: 6835 ldr r5, [r6, #0] 8024b80: b195 cbz r5, 8024ba8 <__pow5mult+0x50> 8024b82: 462e mov r6, r5 8024b84: 07e0 lsls r0, r4, #31 8024b86: d5f8 bpl.n 8024b7a <__pow5mult+0x22> 8024b88: 4639 mov r1, r7 8024b8a: 4632 mov r2, r6 8024b8c: 4640 mov r0, r8 8024b8e: f7ff ff45 bl 8024a1c <__multiply> 8024b92: 4639 mov r1, r7 8024b94: 4605 mov r5, r0 8024b96: 4640 mov r0, r8 8024b98: f7ff fe3e bl 8024818 <_Bfree> 8024b9c: 1064 asrs r4, r4, #1 8024b9e: 462f mov r7, r5 8024ba0: d1ed bne.n 8024b7e <__pow5mult+0x26> 8024ba2: 4638 mov r0, r7 8024ba4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8024ba8: 4631 mov r1, r6 8024baa: 4632 mov r2, r6 8024bac: 4640 mov r0, r8 8024bae: f7ff ff35 bl 8024a1c <__multiply> 8024bb2: 6030 str r0, [r6, #0] 8024bb4: 4606 mov r6, r0 8024bb6: 6005 str r5, [r0, #0] 8024bb8: e7e4 b.n 8024b84 <__pow5mult+0x2c> 8024bba: f646 22c0 movw r2, #27328 ; 0x6ac0 8024bbe: 1e5d subs r5, r3, #1 8024bc0: f6c0 0203 movt r2, #2051 ; 0x803 8024bc4: 2300 movs r3, #0 8024bc6: f852 2025 ldr.w r2, [r2, r5, lsl #2] 8024bca: f7ff fe41 bl 8024850 <__multadd> 8024bce: 4607 mov r7, r0 8024bd0: e7ca b.n 8024b68 <__pow5mult+0x10> 8024bd2: 2010 movs r0, #16 8024bd4: f7ff fac0 bl 8024158 8024bd8: 2300 movs r3, #0 8024bda: 4605 mov r5, r0 8024bdc: f8c8 0024 str.w r0, [r8, #36] ; 0x24 8024be0: 6043 str r3, [r0, #4] 8024be2: 6083 str r3, [r0, #8] 8024be4: 6003 str r3, [r0, #0] 8024be6: 60c3 str r3, [r0, #12] 8024be8: 4640 mov r0, r8 8024bea: f240 2171 movw r1, #625 ; 0x271 8024bee: f7ff ff0b bl 8024a08 <__i2b> 8024bf2: 2300 movs r3, #0 8024bf4: 60a8 str r0, [r5, #8] 8024bf6: 4606 mov r6, r0 8024bf8: 6003 str r3, [r0, #0] 8024bfa: e7c3 b.n 8024b84 <__pow5mult+0x2c> 08024bfc <__lshift>: 8024bfc: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024c00: 4693 mov fp, r2 8024c02: 690a ldr r2, [r1, #16] 8024c04: 460f mov r7, r1 8024c06: ea4f 156b mov.w r5, fp, asr #5 8024c0a: 688b ldr r3, [r1, #8] 8024c0c: eb05 0a02 add.w sl, r5, r2 8024c10: 4681 mov r9, r0 8024c12: f10a 0601 add.w r6, sl, #1 8024c16: 6849 ldr r1, [r1, #4] 8024c18: 429e cmp r6, r3 8024c1a: dd03 ble.n 8024c24 <__lshift+0x28> 8024c1c: 005b lsls r3, r3, #1 8024c1e: 3101 adds r1, #1 8024c20: 429e cmp r6, r3 8024c22: dcfb bgt.n 8024c1c <__lshift+0x20> 8024c24: 4648 mov r0, r9 8024c26: f7ff fdc1 bl 80247ac <_Balloc> 8024c2a: 2d00 cmp r5, #0 8024c2c: 4680 mov r8, r0 8024c2e: f100 0414 add.w r4, r0, #20 8024c32: dd0a ble.n 8024c4a <__lshift+0x4e> 8024c34: 2300 movs r3, #0 8024c36: 461a mov r2, r3 8024c38: 3301 adds r3, #1 8024c3a: f844 2b04 str.w r2, [r4], #4 8024c3e: 42ab cmp r3, r5 8024c40: d1fa bne.n 8024c38 <__lshift+0x3c> 8024c42: eb08 0383 add.w r3, r8, r3, lsl #2 8024c46: f103 0414 add.w r4, r3, #20 8024c4a: 6938 ldr r0, [r7, #16] 8024c4c: f107 0514 add.w r5, r7, #20 8024c50: eb07 0080 add.w r0, r7, r0, lsl #2 8024c54: 3014 adds r0, #20 8024c56: f01b 0b1f ands.w fp, fp, #31 8024c5a: d01c beq.n 8024c96 <__lshift+0x9a> 8024c5c: f1cb 0320 rsb r3, fp, #32 8024c60: 2200 movs r2, #0 8024c62: 6829 ldr r1, [r5, #0] 8024c64: fa01 f10b lsl.w r1, r1, fp 8024c68: 430a orrs r2, r1 8024c6a: f844 2b04 str.w r2, [r4], #4 8024c6e: f855 2b04 ldr.w r2, [r5], #4 8024c72: 42a8 cmp r0, r5 8024c74: fa22 f203 lsr.w r2, r2, r3 8024c78: d8f3 bhi.n 8024c62 <__lshift+0x66> 8024c7a: 6022 str r2, [r4, #0] 8024c7c: b10a cbz r2, 8024c82 <__lshift+0x86> 8024c7e: f10a 0602 add.w r6, sl, #2 8024c82: 4648 mov r0, r9 8024c84: 3e01 subs r6, #1 8024c86: 4639 mov r1, r7 8024c88: f8c8 6010 str.w r6, [r8, #16] 8024c8c: f7ff fdc4 bl 8024818 <_Bfree> 8024c90: 4640 mov r0, r8 8024c92: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024c96: f855 3b04 ldr.w r3, [r5], #4 8024c9a: 42a8 cmp r0, r5 8024c9c: f844 3b04 str.w r3, [r4], #4 8024ca0: d9ef bls.n 8024c82 <__lshift+0x86> 8024ca2: f855 3b04 ldr.w r3, [r5], #4 8024ca6: 42a8 cmp r0, r5 8024ca8: f844 3b04 str.w r3, [r4], #4 8024cac: d8f3 bhi.n 8024c96 <__lshift+0x9a> 8024cae: e7e8 b.n 8024c82 <__lshift+0x86> 08024cb0 <__mcmp>: 8024cb0: 4603 mov r3, r0 8024cb2: 690a ldr r2, [r1, #16] 8024cb4: 6900 ldr r0, [r0, #16] 8024cb6: b430 push {r4, r5} 8024cb8: 1a80 subs r0, r0, r2 8024cba: d10f bne.n 8024cdc <__mcmp+0x2c> 8024cbc: 3204 adds r2, #4 8024cbe: f103 0514 add.w r5, r3, #20 8024cc2: 0092 lsls r2, r2, #2 8024cc4: 189b adds r3, r3, r2 8024cc6: 1889 adds r1, r1, r2 8024cc8: 3304 adds r3, #4 8024cca: 3104 adds r1, #4 8024ccc: f853 2d04 ldr.w r2, [r3, #-4]! 8024cd0: f851 4d04 ldr.w r4, [r1, #-4]! 8024cd4: 42a2 cmp r2, r4 8024cd6: d103 bne.n 8024ce0 <__mcmp+0x30> 8024cd8: 429d cmp r5, r3 8024cda: d3f7 bcc.n 8024ccc <__mcmp+0x1c> 8024cdc: bc30 pop {r4, r5} 8024cde: 4770 bx lr 8024ce0: 4294 cmp r4, r2 8024ce2: bf94 ite ls 8024ce4: 2001 movls r0, #1 8024ce6: f04f 30ff movhi.w r0, #4294967295 8024cea: e7f7 b.n 8024cdc <__mcmp+0x2c> 08024cec <__mdiff>: 8024cec: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024cf0: 468b mov fp, r1 8024cf2: 4604 mov r4, r0 8024cf4: 4611 mov r1, r2 8024cf6: 4658 mov r0, fp 8024cf8: 4691 mov r9, r2 8024cfa: f7ff ffd9 bl 8024cb0 <__mcmp> 8024cfe: 1e05 subs r5, r0, #0 8024d00: d061 beq.n 8024dc6 <__mdiff+0xda> 8024d02: bfbc itt lt 8024d04: 465b movlt r3, fp 8024d06: 46cb movlt fp, r9 8024d08: 4620 mov r0, r4 8024d0a: bfb8 it lt 8024d0c: 4699 movlt r9, r3 8024d0e: f8db 1004 ldr.w r1, [fp, #4] 8024d12: bfac ite ge 8024d14: f04f 0800 movge.w r8, #0 8024d18: f04f 0801 movlt.w r8, #1 8024d1c: f7ff fd46 bl 80247ac <_Balloc> 8024d20: f8db 7010 ldr.w r7, [fp, #16] 8024d24: f109 0514 add.w r5, r9, #20 8024d28: f8d9 3010 ldr.w r3, [r9, #16] 8024d2c: f10b 0614 add.w r6, fp, #20 8024d30: 2400 movs r4, #0 8024d32: eb0b 0c87 add.w ip, fp, r7, lsl #2 8024d36: eb09 0983 add.w r9, r9, r3, lsl #2 8024d3a: f10c 0c14 add.w ip, ip, #20 8024d3e: f109 0914 add.w r9, r9, #20 8024d42: f100 0a14 add.w sl, r0, #20 8024d46: f8c0 800c str.w r8, [r0, #12] 8024d4a: f856 8b04 ldr.w r8, [r6], #4 8024d4e: 4653 mov r3, sl 8024d50: f855 ab04 ldr.w sl, [r5], #4 8024d54: 4632 mov r2, r6 8024d56: fa1f f188 uxth.w r1, r8 8024d5a: 1909 adds r1, r1, r4 8024d5c: fa1f fb8a uxth.w fp, sl 8024d60: ebcb 0101 rsb r1, fp, r1 8024d64: ea4f 441a mov.w r4, sl, lsr #16 8024d68: ebc4 4418 rsb r4, r4, r8, lsr #16 8024d6c: eb04 4421 add.w r4, r4, r1, asr #16 8024d70: b289 uxth r1, r1 8024d72: ea41 4104 orr.w r1, r1, r4, lsl #16 8024d76: 1424 asrs r4, r4, #16 8024d78: 45a9 cmp r9, r5 8024d7a: f843 1b04 str.w r1, [r3], #4 8024d7e: 469a mov sl, r3 8024d80: d8e3 bhi.n 8024d4a <__mdiff+0x5e> 8024d82: 45b4 cmp ip, r6 8024d84: 4698 mov r8, r3 8024d86: d914 bls.n 8024db2 <__mdiff+0xc6> 8024d88: f852 5b04 ldr.w r5, [r2], #4 8024d8c: b2a9 uxth r1, r5 8024d8e: 0c2d lsrs r5, r5, #16 8024d90: 190c adds r4, r1, r4 8024d92: eb05 4524 add.w r5, r5, r4, asr #16 8024d96: b2a4 uxth r4, r4 8024d98: ea44 4105 orr.w r1, r4, r5, lsl #16 8024d9c: 142c asrs r4, r5, #16 8024d9e: 4594 cmp ip, r2 8024da0: f843 1b04 str.w r1, [r3], #4 8024da4: d8f0 bhi.n 8024d88 <__mdiff+0x9c> 8024da6: 43f3 mvns r3, r6 8024da8: 4463 add r3, ip 8024daa: f023 0303 bic.w r3, r3, #3 8024dae: 3304 adds r3, #4 8024db0: 4443 add r3, r8 8024db2: 3b04 subs r3, #4 8024db4: b921 cbnz r1, 8024dc0 <__mdiff+0xd4> 8024db6: f853 2d04 ldr.w r2, [r3, #-4]! 8024dba: 3f01 subs r7, #1 8024dbc: 2a00 cmp r2, #0 8024dbe: d0fa beq.n 8024db6 <__mdiff+0xca> 8024dc0: 6107 str r7, [r0, #16] 8024dc2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024dc6: 4620 mov r0, r4 8024dc8: 4629 mov r1, r5 8024dca: f7ff fcef bl 80247ac <_Balloc> 8024dce: 2301 movs r3, #1 8024dd0: 6145 str r5, [r0, #20] 8024dd2: 6103 str r3, [r0, #16] 8024dd4: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08024dd8 <__ulp>: 8024dd8: 2300 movs r3, #0 8024dda: f6c7 73f0 movt r3, #32752 ; 0x7ff0 8024dde: 400b ands r3, r1 8024de0: f1a3 7350 sub.w r3, r3, #54525952 ; 0x3400000 8024de4: 2b00 cmp r3, #0 8024de6: dd02 ble.n 8024dee <__ulp+0x16> 8024de8: 4619 mov r1, r3 8024dea: 2000 movs r0, #0 8024dec: 4770 bx lr 8024dee: 425b negs r3, r3 8024df0: 2100 movs r1, #0 8024df2: 151b asrs r3, r3, #20 8024df4: 2b13 cmp r3, #19 8024df6: dd0b ble.n 8024e10 <__ulp+0x38> 8024df8: 2b32 cmp r3, #50 ; 0x32 8024dfa: dd02 ble.n 8024e02 <__ulp+0x2a> 8024dfc: 2301 movs r3, #1 8024dfe: 4618 mov r0, r3 8024e00: 4770 bx lr 8024e02: 2201 movs r2, #1 8024e04: f1c3 0333 rsb r3, r3, #51 ; 0x33 8024e08: fa02 f303 lsl.w r3, r2, r3 8024e0c: 4618 mov r0, r3 8024e0e: 4770 bx lr 8024e10: f44f 2200 mov.w r2, #524288 ; 0x80000 8024e14: 2000 movs r0, #0 8024e16: fa42 f103 asr.w r1, r2, r3 8024e1a: 4770 bx lr 08024e1c <__b2d>: 8024e1c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8024e20: f100 0814 add.w r8, r0, #20 8024e24: 6906 ldr r6, [r0, #16] 8024e26: 4689 mov r9, r1 8024e28: 3604 adds r6, #4 8024e2a: eb00 0686 add.w r6, r0, r6, lsl #2 8024e2e: 4634 mov r4, r6 8024e30: 4637 mov r7, r6 8024e32: f854 5b04 ldr.w r5, [r4], #4 8024e36: 4628 mov r0, r5 8024e38: f7ff fd9a bl 8024970 <__hi0bits> 8024e3c: 280a cmp r0, #10 8024e3e: f1c0 0320 rsb r3, r0, #32 8024e42: f8c9 3000 str.w r3, [r9] 8024e46: dc18 bgt.n 8024e7a <__b2d+0x5e> 8024e48: 45b0 cmp r8, r6 8024e4a: f1c0 010b rsb r1, r0, #11 8024e4e: fa25 f701 lsr.w r7, r5, r1 8024e52: bf38 it cc 8024e54: f854 4c08 ldrcc.w r4, [r4, #-8] 8024e58: f047 577f orr.w r7, r7, #1069547520 ; 0x3fc00000 8024e5c: f447 1340 orr.w r3, r7, #3145728 ; 0x300000 8024e60: bf34 ite cc 8024e62: fa24 f101 lsrcc.w r1, r4, r1 8024e66: 2100 movcs r1, #0 8024e68: 3015 adds r0, #21 8024e6a: fa05 f500 lsl.w r5, r5, r0 8024e6e: ea41 0205 orr.w r2, r1, r5 8024e72: 4610 mov r0, r2 8024e74: 4619 mov r1, r3 8024e76: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8024e7a: 2100 movs r1, #0 8024e7c: 45b0 cmp r8, r6 8024e7e: d202 bcs.n 8024e86 <__b2d+0x6a> 8024e80: f854 1c08 ldr.w r1, [r4, #-8] 8024e84: 1f37 subs r7, r6, #4 8024e86: f1b0 040b subs.w r4, r0, #11 8024e8a: d018 beq.n 8024ebe <__b2d+0xa2> 8024e8c: fa05 f504 lsl.w r5, r5, r4 8024e90: f1c0 002b rsb r0, r0, #43 ; 0x2b 8024e94: 4547 cmp r7, r8 8024e96: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 8024e9a: fa21 f600 lsr.w r6, r1, r0 8024e9e: f445 1540 orr.w r5, r5, #3145728 ; 0x300000 8024ea2: ea45 0306 orr.w r3, r5, r6 8024ea6: bf88 it hi 8024ea8: f857 5c04 ldrhi.w r5, [r7, #-4] 8024eac: fa01 f104 lsl.w r1, r1, r4 8024eb0: bf8c ite hi 8024eb2: fa25 f000 lsrhi.w r0, r5, r0 8024eb6: 2000 movls r0, #0 8024eb8: ea40 0201 orr.w r2, r0, r1 8024ebc: e7d9 b.n 8024e72 <__b2d+0x56> 8024ebe: f045 557f orr.w r5, r5, #1069547520 ; 0x3fc00000 8024ec2: 460a mov r2, r1 8024ec4: f445 1340 orr.w r3, r5, #3145728 ; 0x300000 8024ec8: e7d3 b.n 8024e72 <__b2d+0x56> 8024eca: bf00 nop 08024ecc <__d2b>: 8024ecc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8024ed0: b083 sub sp, #12 8024ed2: 2101 movs r1, #1 8024ed4: 461d mov r5, r3 8024ed6: 4614 mov r4, r2 8024ed8: 9f0a ldr r7, [sp, #40] ; 0x28 8024eda: f7ff fc67 bl 80247ac <_Balloc> 8024ede: f3c5 560a ubfx r6, r5, #20, #11 8024ee2: f025 437f bic.w r3, r5, #4278190080 ; 0xff000000 8024ee6: 46a9 mov r9, r5 8024ee8: f423 0370 bic.w r3, r3, #15728640 ; 0xf00000 8024eec: 4680 mov r8, r0 8024eee: b10e cbz r6, 8024ef4 <__d2b+0x28> 8024ef0: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 8024ef4: 9301 str r3, [sp, #4] 8024ef6: 2c00 cmp r4, #0 8024ef8: d024 beq.n 8024f44 <__d2b+0x78> 8024efa: a802 add r0, sp, #8 8024efc: f840 4d08 str.w r4, [r0, #-8]! 8024f00: 4668 mov r0, sp 8024f02: f7ff fd53 bl 80249ac <__lo0bits> 8024f06: 9b01 ldr r3, [sp, #4] 8024f08: 2800 cmp r0, #0 8024f0a: d131 bne.n 8024f70 <__d2b+0xa4> 8024f0c: 9a00 ldr r2, [sp, #0] 8024f0e: f8c8 2014 str.w r2, [r8, #20] 8024f12: 2b00 cmp r3, #0 8024f14: bf0c ite eq 8024f16: 2401 moveq r4, #1 8024f18: 2402 movne r4, #2 8024f1a: f8c8 3018 str.w r3, [r8, #24] 8024f1e: f8c8 4010 str.w r4, [r8, #16] 8024f22: b9e6 cbnz r6, 8024f5e <__d2b+0x92> 8024f24: eb08 0384 add.w r3, r8, r4, lsl #2 8024f28: f2a0 4032 subw r0, r0, #1074 ; 0x432 8024f2c: 6038 str r0, [r7, #0] 8024f2e: 6918 ldr r0, [r3, #16] 8024f30: f7ff fd1e bl 8024970 <__hi0bits> 8024f34: 9b0b ldr r3, [sp, #44] ; 0x2c 8024f36: ebc0 1044 rsb r0, r0, r4, lsl #5 8024f3a: 6018 str r0, [r3, #0] 8024f3c: 4640 mov r0, r8 8024f3e: b003 add sp, #12 8024f40: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8024f44: a801 add r0, sp, #4 8024f46: f7ff fd31 bl 80249ac <__lo0bits> 8024f4a: 2301 movs r3, #1 8024f4c: 461c mov r4, r3 8024f4e: f8c8 3010 str.w r3, [r8, #16] 8024f52: 9b01 ldr r3, [sp, #4] 8024f54: f8c8 3014 str.w r3, [r8, #20] 8024f58: 3020 adds r0, #32 8024f5a: 2e00 cmp r6, #0 8024f5c: d0e2 beq.n 8024f24 <__d2b+0x58> 8024f5e: 9a0b ldr r2, [sp, #44] ; 0x2c 8024f60: f2a6 4933 subw r9, r6, #1075 ; 0x433 8024f64: f1c0 0335 rsb r3, r0, #53 ; 0x35 8024f68: 4448 add r0, r9 8024f6a: 6038 str r0, [r7, #0] 8024f6c: 6013 str r3, [r2, #0] 8024f6e: e7e5 b.n 8024f3c <__d2b+0x70> 8024f70: f1c0 0120 rsb r1, r0, #32 8024f74: 9a00 ldr r2, [sp, #0] 8024f76: fa03 f101 lsl.w r1, r3, r1 8024f7a: fa23 f300 lsr.w r3, r3, r0 8024f7e: 430a orrs r2, r1 8024f80: 9301 str r3, [sp, #4] 8024f82: f8c8 2014 str.w r2, [r8, #20] 8024f86: e7c4 b.n 8024f12 <__d2b+0x46> 08024f88 <__ratio>: 8024f88: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8024f8c: b083 sub sp, #12 8024f8e: 4688 mov r8, r1 8024f90: 4669 mov r1, sp 8024f92: 4606 mov r6, r0 8024f94: f7ff ff42 bl 8024e1c <__b2d> 8024f98: 460d mov r5, r1 8024f9a: 4604 mov r4, r0 8024f9c: a901 add r1, sp, #4 8024f9e: 4640 mov r0, r8 8024fa0: f7ff ff3c bl 8024e1c <__b2d> 8024fa4: 462f mov r7, r5 8024fa6: 460b mov r3, r1 8024fa8: 4602 mov r2, r0 8024faa: f8d8 1010 ldr.w r1, [r8, #16] 8024fae: 4699 mov r9, r3 8024fb0: 6930 ldr r0, [r6, #16] 8024fb2: 4626 mov r6, r4 8024fb4: 4690 mov r8, r2 8024fb6: ebc1 0e00 rsb lr, r1, r0 8024fba: e89d 0003 ldmia.w sp, {r0, r1} 8024fbe: 1a40 subs r0, r0, r1 8024fc0: eb00 114e add.w r1, r0, lr, lsl #5 8024fc4: 2900 cmp r1, #0 8024fc6: bfc9 itett gt 8024fc8: eb05 5701 addgt.w r7, r5, r1, lsl #20 8024fcc: eba3 5901 suble.w r9, r3, r1, lsl #20 8024fd0: 4624 movgt r4, r4 8024fd2: 463d movgt r5, r7 8024fd4: bfdc itt le 8024fd6: 4612 movle r2, r2 8024fd8: 464b movle r3, r9 8024fda: 4620 mov r0, r4 8024fdc: 4629 mov r1, r5 8024fde: f7fb fc19 bl 8020814 <__aeabi_ddiv> 8024fe2: b003 add sp, #12 8024fe4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08024fe8 <_mprec_log10>: 8024fe8: 2817 cmp r0, #23 8024fea: b510 push {r4, lr} 8024fec: 4604 mov r4, r0 8024fee: dd0c ble.n 802500a <_mprec_log10+0x22> 8024ff0: 2100 movs r1, #0 8024ff2: 2000 movs r0, #0 8024ff4: f6c3 71f0 movt r1, #16368 ; 0x3ff0 8024ff8: 2300 movs r3, #0 8024ffa: 2200 movs r2, #0 8024ffc: f2c4 0324 movt r3, #16420 ; 0x4024 8025000: f7fb fade bl 80205c0 <__aeabi_dmul> 8025004: 3c01 subs r4, #1 8025006: d1f7 bne.n 8024ff8 <_mprec_log10+0x10> 8025008: bd10 pop {r4, pc} 802500a: f646 23c0 movw r3, #27328 ; 0x6ac0 802500e: f6c0 0303 movt r3, #2051 ; 0x803 8025012: eb03 03c0 add.w r3, r3, r0, lsl #3 8025016: e9d3 0104 ldrd r0, r1, [r3, #16] 802501a: bd10 pop {r4, pc} 0802501c <__copybits>: 802501c: b470 push {r4, r5, r6} 802501e: 3901 subs r1, #1 8025020: 6915 ldr r5, [r2, #16] 8025022: f102 0314 add.w r3, r2, #20 8025026: 114e asrs r6, r1, #5 8025028: 3601 adds r6, #1 802502a: eb02 0585 add.w r5, r2, r5, lsl #2 802502e: 3514 adds r5, #20 8025030: eb00 0686 add.w r6, r0, r6, lsl #2 8025034: 42ab cmp r3, r5 8025036: d20c bcs.n 8025052 <__copybits+0x36> 8025038: 4601 mov r1, r0 802503a: f853 4b04 ldr.w r4, [r3], #4 802503e: 429d cmp r5, r3 8025040: f841 4b04 str.w r4, [r1], #4 8025044: d8f9 bhi.n 802503a <__copybits+0x1e> 8025046: 1aab subs r3, r5, r2 8025048: 3b15 subs r3, #21 802504a: f023 0303 bic.w r3, r3, #3 802504e: 3304 adds r3, #4 8025050: 18c0 adds r0, r0, r3 8025052: 4286 cmp r6, r0 8025054: d904 bls.n 8025060 <__copybits+0x44> 8025056: 2300 movs r3, #0 8025058: f840 3b04 str.w r3, [r0], #4 802505c: 4286 cmp r6, r0 802505e: d8fb bhi.n 8025058 <__copybits+0x3c> 8025060: bc70 pop {r4, r5, r6} 8025062: 4770 bx lr 08025064 <__any_on>: 8025064: b430 push {r4, r5} 8025066: 114b asrs r3, r1, #5 8025068: 6904 ldr r4, [r0, #16] 802506a: f100 0214 add.w r2, r0, #20 802506e: 429c cmp r4, r3 8025070: bfb8 it lt 8025072: 4623 movlt r3, r4 8025074: db00 blt.n 8025078 <__any_on+0x14> 8025076: dc11 bgt.n 802509c <__any_on+0x38> 8025078: 3304 adds r3, #4 802507a: eb00 0083 add.w r0, r0, r3, lsl #2 802507e: 1d03 adds r3, r0, #4 8025080: 429a cmp r2, r3 8025082: d218 bcs.n 80250b6 <__any_on+0x52> 8025084: f853 3c04 ldr.w r3, [r3, #-4] 8025088: b92b cbnz r3, 8025096 <__any_on+0x32> 802508a: 4282 cmp r2, r0 802508c: d213 bcs.n 80250b6 <__any_on+0x52> 802508e: f850 3d04 ldr.w r3, [r0, #-4]! 8025092: 2b00 cmp r3, #0 8025094: d0f9 beq.n 802508a <__any_on+0x26> 8025096: 2001 movs r0, #1 8025098: bc30 pop {r4, r5} 802509a: 4770 bx lr 802509c: f011 011f ands.w r1, r1, #31 80250a0: d0ea beq.n 8025078 <__any_on+0x14> 80250a2: eb00 0483 add.w r4, r0, r3, lsl #2 80250a6: 6964 ldr r4, [r4, #20] 80250a8: fa24 f501 lsr.w r5, r4, r1 80250ac: fa05 f101 lsl.w r1, r5, r1 80250b0: 42a1 cmp r1, r4 80250b2: d1f0 bne.n 8025096 <__any_on+0x32> 80250b4: e7e0 b.n 8025078 <__any_on+0x14> 80250b6: 2000 movs r0, #0 80250b8: e7ee b.n 8025098 <__any_on+0x34> 80250ba: bf00 nop 080250bc <_sbrk_r>: 80250bc: b538 push {r3, r4, r5, lr} 80250be: f245 2408 movw r4, #21000 ; 0x5208 80250c2: f2c2 0401 movt r4, #8193 ; 0x2001 80250c6: 4605 mov r5, r0 80250c8: 4608 mov r0, r1 80250ca: 2300 movs r3, #0 80250cc: 6023 str r3, [r4, #0] 80250ce: f011 fc1b bl 8036908 <_sbrk> 80250d2: 1c43 adds r3, r0, #1 80250d4: d000 beq.n 80250d8 <_sbrk_r+0x1c> 80250d6: bd38 pop {r3, r4, r5, pc} 80250d8: 6823 ldr r3, [r4, #0] 80250da: 2b00 cmp r3, #0 80250dc: d0fb beq.n 80250d6 <_sbrk_r+0x1a> 80250de: 602b str r3, [r5, #0] 80250e0: bd38 pop {r3, r4, r5, pc} 80250e2: bf00 nop 080250e4 : 80250e4: b2c9 uxtb r1, r1 80250e6: b4f0 push {r4, r5, r6, r7} 80250e8: 2900 cmp r1, #0 80250ea: d04b beq.n 8025184 80250ec: 0783 lsls r3, r0, #30 80250ee: d00f beq.n 8025110 80250f0: 7803 ldrb r3, [r0, #0] 80250f2: 2b00 cmp r3, #0 80250f4: d073 beq.n 80251de 80250f6: 4299 cmp r1, r3 80250f8: d042 beq.n 8025180 80250fa: 1c43 adds r3, r0, #1 80250fc: e005 b.n 802510a 80250fe: f813 2b01 ldrb.w r2, [r3], #1 8025102: 2a00 cmp r2, #0 8025104: d03b beq.n 802517e 8025106: 4291 cmp r1, r2 8025108: d03a beq.n 8025180 802510a: 079a lsls r2, r3, #30 802510c: 4618 mov r0, r3 802510e: d1f6 bne.n 80250fe 8025110: 6803 ldr r3, [r0, #0] 8025112: ea41 2701 orr.w r7, r1, r1, lsl #8 8025116: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802511a: ea47 4707 orr.w r7, r7, r7, lsl #16 802511e: ea22 0203 bic.w r2, r2, r3 8025122: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8025126: d11c bne.n 8025162 8025128: 407b eors r3, r7 802512a: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802512e: ea22 0303 bic.w r3, r2, r3 8025132: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8025136: d114 bne.n 8025162 8025138: 1d02 adds r2, r0, #4 802513a: e002 b.n 8025142 802513c: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8025140: d10f bne.n 8025162 8025142: 4610 mov r0, r2 8025144: f852 3b04 ldr.w r3, [r2], #4 8025148: f1a3 3601 sub.w r6, r3, #16843009 ; 0x1010101 802514c: ea87 0403 eor.w r4, r7, r3 8025150: ea26 0303 bic.w r3, r6, r3 8025154: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8025158: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802515c: ea25 0404 bic.w r4, r5, r4 8025160: d0ec beq.n 802513c 8025162: 7803 ldrb r3, [r0, #0] 8025164: 2b00 cmp r3, #0 8025166: d03a beq.n 80251de 8025168: 4299 cmp r1, r3 802516a: d009 beq.n 8025180 802516c: 1c43 adds r3, r0, #1 802516e: e001 b.n 8025174 8025170: 4291 cmp r1, r2 8025172: d005 beq.n 8025180 8025174: 4618 mov r0, r3 8025176: f813 2b01 ldrb.w r2, [r3], #1 802517a: 2a00 cmp r2, #0 802517c: d1f8 bne.n 8025170 802517e: 4610 mov r0, r2 8025180: bcf0 pop {r4, r5, r6, r7} 8025182: 4770 bx lr 8025184: 0781 lsls r1, r0, #30 8025186: d00d beq.n 80251a4 8025188: 7803 ldrb r3, [r0, #0] 802518a: 2b00 cmp r3, #0 802518c: d0f8 beq.n 8025180 802518e: 1c43 adds r3, r0, #1 8025190: e002 b.n 8025198 8025192: 7802 ldrb r2, [r0, #0] 8025194: 2a00 cmp r2, #0 8025196: d0f3 beq.n 8025180 8025198: f013 0f03 tst.w r3, #3 802519c: 4618 mov r0, r3 802519e: f103 0301 add.w r3, r3, #1 80251a2: d1f6 bne.n 8025192 80251a4: 6803 ldr r3, [r0, #0] 80251a6: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80251aa: ea22 0303 bic.w r3, r2, r3 80251ae: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 80251b2: d10a bne.n 80251ca 80251b4: 1d02 adds r2, r0, #4 80251b6: 4610 mov r0, r2 80251b8: f852 1b04 ldr.w r1, [r2], #4 80251bc: f1a1 3401 sub.w r4, r1, #16843009 ; 0x1010101 80251c0: ea24 0101 bic.w r1, r4, r1 80251c4: f011 3f80 tst.w r1, #2155905152 ; 0x80808080 80251c8: d0f5 beq.n 80251b6 80251ca: 7803 ldrb r3, [r0, #0] 80251cc: 2b00 cmp r3, #0 80251ce: d0d7 beq.n 8025180 80251d0: 1c43 adds r3, r0, #1 80251d2: 4618 mov r0, r3 80251d4: 3301 adds r3, #1 80251d6: 7802 ldrb r2, [r0, #0] 80251d8: 2a00 cmp r2, #0 80251da: d1fa bne.n 80251d2 80251dc: e7d0 b.n 8025180 80251de: 4618 mov r0, r3 80251e0: e7ce b.n 8025180 80251e2: bf00 nop 080251e4 <_calloc_r>: 80251e4: b510 push {r4, lr} 80251e6: fb01 f102 mul.w r1, r1, r2 80251ea: f7fe ffc5 bl 8024178 <_malloc_r> 80251ee: 4604 mov r4, r0 80251f0: b170 cbz r0, 8025210 <_calloc_r+0x2c> 80251f2: f850 2c04 ldr.w r2, [r0, #-4] 80251f6: f022 0203 bic.w r2, r2, #3 80251fa: 3a04 subs r2, #4 80251fc: 2a24 cmp r2, #36 ; 0x24 80251fe: d81c bhi.n 802523a <_calloc_r+0x56> 8025200: 2a13 cmp r2, #19 8025202: bf98 it ls 8025204: 4603 movls r3, r0 8025206: d805 bhi.n 8025214 <_calloc_r+0x30> 8025208: 2200 movs r2, #0 802520a: 601a str r2, [r3, #0] 802520c: 605a str r2, [r3, #4] 802520e: 609a str r2, [r3, #8] 8025210: 4620 mov r0, r4 8025212: bd10 pop {r4, pc} 8025214: 2100 movs r1, #0 8025216: 2a1b cmp r2, #27 8025218: 6001 str r1, [r0, #0] 802521a: bf98 it ls 802521c: f100 0308 addls.w r3, r0, #8 8025220: 6041 str r1, [r0, #4] 8025222: d9f1 bls.n 8025208 <_calloc_r+0x24> 8025224: 2a24 cmp r2, #36 ; 0x24 8025226: 6081 str r1, [r0, #8] 8025228: 60c1 str r1, [r0, #12] 802522a: bf11 iteee ne 802522c: f100 0310 addne.w r3, r0, #16 8025230: 6101 streq r1, [r0, #16] 8025232: f100 0318 addeq.w r3, r0, #24 8025236: 6141 streq r1, [r0, #20] 8025238: e7e6 b.n 8025208 <_calloc_r+0x24> 802523a: 2100 movs r1, #0 802523c: f7fc fc40 bl 8021ac0 8025240: 4620 mov r0, r4 8025242: bd10 pop {r4, pc} 08025244 <__aeabi_d2uiz>: 8025244: 004a lsls r2, r1, #1 8025246: d211 bcs.n 802526c <__aeabi_d2uiz+0x28> 8025248: f512 1200 adds.w r2, r2, #2097152 ; 0x200000 802524c: d211 bcs.n 8025272 <__aeabi_d2uiz+0x2e> 802524e: d50d bpl.n 802526c <__aeabi_d2uiz+0x28> 8025250: f46f 7378 mvn.w r3, #992 ; 0x3e0 8025254: ebb3 5262 subs.w r2, r3, r2, asr #21 8025258: d40e bmi.n 8025278 <__aeabi_d2uiz+0x34> 802525a: ea4f 23c1 mov.w r3, r1, lsl #11 802525e: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 8025262: ea43 5350 orr.w r3, r3, r0, lsr #21 8025266: fa23 f002 lsr.w r0, r3, r2 802526a: 4770 bx lr 802526c: f04f 0000 mov.w r0, #0 8025270: 4770 bx lr 8025272: ea50 3001 orrs.w r0, r0, r1, lsl #12 8025276: d102 bne.n 802527e <__aeabi_d2uiz+0x3a> 8025278: f04f 30ff mov.w r0, #4294967295 802527c: 4770 bx lr 802527e: f04f 0000 mov.w r0, #0 8025282: 4770 bx lr 08025284 : 8025284: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 8025288: 4770 bx lr 802528a: bf00 nop 0802528c : { /* Check the parameters */ assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup)); /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */ SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup; 802528c: f040 60bf orr.w r0, r0, #100139008 ; 0x5f80000 8025290: 4b02 ldr r3, [pc, #8] ; (802529c ) 8025292: f440 3000 orr.w r0, r0, #131072 ; 0x20000 8025296: 60d8 str r0, [r3, #12] 8025298: 4770 bx lr 802529a: bf00 nop 802529c: e000ed00 .word 0xe000ed00 080252a0 : /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority)); assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) 80252a0: 78c3 ldrb r3, [r0, #3] 80252a2: b30b cbz r3, 80252e8 { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80252a4: 4b16 ldr r3, [pc, #88] ; (8025300 ) tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80252a6: 7841 ldrb r1, [r0, #1] assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80252a8: 68db ldr r3, [r3, #12] 80252aa: 43db mvns r3, r3 80252ac: f3c3 2302 ubfx r3, r3, #8, #3 tmppre = (0x4 - tmppriority); 80252b0: f1c3 0204 rsb r2, r3, #4 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80252b4: b2d2 uxtb r2, r2 80252b6: fa01 f202 lsl.w r2, r1, r2 if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; 80252ba: 210f movs r1, #15 80252bc: fa41 f303 asr.w r3, r1, r3 tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80252c0: 7881 ldrb r1, [r0, #2] /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80252c2: b2d2 uxtb r2, r2 tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80252c4: 400b ands r3, r1 80252c6: 431a orrs r2, r3 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80252c8: 7803 ldrb r3, [r0, #0] 80252ca: f103 4360 add.w r3, r3, #3758096384 ; 0xe0000000 80252ce: f503 4361 add.w r3, r3, #57600 ; 0xe100 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); tmppriority = tmppriority << 0x04; 80252d2: 0112 lsls r2, r2, #4 NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80252d4: f883 2300 strb.w r2, [r3, #768] ; 0x300 /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252d8: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252da: 2201 movs r2, #1 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252dc: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252de: f003 031f and.w r3, r3, #31 80252e2: fa02 f303 lsl.w r3, r2, r3 80252e6: e007 b.n 80252f8 } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252e8: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252ea: 2201 movs r2, #1 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252ec: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 80252ee: f003 031f and.w r3, r3, #31 80252f2: fa02 f303 lsl.w r3, r2, r3 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 80252f6: 3120 adds r1, #32 80252f8: 4a02 ldr r2, [pc, #8] ; (8025304 ) 80252fa: f842 3021 str.w r3, [r2, r1, lsl #2] 80252fe: 4770 bx lr 8025300: e000ed00 .word 0xe000ed00 8025304: e000e100 .word 0xe000e100 08025308 : { /* Check the parameters */ assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); assert_param(IS_NVIC_OFFSET(Offset)); SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); 8025308: f021 4160 bic.w r1, r1, #3758096384 ; 0xe0000000 802530c: f021 017f bic.w r1, r1, #127 ; 0x7f 8025310: 4b01 ldr r3, [pc, #4] ; (8025318 ) 8025312: 4308 orrs r0, r1 8025314: 6098 str r0, [r3, #8] 8025316: 4770 bx lr 8025318: e000ed00 .word 0xe000ed00 0802531c : * @retval None */ void CRC_ResetDR(void) { /* Reset CRC generator */ CRC->CR = CRC_CR_RESET; 802531c: 4b01 ldr r3, [pc, #4] ; (8025324 ) 802531e: 2201 movs r2, #1 8025320: 609a str r2, [r3, #8] 8025322: 4770 bx lr 8025324: 40023000 .word 0x40023000 08025328 : * @param pBuffer: pointer to the buffer containing the data to be computed * @param BufferLength: length of the buffer to be computed * @retval 32-bit CRC */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { 8025328: b510 push {r4, lr} uint32_t index = 0; for(index = 0; index < BufferLength; index++) 802532a: 2300 movs r3, #0 802532c: 4c05 ldr r4, [pc, #20] ; (8025344 ) 802532e: e003 b.n 8025338 { CRC->DR = pBuffer[index]; 8025330: f850 2023 ldr.w r2, [r0, r3, lsl #2] */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index = 0; for(index = 0; index < BufferLength; index++) 8025334: 3301 adds r3, #1 { CRC->DR = pBuffer[index]; 8025336: 6022 str r2, [r4, #0] */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index = 0; for(index = 0; index < BufferLength; index++) 8025338: 428b cmp r3, r1 802533a: d1f9 bne.n 8025330 { CRC->DR = pBuffer[index]; } return (CRC->DR); 802533c: 4b01 ldr r3, [pc, #4] ; (8025344 ) 802533e: 6818 ldr r0, [r3, #0] } 8025340: bd10 pop {r4, pc} 8025342: bf00 nop 8025344: 40023000 .word 0x40023000 08025348 : * @param None * @retval None */ void FLASH_Unlock(void) { if((FLASH->CR & FLASH_CR_LOCK) != RESET) 8025348: 4b04 ldr r3, [pc, #16] ; (802535c ) 802534a: 691a ldr r2, [r3, #16] 802534c: 2a00 cmp r2, #0 802534e: da04 bge.n 802535a { /* Authorize the FLASH Registers access */ FLASH->KEYR = FLASH_KEY1; 8025350: 4a03 ldr r2, [pc, #12] ; (8025360 ) 8025352: 605a str r2, [r3, #4] FLASH->KEYR = FLASH_KEY2; 8025354: f102 3288 add.w r2, r2, #2290649224 ; 0x88888888 8025358: 605a str r2, [r3, #4] 802535a: 4770 bx lr 802535c: 40023c00 .word 0x40023c00 8025360: 45670123 .word 0x45670123 08025364 : * @retval None */ void FLASH_Lock(void) { /* Set the LOCK Bit to lock the FLASH Registers access */ FLASH->CR |= FLASH_CR_LOCK; 8025364: 4b02 ldr r3, [pc, #8] ; (8025370 ) 8025366: 691a ldr r2, [r3, #16] 8025368: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 802536c: 611a str r2, [r3, #16] 802536e: 4770 bx lr 8025370: 40023c00 .word 0x40023c00 08025374 : { /* Check the parameters */ assert_param(IS_FLASH_CLEAR_FLAG(FLASH_FLAG)); /* Clear the flags */ FLASH->SR = FLASH_FLAG; 8025374: 4b01 ldr r3, [pc, #4] ; (802537c ) 8025376: 60d8 str r0, [r3, #12] 8025378: 4770 bx lr 802537a: bf00 nop 802537c: 40023c00 .word 0x40023c00 08025380 : */ FLASH_Status FLASH_GetStatus(void) { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) 8025380: 4b0b ldr r3, [pc, #44] ; (80253b0 ) 8025382: 68da ldr r2, [r3, #12] 8025384: 03d0 lsls r0, r2, #15 8025386: d40d bmi.n 80253a4 { flashstatus = FLASH_BUSY; } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) 8025388: 68da ldr r2, [r3, #12] 802538a: 06d1 lsls r1, r2, #27 802538c: d40c bmi.n 80253a8 { flashstatus = FLASH_ERROR_WRP; } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) 802538e: 68da ldr r2, [r3, #12] 8025390: f012 0fef tst.w r2, #239 ; 0xef 8025394: d10a bne.n 80253ac { flashstatus = FLASH_ERROR_PROGRAM; } else { if((FLASH->SR & FLASH_FLAG_OPERR) != (uint32_t)0x00) 8025396: 68db ldr r3, [r3, #12] 8025398: f013 0f02 tst.w r3, #2 { flashstatus = FLASH_ERROR_OPERATION; 802539c: bf0c ite eq 802539e: 2008 moveq r0, #8 80253a0: 2007 movne r0, #7 80253a2: 4770 bx lr { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) { flashstatus = FLASH_BUSY; 80253a4: 2001 movs r0, #1 80253a6: 4770 bx lr } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_WRP; 80253a8: 2005 movs r0, #5 80253aa: 4770 bx lr } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_PROGRAM; 80253ac: 2006 movs r0, #6 } } } /* Return the FLASH Status */ return flashstatus; } 80253ae: 4770 bx lr 80253b0: 40023c00 .word 0x40023c00 080253b4 : * @param None * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_WaitForLastOperation(void) { 80253b4: b507 push {r0, r1, r2, lr} __IO FLASH_Status status = FLASH_COMPLETE; 80253b6: 2308 movs r3, #8 80253b8: f88d 3007 strb.w r3, [sp, #7] /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. Even if the FLASH operation fails, the BUSY flag will be reset and an error flag will be set */ while(status == FLASH_BUSY) { status = FLASH_GetStatus(); 80253bc: f7ff ffe0 bl 8025380 80253c0: f88d 0007 strb.w r0, [sp, #7] status = FLASH_GetStatus(); /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. Even if the FLASH operation fails, the BUSY flag will be reset and an error flag will be set */ while(status == FLASH_BUSY) 80253c4: f89d 3007 ldrb.w r3, [sp, #7] 80253c8: 2b01 cmp r3, #1 80253ca: d0f7 beq.n 80253bc { status = FLASH_GetStatus(); } /* Return the operation status */ return status; 80253cc: f89d 0007 ldrb.w r0, [sp, #7] } 80253d0: bd0e pop {r1, r2, r3, pc} 80253d2: 0000 movs r0, r0 080253d4 : * @param Data: specifies the data to be programmed. * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_ProgramByte(uint32_t Address, uint8_t Data) { 80253d4: b570 push {r4, r5, r6, lr} 80253d6: 4605 mov r5, r0 80253d8: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80253da: f7ff ffeb bl 80253b4 if(status == FLASH_COMPLETE) 80253de: 2808 cmp r0, #8 80253e0: d111 bne.n 8025406 { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 80253e2: 4c09 ldr r4, [pc, #36] ; (8025408 ) 80253e4: 6923 ldr r3, [r4, #16] 80253e6: f423 7340 bic.w r3, r3, #768 ; 0x300 80253ea: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_BYTE; 80253ec: 6923 ldr r3, [r4, #16] 80253ee: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 80253f0: 6923 ldr r3, [r4, #16] 80253f2: f043 0301 orr.w r3, r3, #1 80253f6: 6123 str r3, [r4, #16] *(__IO uint8_t*)Address = Data; 80253f8: 702e strb r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80253fa: f7ff ffdb bl 80253b4 /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 80253fe: 6923 ldr r3, [r4, #16] 8025400: f023 0301 bic.w r3, r3, #1 8025404: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 8025406: bd70 pop {r4, r5, r6, pc} 8025408: 40023c00 .word 0x40023c00 0802540c : * @param Data: specifies the data to be programmed. * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data) { 802540c: b570 push {r4, r5, r6, lr} 802540e: 4605 mov r5, r0 8025410: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025412: f7ff ffcf bl 80253b4 if(status == FLASH_COMPLETE) 8025416: 2808 cmp r0, #8 8025418: d113 bne.n 8025442 { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 802541a: 4c0a ldr r4, [pc, #40] ; (8025444 ) 802541c: 6923 ldr r3, [r4, #16] 802541e: f423 7340 bic.w r3, r3, #768 ; 0x300 8025422: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_WORD; 8025424: 6923 ldr r3, [r4, #16] 8025426: f443 7300 orr.w r3, r3, #512 ; 0x200 802542a: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 802542c: 6923 ldr r3, [r4, #16] 802542e: f043 0301 orr.w r3, r3, #1 8025432: 6123 str r3, [r4, #16] *(__IO uint32_t*)Address = Data; 8025434: 602e str r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025436: f7ff ffbd bl 80253b4 /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 802543a: 6923 ldr r3, [r4, #16] 802543c: f023 0301 bic.w r3, r3, #1 8025440: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 8025442: bd70 pop {r4, r5, r6, pc} 8025444: 40023c00 .word 0x40023c00 08025448 : * * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_EraseSector(uint32_t FLASH_Sector, uint8_t VoltageRange) { 8025448: b570 push {r4, r5, r6, lr} 802544a: 4606 mov r6, r0 /* Check the parameters */ assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) 802544c: b141 cbz r1, 8025460 { tmp_psize = FLASH_PSIZE_BYTE; } else if(VoltageRange == VoltageRange_2) 802544e: 2901 cmp r1, #1 8025450: d008 beq.n 8025464 { tmp_psize = FLASH_PSIZE_HALF_WORD; } else if(VoltageRange == VoltageRange_3) { tmp_psize = FLASH_PSIZE_WORD; 8025452: 2902 cmp r1, #2 8025454: bf14 ite ne 8025456: f44f 7540 movne.w r5, #768 ; 0x300 802545a: f44f 7500 moveq.w r5, #512 ; 0x200 802545e: e003 b.n 8025468 assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) { tmp_psize = FLASH_PSIZE_BYTE; 8025460: 460d mov r5, r1 8025462: e001 b.n 8025468 } else if(VoltageRange == VoltageRange_2) { tmp_psize = FLASH_PSIZE_HALF_WORD; 8025464: f44f 7580 mov.w r5, #256 ; 0x100 else { tmp_psize = FLASH_PSIZE_DOUBLE_WORD; } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8025468: f7ff ffa4 bl 80253b4 if(status == FLASH_COMPLETE) 802546c: 2808 cmp r0, #8 802546e: d11e bne.n 80254ae { /* if the previous operation is completed, proceed to erase the sector */ FLASH->CR &= CR_PSIZE_MASK; 8025470: 4c0f ldr r4, [pc, #60] ; (80254b0 ) 8025472: 6923 ldr r3, [r4, #16] 8025474: f423 7340 bic.w r3, r3, #768 ; 0x300 8025478: 6123 str r3, [r4, #16] FLASH->CR |= tmp_psize; 802547a: 6921 ldr r1, [r4, #16] 802547c: 430d orrs r5, r1 802547e: 6125 str r5, [r4, #16] FLASH->CR &= SECTOR_MASK; 8025480: 6923 ldr r3, [r4, #16] 8025482: f023 03f8 bic.w r3, r3, #248 ; 0xf8 8025486: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_SER | FLASH_Sector; 8025488: 6923 ldr r3, [r4, #16] 802548a: f043 0302 orr.w r3, r3, #2 802548e: 431e orrs r6, r3 8025490: 6126 str r6, [r4, #16] FLASH->CR |= FLASH_CR_STRT; 8025492: 6923 ldr r3, [r4, #16] 8025494: f443 3380 orr.w r3, r3, #65536 ; 0x10000 8025498: 6123 str r3, [r4, #16] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802549a: f7ff ff8b bl 80253b4 /* if the erase operation is completed, disable the SER Bit */ FLASH->CR &= (~FLASH_CR_SER); 802549e: 6923 ldr r3, [r4, #16] 80254a0: f023 0302 bic.w r3, r3, #2 80254a4: 6123 str r3, [r4, #16] FLASH->CR &= SECTOR_MASK; 80254a6: 6923 ldr r3, [r4, #16] 80254a8: f023 03f8 bic.w r3, r3, #248 ; 0xf8 80254ac: 6123 str r3, [r4, #16] } /* Return the Erase Status */ return status; } 80254ae: bd70 pop {r4, r5, r6, pc} 80254b0: 40023c00 .word 0x40023c00 080254b4 : * @note By default, The GPIO pins are configured in input floating mode (except JTAG pins). * @param GPIOx: where x can be (A..I) to select the GPIO peripheral. * @retval None */ void GPIO_DeInit(GPIO_TypeDef* GPIOx) { 80254b4: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); if (GPIOx == GPIOA) 80254b6: 4b2c ldr r3, [pc, #176] ; (8025568 ) 80254b8: 4298 cmp r0, r3 80254ba: d105 bne.n 80254c8 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, ENABLE); 80254bc: 2001 movs r0, #1 80254be: 4601 mov r1, r0 80254c0: f000 f974 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, DISABLE); 80254c4: 2001 movs r0, #1 80254c6: e048 b.n 802555a } else if (GPIOx == GPIOB) 80254c8: 4b28 ldr r3, [pc, #160] ; (802556c ) 80254ca: 4298 cmp r0, r3 80254cc: d105 bne.n 80254da { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, ENABLE); 80254ce: 2002 movs r0, #2 80254d0: 2101 movs r1, #1 80254d2: f000 f96b bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, DISABLE); 80254d6: 2002 movs r0, #2 80254d8: e03f b.n 802555a } else if (GPIOx == GPIOC) 80254da: 4b25 ldr r3, [pc, #148] ; (8025570 ) 80254dc: 4298 cmp r0, r3 80254de: d105 bne.n 80254ec { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, ENABLE); 80254e0: 2004 movs r0, #4 80254e2: 2101 movs r1, #1 80254e4: f000 f962 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, DISABLE); 80254e8: 2004 movs r0, #4 80254ea: e036 b.n 802555a } else if (GPIOx == GPIOD) 80254ec: 4b21 ldr r3, [pc, #132] ; (8025574 ) 80254ee: 4298 cmp r0, r3 80254f0: d105 bne.n 80254fe { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, ENABLE); 80254f2: 2008 movs r0, #8 80254f4: 2101 movs r1, #1 80254f6: f000 f959 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, DISABLE); 80254fa: 2008 movs r0, #8 80254fc: e02d b.n 802555a } else if (GPIOx == GPIOE) 80254fe: 4b1e ldr r3, [pc, #120] ; (8025578 ) 8025500: 4298 cmp r0, r3 8025502: d105 bne.n 8025510 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, ENABLE); 8025504: 2010 movs r0, #16 8025506: 2101 movs r1, #1 8025508: f000 f950 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, DISABLE); 802550c: 2010 movs r0, #16 802550e: e024 b.n 802555a } else if (GPIOx == GPIOF) 8025510: 4b1a ldr r3, [pc, #104] ; (802557c ) 8025512: 4298 cmp r0, r3 8025514: d105 bne.n 8025522 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, ENABLE); 8025516: 2020 movs r0, #32 8025518: 2101 movs r1, #1 802551a: f000 f947 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, DISABLE); 802551e: 2020 movs r0, #32 8025520: e01b b.n 802555a } else if (GPIOx == GPIOG) 8025522: 4b17 ldr r3, [pc, #92] ; (8025580 ) 8025524: 4298 cmp r0, r3 8025526: d105 bne.n 8025534 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, ENABLE); 8025528: 2040 movs r0, #64 ; 0x40 802552a: 2101 movs r1, #1 802552c: f000 f93e bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, DISABLE); 8025530: 2040 movs r0, #64 ; 0x40 8025532: e012 b.n 802555a } else if (GPIOx == GPIOH) 8025534: 4b13 ldr r3, [pc, #76] ; (8025584 ) 8025536: 4298 cmp r0, r3 8025538: d105 bne.n 8025546 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, ENABLE); 802553a: 2080 movs r0, #128 ; 0x80 802553c: 2101 movs r1, #1 802553e: f000 f935 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, DISABLE); 8025542: 2080 movs r0, #128 ; 0x80 8025544: e009 b.n 802555a } else { if (GPIOx == GPIOI) 8025546: 4b10 ldr r3, [pc, #64] ; (8025588 ) 8025548: 4298 cmp r0, r3 802554a: d10b bne.n 8025564 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); 802554c: f44f 7080 mov.w r0, #256 ; 0x100 8025550: 2101 movs r1, #1 8025552: f000 f92b bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8025556: f44f 7080 mov.w r0, #256 ; 0x100 802555a: 2100 movs r1, #0 } } } 802555c: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (GPIOx == GPIOI) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8025560: f000 b924 b.w 80257ac 8025564: bd08 pop {r3, pc} 8025566: bf00 nop 8025568: 40020000 .word 0x40020000 802556c: 40020400 .word 0x40020400 8025570: 40020800 .word 0x40020800 8025574: 40020c00 .word 0x40020c00 8025578: 40021000 .word 0x40021000 802557c: 40021400 .word 0x40021400 8025580: 40021800 .word 0x40021800 8025584: 40021c00 .word 0x40021c00 8025588: 40022000 .word 0x40022000 0802558c : * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) { 802558c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 8025590: 680f ldr r7, [r1, #0] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) 8025592: 2300 movs r3, #0 { pos = ((uint32_t)0x01) << pinpos; 8025594: f04f 0c01 mov.w ip, #1 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); 8025598: f04f 0803 mov.w r8, #3 /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; 802559c: fa0c f203 lsl.w r2, ip, r3 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 80255a0: ea02 0507 and.w r5, r2, r7 if (currentpin == pos) 80255a4: 4295 cmp r5, r2 80255a6: d131 bne.n 802560c * @param GPIOx: where x can be (A..I) to select the GPIO peripheral. * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) 80255a8: 005a lsls r2, r3, #1 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); 80255aa: 6806 ldr r6, [r0, #0] 80255ac: fa08 f402 lsl.w r4, r8, r2 80255b0: 43e4 mvns r4, r4 80255b2: 4026 ands r6, r4 80255b4: 6006 str r6, [r0, #0] GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80255b6: 790e ldrb r6, [r1, #4] 80255b8: f8d0 9000 ldr.w r9, [r0] 80255bc: fa06 fa02 lsl.w sl, r6, r2 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80255c0: 3e01 subs r6, #1 currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80255c2: ea4a 0909 orr.w r9, sl, r9 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80255c6: 2e01 cmp r6, #1 currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80255c8: f8c0 9000 str.w r9, [r0] if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80255cc: d815 bhi.n 80255fa { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80255ce: 6886 ldr r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80255d0: f891 9005 ldrb.w r9, [r1, #5] { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80255d4: 4026 ands r6, r4 80255d6: 6086 str r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80255d8: 6886 ldr r6, [r0, #8] 80255da: fa09 f902 lsl.w r9, r9, r2 80255de: ea49 0606 orr.w r6, r9, r6 80255e2: 6086 str r6, [r0, #8] /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; 80255e4: 6846 ldr r6, [r0, #4] 80255e6: ea26 0505 bic.w r5, r6, r5 80255ea: 6045 str r5, [r0, #4] GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 80255ec: 798d ldrb r5, [r1, #6] 80255ee: 6846 ldr r6, [r0, #4] 80255f0: fa05 f503 lsl.w r5, r5, r3 temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; } 80255f4: b2ad uxth r5, r5 /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 80255f6: 4335 orrs r5, r6 80255f8: 6045 str r5, [r0, #4] } /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); 80255fa: 68c5 ldr r5, [r0, #12] 80255fc: 402c ands r4, r5 80255fe: 60c4 str r4, [r0, #12] GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); 8025600: 79cd ldrb r5, [r1, #7] 8025602: 68c4 ldr r4, [r0, #12] 8025604: fa05 f202 lsl.w r2, r5, r2 8025608: 4322 orrs r2, r4 802560a: 60c2 str r2, [r0, #12] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) 802560c: 3301 adds r3, #1 802560e: 2b10 cmp r3, #16 8025610: d1c4 bne.n 802559c /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); } } } 8025612: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08025616 : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRL = GPIO_Pin; 8025616: 8301 strh r1, [r0, #24] 8025618: 4770 bx lr 0802561a : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRH = GPIO_Pin; 802561a: 8341 strh r1, [r0, #26] 802561c: 4770 bx lr 0802561e : /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 802561e: f001 0307 and.w r3, r1, #7 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025622: 08c9 lsrs r1, r1, #3 8025624: 3108 adds r1, #8 * @arg GPIO_AF_DCMI: Connect DCMI pins to AF13 * @arg GPIO_AF_EVENTOUT: Connect EVENTOUT pins to AF15 * @retval None */ void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) { 8025626: b530 push {r4, r5, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025628: 009b lsls r3, r3, #2 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 802562a: f850 5021 ldr.w r5, [r0, r1, lsl #2] 802562e: 240f movs r4, #15 8025630: fa04 f403 lsl.w r4, r4, r3 8025634: ea25 0404 bic.w r4, r5, r4 8025638: f840 4021 str.w r4, [r0, r1, lsl #2] temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 802563c: f850 4021 ldr.w r4, [r0, r1, lsl #2] /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8025640: fa02 f203 lsl.w r2, r2, r3 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 8025644: 4314 orrs r4, r2 GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; 8025646: f840 4021 str.w r4, [r0, r1, lsl #2] 802564a: bd30 pop {r4, r5, pc} 0802564c : void PWR_BackupAccessCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState; 802564c: 4b01 ldr r3, [pc, #4] ; (8025654 ) 802564e: 6018 str r0, [r3, #0] 8025650: 4770 bx lr 8025652: bf00 nop 8025654: 420e0020 .word 0x420e0020 08025658 : /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_LSE)); /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/ /* Reset LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025658: 4b06 ldr r3, [pc, #24] ; (8025674 ) 802565a: 2200 movs r2, #0 /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 802565c: 2801 cmp r0, #1 /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_LSE)); /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/ /* Reset LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 802565e: 701a strb r2, [r3, #0] /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8025660: 701a strb r2, [r3, #0] /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 8025662: d002 beq.n 802566a 8025664: 2804 cmp r0, #4 8025666: d104 bne.n 8025672 8025668: e001 b.n 802566e { case RCC_LSE_ON: /* Set LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_ON; 802566a: 7018 strb r0, [r3, #0] break; 802566c: 4770 bx lr case RCC_LSE_Bypass: /* Set LSEBYP and LSEON bits */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_Bypass | RCC_LSE_ON; 802566e: 2205 movs r2, #5 8025670: 701a strb r2, [r3, #0] 8025672: 4770 bx lr 8025674: 40023870 .word 0x40023870 08025678 : void RCC_LSICmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CSR_LSION_BB = (uint32_t)NewState; 8025678: 4b01 ldr r3, [pc, #4] ; (8025680 ) 802567a: 6018 str r0, [r3, #0] 802567c: 4770 bx lr 802567e: bf00 nop 8025680: 42470e80 .word 0x42470e80 08025684 : void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; 8025684: 4b1e ldr r3, [pc, #120] ; (8025700 ) 8025686: 689a ldr r2, [r3, #8] 8025688: f002 020c and.w r2, r2, #12 switch (tmp) 802568c: 2a04 cmp r2, #4 * configuration based on this function will be incorrect. * * @retval None */ void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { 802568e: b510 push {r4, lr} uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; switch (tmp) 8025690: d003 beq.n 802569a 8025692: 2a08 cmp r2, #8 8025694: d003 beq.n 802569e 8025696: 4b1b ldr r3, [pc, #108] ; (8025704 ) 8025698: e018 b.n 80256cc { case 0x00: /* HSI used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSI_VALUE; break; case 0x04: /* HSE used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSE_VALUE; 802569a: 4b1b ldr r3, [pc, #108] ; (8025708 ) 802569c: e016 b.n 80256cc case 0x08: /* PLL used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; 802569e: 6859 ldr r1, [r3, #4] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80256a0: 685a ldr r2, [r3, #4] if (pllsource != 0) 80256a2: f411 0f80 tst.w r1, #4194304 ; 0x400000 { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256a6: 6859 ldr r1, [r3, #4] 80256a8: bf14 ite ne 80256aa: 4b17 ldrne r3, [pc, #92] ; (8025708 ) } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256ac: 4b15 ldreq r3, [pc, #84] ; (8025704 ) /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80256ae: f002 023f and.w r2, r2, #63 ; 0x3f pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256b2: fbb3 f3f2 udiv r3, r3, r2 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80256b6: 4a12 ldr r2, [pc, #72] ; (8025700 ) 80256b8: 6852 ldr r2, [r2, #4] 80256ba: f3c2 4201 ubfx r2, r2, #16, #2 pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; if (pllsource != 0) { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256be: f3c1 1188 ubfx r1, r1, #6, #9 { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80256c2: 3201 adds r2, #1 pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80256c4: 434b muls r3, r1 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80256c6: 0052 lsls r2, r2, #1 RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80256c8: fbb3 f3f2 udiv r3, r3, r2 break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80256cc: 490c ldr r1, [pc, #48] ; (8025700 ) /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80256ce: 6003 str r3, [r0, #0] break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80256d0: 688b ldr r3, [r1, #8] tmp = tmp >> 4; presc = APBAHBPrescTable[tmp]; 80256d2: 4a0e ldr r2, [pc, #56] ; (802570c ) } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; tmp = tmp >> 4; 80256d4: f3c3 1303 ubfx r3, r3, #4, #4 presc = APBAHBPrescTable[tmp]; 80256d8: 5cd4 ldrb r4, [r2, r3] /* HCLK clock frequency */ RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc; 80256da: 6803 ldr r3, [r0, #0] 80256dc: fa23 f304 lsr.w r3, r3, r4 80256e0: 6043 str r3, [r0, #4] /* Get PCLK1 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE1; 80256e2: 688c ldr r4, [r1, #8] tmp = tmp >> 10; 80256e4: f3c4 2482 ubfx r4, r4, #10, #3 presc = APBAHBPrescTable[tmp]; 80256e8: 5d14 ldrb r4, [r2, r4] /* PCLK1 clock frequency */ RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 80256ea: fa23 f404 lsr.w r4, r3, r4 80256ee: 6084 str r4, [r0, #8] /* Get PCLK2 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE2; 80256f0: 6889 ldr r1, [r1, #8] tmp = tmp >> 13; 80256f2: f3c1 3142 ubfx r1, r1, #13, #3 presc = APBAHBPrescTable[tmp]; 80256f6: 5c52 ldrb r2, [r2, r1] /* PCLK2 clock frequency */ RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 80256f8: fa23 f302 lsr.w r3, r3, r2 80256fc: 60c3 str r3, [r0, #12] 80256fe: bd10 pop {r4, pc} 8025700: 40023800 .word 0x40023800 8025704: 00f42400 .word 0x00f42400 8025708: 017d7840 .word 0x017d7840 802570c: 200005ac .word 0x200005ac 08025710 : uint32_t tmpreg = 0; /* Check the parameters */ assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) 8025710: f400 7340 and.w r3, r0, #768 ; 0x300 8025714: f5b3 7f40 cmp.w r3, #768 ; 0x300 8025718: 4b08 ldr r3, [pc, #32] ; (802573c ) 802571a: d108 bne.n 802572e { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; 802571c: 6899 ldr r1, [r3, #8] /* Clear RTCPRE[4:0] bits */ tmpreg &= ~RCC_CFGR_RTCPRE; /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 802571e: f020 4270 bic.w r2, r0, #4026531840 ; 0xf0000000 if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; /* Clear RTCPRE[4:0] bits */ tmpreg &= ~RCC_CFGR_RTCPRE; 8025722: f421 11f8 bic.w r1, r1, #2031616 ; 0x1f0000 /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 8025726: f422 7240 bic.w r2, r2, #768 ; 0x300 802572a: 430a orrs r2, r1 /* Store the new value */ RCC->CFGR = tmpreg; 802572c: 609a str r2, [r3, #8] } /* Select the RTC clock source */ RCC->BDCR |= (RCC_RTCCLKSource & 0x00000FFF); 802572e: 6f1a ldr r2, [r3, #112] ; 0x70 8025730: 0500 lsls r0, r0, #20 8025732: ea42 5010 orr.w r0, r2, r0, lsr #20 8025736: 6718 str r0, [r3, #112] ; 0x70 8025738: 4770 bx lr 802573a: bf00 nop 802573c: 40023800 .word 0x40023800 08025740 : void RCC_RTCCLKCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) BDCR_RTCEN_BB = (uint32_t)NewState; 8025740: 4b01 ldr r3, [pc, #4] ; (8025748 ) 8025742: 6018 str r0, [r3, #0] 8025744: 4770 bx lr 8025746: bf00 nop 8025748: 42470e3c .word 0x42470e3c 0802574c : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { 802574c: 4b04 ldr r3, [pc, #16] ; (8025760 ) assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1ENR |= RCC_AHB1Periph; 802574e: 6b1a ldr r2, [r3, #48] ; 0x30 { /* Check the parameters */ assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025750: b109 cbz r1, 8025756 { RCC->AHB1ENR |= RCC_AHB1Periph; 8025752: 4310 orrs r0, r2 8025754: e001 b.n 802575a } else { RCC->AHB1ENR &= ~RCC_AHB1Periph; 8025756: ea22 0000 bic.w r0, r2, r0 802575a: 6318 str r0, [r3, #48] ; 0x30 802575c: 4770 bx lr 802575e: bf00 nop 8025760: 40023800 .word 0x40023800 08025764 : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB2PeriphClockCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState) { 8025764: 4b04 ldr r3, [pc, #16] ; (8025778 ) assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB2ENR |= RCC_AHB2Periph; 8025766: 6b5a ldr r2, [r3, #52] ; 0x34 { /* Check the parameters */ assert_param(IS_RCC_AHB2_PERIPH(RCC_AHB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025768: b109 cbz r1, 802576e { RCC->AHB2ENR |= RCC_AHB2Periph; 802576a: 4310 orrs r0, r2 802576c: e001 b.n 8025772 } else { RCC->AHB2ENR &= ~RCC_AHB2Periph; 802576e: ea22 0000 bic.w r0, r2, r0 8025772: 6358 str r0, [r3, #52] ; 0x34 8025774: 4770 bx lr 8025776: bf00 nop 8025778: 40023800 .word 0x40023800 0802577c : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { 802577c: 4b04 ldr r3, [pc, #16] ; (8025790 ) assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1ENR |= RCC_APB1Periph; 802577e: 6c1a ldr r2, [r3, #64] ; 0x40 { /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025780: b109 cbz r1, 8025786 { RCC->APB1ENR |= RCC_APB1Periph; 8025782: 4310 orrs r0, r2 8025784: e001 b.n 802578a } else { RCC->APB1ENR &= ~RCC_APB1Periph; 8025786: ea22 0000 bic.w r0, r2, r0 802578a: 6418 str r0, [r3, #64] ; 0x40 802578c: 4770 bx lr 802578e: bf00 nop 8025790: 40023800 .word 0x40023800 08025794 : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { 8025794: 4b04 ldr r3, [pc, #16] ; (80257a8 ) assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2ENR |= RCC_APB2Periph; 8025796: 6c5a ldr r2, [r3, #68] ; 0x44 { /* Check the parameters */ assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025798: b109 cbz r1, 802579e { RCC->APB2ENR |= RCC_APB2Periph; 802579a: 4310 orrs r0, r2 802579c: e001 b.n 80257a2 } else { RCC->APB2ENR &= ~RCC_APB2Periph; 802579e: ea22 0000 bic.w r0, r2, r0 80257a2: 6458 str r0, [r3, #68] ; 0x44 80257a4: 4770 bx lr 80257a6: bf00 nop 80257a8: 40023800 .word 0x40023800 080257ac : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphResetCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { 80257ac: 4b04 ldr r3, [pc, #16] ; (80257c0 ) assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1RSTR |= RCC_AHB1Periph; 80257ae: 691a ldr r2, [r3, #16] { /* Check the parameters */ assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80257b0: b109 cbz r1, 80257b6 { RCC->AHB1RSTR |= RCC_AHB1Periph; 80257b2: 4310 orrs r0, r2 80257b4: e001 b.n 80257ba } else { RCC->AHB1RSTR &= ~RCC_AHB1Periph; 80257b6: ea22 0000 bic.w r0, r2, r0 80257ba: 6118 str r0, [r3, #16] 80257bc: 4770 bx lr 80257be: bf00 nop 80257c0: 40023800 .word 0x40023800 080257c4 : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { 80257c4: 4b04 ldr r3, [pc, #16] ; (80257d8 ) /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1RSTR |= RCC_APB1Periph; 80257c6: 6a1a ldr r2, [r3, #32] void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80257c8: b109 cbz r1, 80257ce { RCC->APB1RSTR |= RCC_APB1Periph; 80257ca: 4310 orrs r0, r2 80257cc: e001 b.n 80257d2 } else { RCC->APB1RSTR &= ~RCC_APB1Periph; 80257ce: ea22 0000 bic.w r0, r2, r0 80257d2: 6218 str r0, [r3, #32] 80257d4: 4770 bx lr 80257d6: bf00 nop 80257d8: 40023800 .word 0x40023800 080257dc : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { 80257dc: 4b04 ldr r3, [pc, #16] ; (80257f0 ) /* Check the parameters */ assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2RSTR |= RCC_APB2Periph; 80257de: 6a5a ldr r2, [r3, #36] ; 0x24 void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80257e0: b109 cbz r1, 80257e6 { RCC->APB2RSTR |= RCC_APB2Periph; 80257e2: 4310 orrs r0, r2 80257e4: e001 b.n 80257ea } else { RCC->APB2RSTR &= ~RCC_APB2Periph; 80257e6: ea22 0000 bic.w r0, r2, r0 80257ea: 6258 str r0, [r3, #36] ; 0x24 80257ec: 4770 bx lr 80257ee: bf00 nop 80257f0: 40023800 .word 0x40023800 080257f4 : /* Check the parameters */ assert_param(IS_RCC_FLAG(RCC_FLAG)); /* Get the RCC register index */ tmp = RCC_FLAG >> 5; 80257f4: 0943 lsrs r3, r0, #5 if (tmp == 1) /* The flag to check is in CR register */ 80257f6: 2b01 cmp r3, #1 80257f8: 4a07 ldr r2, [pc, #28] ; (8025818 ) 80257fa: d101 bne.n 8025800 { statusreg = RCC->CR; 80257fc: 6813 ldr r3, [r2, #0] 80257fe: e003 b.n 8025808 } else if (tmp == 2) /* The flag to check is in BDCR register */ 8025800: 2b02 cmp r3, #2 { statusreg = RCC->BDCR; 8025802: bf0c ite eq 8025804: 6f13 ldreq r3, [r2, #112] ; 0x70 } else /* The flag to check is in CSR register */ { statusreg = RCC->CSR; 8025806: 6f53 ldrne r3, [r2, #116] ; 0x74 } /* Get the flag position */ tmp = RCC_FLAG & FLAG_MASK; if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET) 8025808: f000 001f and.w r0, r0, #31 802580c: fa23 f000 lsr.w r0, r3, r0 { bitstatus = RESET; } /* Return the flag status */ return bitstatus; } 8025810: f000 0001 and.w r0, r0, #1 8025814: 4770 bx lr 8025816: bf00 nop 8025818: 40023800 .word 0x40023800 0802581c : * @param NewState: new state of the RNG peripheral. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RNG_Cmd(FunctionalState NewState) { 802581c: 4b04 ldr r3, [pc, #16] ; (8025830 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 802581e: 681a ldr r2, [r3, #0] void RNG_Cmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025820: b110 cbz r0, 8025828 { /* Enable the RNG */ RNG->CR |= RNG_CR_RNGEN; 8025822: f042 0204 orr.w r2, r2, #4 8025826: e001 b.n 802582c } else { /* Disable the RNG */ RNG->CR &= ~RNG_CR_RNGEN; 8025828: f022 0204 bic.w r2, r2, #4 802582c: 601a str r2, [r3, #0] 802582e: 4770 bx lr 8025830: 50060800 .word 0x50060800 08025834 : * @retval 32-bit random number. */ uint32_t RNG_GetRandomNumber(void) { /* Return the 32 bit random number from the DR register */ return RNG->DR; 8025834: 4b01 ldr r3, [pc, #4] ; (802583c ) 8025836: 6898 ldr r0, [r3, #8] } 8025838: 4770 bx lr 802583a: bf00 nop 802583c: 50060800 .word 0x50060800 08025840 : * @param Value: Byte to be converted. * @retval Converted byte */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; 8025840: 2300 movs r3, #0 while (Value >= 10) 8025842: e003 b.n 802584c { bcdhigh++; 8025844: 3301 adds r3, #1 Value -= 10; 8025846: 380a subs r0, #10 { uint8_t bcdhigh = 0; while (Value >= 10) { bcdhigh++; 8025848: b2db uxtb r3, r3 Value -= 10; 802584a: b2c0 uxtb r0, r0 */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; while (Value >= 10) 802584c: 2809 cmp r0, #9 802584e: d8f9 bhi.n 8025844 { bcdhigh++; Value -= 10; } return ((uint8_t)(bcdhigh << 4) | Value); 8025850: ea40 1003 orr.w r0, r0, r3, lsl #4 } 8025854: b2c0 uxtb r0, r0 8025856: 4770 bx lr 08025858 : * @retval Converted word */ static uint8_t RTC_Bcd2ToByte(uint8_t Value) { uint8_t tmp = 0; tmp = ((uint8_t)(Value & (uint8_t)0xF0) >> (uint8_t)0x4) * 10; 8025858: 0902 lsrs r2, r0, #4 return (tmp + (Value & (uint8_t)0x0F)); 802585a: f000 030f and.w r3, r0, #15 802585e: 200a movs r0, #10 8025860: fb00 3002 mla r0, r0, r2, r3 } 8025864: b2c0 uxtb r0, r0 8025866: 4770 bx lr 08025868 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC is in Init mode * - ERROR: RTC is not in Init mode */ ErrorStatus RTC_EnterInitMode(void) { 8025868: b082 sub sp, #8 __IO uint32_t initcounter = 0x00; 802586a: 2300 movs r3, #0 802586c: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t initstatus = 0x00; /* Check if the Initialization mode is set */ if ((RTC->ISR & RTC_ISR_INITF) == (uint32_t)RESET) 802586e: 4b0d ldr r3, [pc, #52] ; (80258a4 ) 8025870: 68da ldr r2, [r3, #12] 8025872: 0650 lsls r0, r2, #25 8025874: d413 bmi.n 802589e { /* Set the Initialization mode */ RTC->ISR = (uint32_t)RTC_INIT_MASK; 8025876: f04f 32ff mov.w r2, #4294967295 802587a: 60da str r2, [r3, #12] /* Wait till RTC is in INIT state and if Time out is reached exit */ do { initstatus = RTC->ISR & RTC_ISR_INITF; 802587c: 68da ldr r2, [r3, #12] initcounter++; 802587e: 9901 ldr r1, [sp, #4] 8025880: 3101 adds r1, #1 8025882: 9101 str r1, [sp, #4] } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8025884: 9901 ldr r1, [sp, #4] 8025886: f5b1 3f80 cmp.w r1, #65536 ; 0x10000 RTC->ISR = (uint32_t)RTC_INIT_MASK; /* Wait till RTC is in INIT state and if Time out is reached exit */ do { initstatus = RTC->ISR & RTC_ISR_INITF; 802588a: f002 0240 and.w r2, r2, #64 ; 0x40 initcounter++; } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 802588e: d001 beq.n 8025894 8025890: 2a00 cmp r2, #0 8025892: d0f3 beq.n 802587c if ((RTC->ISR & RTC_ISR_INITF) != RESET) 8025894: 4b03 ldr r3, [pc, #12] ; (80258a4 ) 8025896: 68d8 ldr r0, [r3, #12] { status = SUCCESS; 8025898: f3c0 1080 ubfx r0, r0, #6, #1 802589c: e000 b.n 80258a0 status = ERROR; } } else { status = SUCCESS; 802589e: 2001 movs r0, #1 } return (status); } 80258a0: b002 add sp, #8 80258a2: 4770 bx lr 80258a4: 40002800 .word 0x40002800 080258a8 : * @retval None */ void RTC_ExitInitMode(void) { /* Exit Initialization mode */ RTC->ISR &= (uint32_t)~RTC_ISR_INIT; 80258a8: 4b02 ldr r3, [pc, #8] ; (80258b4 ) 80258aa: 68da ldr r2, [r3, #12] 80258ac: f022 0280 bic.w r2, r2, #128 ; 0x80 80258b0: 60da str r2, [r3, #12] 80258b2: 4770 bx lr 80258b4: 40002800 .word 0x40002800 080258b8 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 80258b8: b538 push {r3, r4, r5, lr} assert_param(IS_RTC_HOUR_FORMAT(RTC_InitStruct->RTC_HourFormat)); assert_param(IS_RTC_ASYNCH_PREDIV(RTC_InitStruct->RTC_AsynchPrediv)); assert_param(IS_RTC_SYNCH_PREDIV(RTC_InitStruct->RTC_SynchPrediv)); /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 80258ba: 4c0f ldr r4, [pc, #60] ; (80258f8 ) 80258bc: 23ca movs r3, #202 ; 0xca 80258be: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 80258c0: 2353 movs r3, #83 ; 0x53 80258c2: 6263 str r3, [r4, #36] ; 0x24 * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 80258c4: 4605 mov r5, r0 /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 80258c6: f7ff ffcf bl 8025868 80258ca: b188 cbz r0, 80258f0 status = ERROR; } else { /* Clear RTC CR FMT Bit */ RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); 80258cc: 68a3 ldr r3, [r4, #8] 80258ce: f023 0340 bic.w r3, r3, #64 ; 0x40 80258d2: 60a3 str r3, [r4, #8] /* Set RTC_CR register */ RTC->CR |= ((uint32_t)(RTC_InitStruct->RTC_HourFormat)); 80258d4: 68a2 ldr r2, [r4, #8] 80258d6: 682b ldr r3, [r5, #0] 80258d8: 4313 orrs r3, r2 80258da: 60a3 str r3, [r4, #8] /* Configure the RTC PRER */ RTC->PRER = (uint32_t)(RTC_InitStruct->RTC_SynchPrediv); 80258dc: 68ab ldr r3, [r5, #8] 80258de: 6123 str r3, [r4, #16] RTC->PRER |= (uint32_t)(RTC_InitStruct->RTC_AsynchPrediv << 16); 80258e0: 6923 ldr r3, [r4, #16] 80258e2: 686a ldr r2, [r5, #4] 80258e4: ea43 4302 orr.w r3, r3, r2, lsl #16 80258e8: 6123 str r3, [r4, #16] /* Exit Initialization mode */ RTC_ExitInitMode(); 80258ea: f7ff ffdd bl 80258a8 status = SUCCESS; 80258ee: 2001 movs r0, #1 } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 80258f0: 4b01 ldr r3, [pc, #4] ; (80258f8 ) 80258f2: 22ff movs r2, #255 ; 0xff 80258f4: 625a str r2, [r3, #36] ; 0x24 return status; } 80258f6: bd38 pop {r3, r4, r5, pc} 80258f8: 40002800 .word 0x40002800 080258fc : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are synchronised * - ERROR: RTC registers are not synchronised */ ErrorStatus RTC_WaitForSynchro(void) { 80258fc: b082 sub sp, #8 __IO uint32_t synchrocounter = 0; 80258fe: 2300 movs r3, #0 8025900: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t synchrostatus = 0x00; /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025902: 4b0e ldr r3, [pc, #56] ; (802593c ) 8025904: 22ca movs r2, #202 ; 0xca 8025906: 625a str r2, [r3, #36] ; 0x24 RTC->WPR = 0x53; 8025908: 2253 movs r2, #83 ; 0x53 802590a: 625a str r2, [r3, #36] ; 0x24 /* Clear RSF flag */ RTC->ISR &= (uint32_t)RTC_RSF_MASK; 802590c: 68da ldr r2, [r3, #12] 802590e: f022 02a0 bic.w r2, r2, #160 ; 0xa0 8025912: 60da str r2, [r3, #12] /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8025914: 68d9 ldr r1, [r3, #12] synchrocounter++; 8025916: 9a01 ldr r2, [sp, #4] 8025918: 3201 adds r2, #1 802591a: 9201 str r2, [sp, #4] } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 802591c: 9a01 ldr r2, [sp, #4] 802591e: f5b2 3f00 cmp.w r2, #131072 ; 0x20000 RTC->ISR &= (uint32_t)RTC_RSF_MASK; /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8025922: f001 0120 and.w r1, r1, #32 8025926: 4a05 ldr r2, [pc, #20] ; (802593c ) synchrocounter++; } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8025928: d001 beq.n 802592e 802592a: 2900 cmp r1, #0 802592c: d0f2 beq.n 8025914 if ((RTC->ISR & RTC_ISR_RSF) != RESET) 802592e: 68d0 ldr r0, [r2, #12] { status = ERROR; } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025930: 23ff movs r3, #255 ; 0xff 8025932: 6253 str r3, [r2, #36] ; 0x24 return (status); } 8025934: f3c0 1040 ubfx r0, r0, #5, #1 8025938: b002 add sp, #8 802593a: 4770 bx lr 802593c: 40002800 .word 0x40002800 08025940 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Time register is configured * - ERROR: RTC Time register is not configured */ ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8025940: b5f8 push {r3, r4, r5, r6, r7, lr} 8025942: 4b24 ldr r3, [pc, #144] ; (80259d4 ) 8025944: 460c mov r4, r1 /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8025946: 689b ldr r3, [r3, #8] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) 8025948: b920 cbnz r0, 8025954 { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 802594a: f013 0340 ands.w r3, r3, #64 ; 0x40 802594e: d12e bne.n 80259ae assert_param(IS_RTC_HOUR12(RTC_TimeStruct->RTC_Hours)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8025950: 70cb strb r3, [r1, #3] 8025952: e02c b.n 80259ae assert_param(IS_RTC_MINUTES(RTC_TimeStruct->RTC_Minutes)); assert_param(IS_RTC_SECONDS(RTC_TimeStruct->RTC_Seconds)); } else { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8025954: f013 0340 ands.w r3, r3, #64 ; 0x40 8025958: d11e bne.n 8025998 assert_param(IS_RTC_HOUR12(tmpreg)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 802595a: 70cb strb r3, [r1, #3] 802595c: e01c b.n 8025998 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); } /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 802595e: 4c1d ldr r4, [pc, #116] ; (80259d4 ) 8025960: 23ca movs r3, #202 ; 0xca 8025962: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025964: 2353 movs r3, #83 ; 0x53 8025966: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025968: f7ff ff7e bl 8025868 802596c: b180 cbz r0, 8025990 status = ERROR; } else { /* Set the RTC_TR register */ RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); 802596e: f005 357f and.w r5, r5, #2139062143 ; 0x7f7f7f7f 8025972: f025 45fe bic.w r5, r5, #2130706432 ; 0x7f000000 8025976: 6025 str r5, [r4, #0] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025978: f7ff ff96 bl 80258a8 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 802597c: 68a3 ldr r3, [r4, #8] 802597e: 0699 lsls r1, r3, #26 8025980: d405 bmi.n 802598e { if (RTC_WaitForSynchro() == ERROR) 8025982: f7ff ffbb bl 80258fc RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025986: 3000 adds r0, #0 8025988: bf18 it ne 802598a: 2001 movne r0, #1 802598c: e000 b.n 8025990 status = SUCCESS; } } else { status = SUCCESS; 802598e: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025990: 4b10 ldr r3, [pc, #64] ; (80259d4 ) 8025992: 22ff movs r2, #255 ; 0xff 8025994: 625a str r2, [r3, #36] ; 0x24 8025996: bdf8 pop {r3, r4, r5, r6, r7, pc} /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8025998: 7865 ldrb r5, [r4, #1] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 802599a: 7823 ldrb r3, [r4, #0] ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 802599c: 022d lsls r5, r5, #8 } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 802599e: ea45 4503 orr.w r5, r5, r3, lsl #16 ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ 80259a2: 78a3 ldrb r3, [r4, #2] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 80259a4: 431d orrs r5, r3 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); 80259a6: 78e3 ldrb r3, [r4, #3] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 80259a8: ea45 4503 orr.w r5, r5, r3, lsl #16 80259ac: e7d7 b.n 802595e ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 80259ae: 7820 ldrb r0, [r4, #0] 80259b0: f7ff ff46 bl 8025840 80259b4: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 80259b6: 7860 ldrb r0, [r4, #1] 80259b8: f7ff ff42 bl 8025840 80259bc: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ 80259be: 78a0 ldrb r0, [r4, #2] 80259c0: f7ff ff3e bl 8025840 (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); 80259c4: 78e5 ldrb r5, [r4, #3] ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 80259c6: ea40 4005 orr.w r0, r0, r5, lsl #16 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 80259ca: ea40 4507 orr.w r5, r0, r7, lsl #16 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 80259ce: ea45 2506 orr.w r5, r5, r6, lsl #8 80259d2: e7c4 b.n 802595e 80259d4: 40002800 .word 0x40002800 080259d8 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); 80259d8: 4b0f ldr r3, [pc, #60] ; (8025a18 ) 80259da: 681b ldr r3, [r3, #0] * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will * contain the returned current time configuration. * @retval None */ void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 80259dc: b570 push {r4, r5, r6, lr} /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); 80259de: f3c3 4205 ubfx r2, r3, #16, #6 RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 80259e2: f3c3 2606 ubfx r6, r3, #8, #7 RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 80259e6: f003 057f and.w r5, r3, #127 ; 0x7f RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 80259ea: f403 0380 and.w r3, r3, #4194304 ; 0x400000 80259ee: 0c1b lsrs r3, r3, #16 * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will * contain the returned current time configuration. * @retval None */ void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 80259f0: 460c mov r4, r1 /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); 80259f2: 700a strb r2, [r1, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 80259f4: 704e strb r6, [r1, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 80259f6: 708d strb r5, [r1, #2] RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 80259f8: 70cb strb r3, [r1, #3] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 80259fa: b958 cbnz r0, 8025a14 { /* Convert the structure parameters to Binary format */ RTC_TimeStruct->RTC_Hours = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Hours); 80259fc: 4610 mov r0, r2 80259fe: f7ff ff2b bl 8025858 8025a02: 7020 strb r0, [r4, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); 8025a04: 4630 mov r0, r6 8025a06: f7ff ff27 bl 8025858 8025a0a: 7060 strb r0, [r4, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); 8025a0c: 4628 mov r0, r5 8025a0e: f7ff ff23 bl 8025858 8025a12: 70a0 strb r0, [r4, #2] 8025a14: bd70 pop {r4, r5, r6, pc} 8025a16: bf00 nop 8025a18: 40002800 .word 0x40002800 08025a1c : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Date register is configured * - ERROR: RTC Date register is not configured */ ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8025a1c: b5f8 push {r3, r4, r5, r6, r7, lr} 8025a1e: 460c mov r4, r1 8025a20: 784b ldrb r3, [r1, #1] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if ((RTC_Format == RTC_Format_BIN) && ((RTC_DateStruct->RTC_Month & 0x10) == 0x10)) 8025a22: 2800 cmp r0, #0 8025a24: d138 bne.n 8025a98 8025a26: f003 0210 and.w r2, r3, #16 8025a2a: b2d2 uxtb r2, r2 8025a2c: b30a cbz r2, 8025a72 { RTC_DateStruct->RTC_Month = (RTC_DateStruct->RTC_Month & (uint32_t)~(0x10)) + 0x0A; 8025a2e: f023 0310 bic.w r3, r3, #16 8025a32: 330a adds r3, #10 8025a34: 704b strb r3, [r1, #1] 8025a36: e01c b.n 8025a72 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); } /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8025a38: 4c1c ldr r4, [pc, #112] ; (8025aac ) 8025a3a: 23ca movs r3, #202 ; 0xca 8025a3c: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8025a3e: 2353 movs r3, #83 ; 0x53 8025a40: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8025a42: f7ff ff11 bl 8025868 8025a46: b180 cbz r0, 8025a6a status = ERROR; } else { /* Set the RTC_DR register */ RTC->DR = (uint32_t)(tmpreg & RTC_DR_RESERVED_MASK); 8025a48: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8025a4c: f025 05c0 bic.w r5, r5, #192 ; 0xc0 8025a50: 6065 str r5, [r4, #4] /* Exit Initialization mode */ RTC_ExitInitMode(); 8025a52: f7ff ff29 bl 80258a8 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8025a56: 68a3 ldr r3, [r4, #8] 8025a58: 0698 lsls r0, r3, #26 8025a5a: d405 bmi.n 8025a68 { if (RTC_WaitForSynchro() == ERROR) 8025a5c: f7ff ff4e bl 80258fc RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8025a60: 3000 adds r0, #0 8025a62: bf18 it ne 8025a64: 2001 movne r0, #1 8025a66: e000 b.n 8025a6a status = SUCCESS; } } else { status = SUCCESS; 8025a68: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8025a6a: 4b10 ldr r3, [pc, #64] ; (8025aac ) 8025a6c: 22ff movs r2, #255 ; 0xff 8025a6e: 625a str r2, [r3, #36] ; 0x24 8025a70: bdf8 pop {r3, r4, r5, r6, r7, pc} ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8025a72: 78e0 ldrb r0, [r4, #3] 8025a74: f7ff fee4 bl 8025840 8025a78: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025a7a: 7860 ldrb r0, [r4, #1] 8025a7c: f7ff fee0 bl 8025840 8025a80: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ 8025a82: 78a0 ldrb r0, [r4, #2] 8025a84: f7ff fedc bl 8025840 ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); 8025a88: 7825 ldrb r5, [r4, #0] ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8025a8a: ea40 3045 orr.w r0, r0, r5, lsl #13 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8025a8e: ea40 4507 orr.w r5, r0, r7, lsl #16 ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8025a92: ea45 2506 orr.w r5, r5, r6, lsl #8 8025a96: e7cf b.n 8025a38 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8025a98: 78cd ldrb r5, [r1, #3] (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ 8025a9a: 788a ldrb r2, [r1, #2] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ 8025a9c: 021b lsls r3, r3, #8 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8025a9e: ea43 4505 orr.w r5, r3, r5, lsl #16 (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); 8025aa2: 780b ldrb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ 8025aa4: 4315 orrs r5, r2 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8025aa6: ea45 3543 orr.w r5, r5, r3, lsl #13 8025aaa: e7c5 b.n 8025a38 8025aac: 40002800 .word 0x40002800 08025ab0 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); 8025ab0: 4b0e ldr r3, [pc, #56] ; (8025aec ) 8025ab2: 685b ldr r3, [r3, #4] * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will * contain the returned current date configuration. * @retval None */ void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8025ab4: b570 push {r4, r5, r6, lr} /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); 8025ab6: f3c3 4207 ubfx r2, r3, #16, #8 RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025aba: f3c3 2604 ubfx r6, r3, #8, #5 RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025abe: f003 053f and.w r5, r3, #63 ; 0x3f RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025ac2: f3c3 3342 ubfx r3, r3, #13, #3 * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will * contain the returned current date configuration. * @retval None */ void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8025ac6: 460c mov r4, r1 /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); 8025ac8: 70ca strb r2, [r1, #3] RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8025aca: 704e strb r6, [r1, #1] RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8025acc: 708d strb r5, [r1, #2] RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8025ace: 700b strb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8025ad0: b958 cbnz r0, 8025aea { /* Convert the structure parameters to Binary format */ RTC_DateStruct->RTC_Year = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Year); 8025ad2: 4610 mov r0, r2 8025ad4: f7ff fec0 bl 8025858 8025ad8: 70e0 strb r0, [r4, #3] RTC_DateStruct->RTC_Month = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Month); 8025ada: 4630 mov r0, r6 8025adc: f7ff febc bl 8025858 8025ae0: 7060 strb r0, [r4, #1] RTC_DateStruct->RTC_Date = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Date); 8025ae2: 4628 mov r0, r5 8025ae4: f7ff feb8 bl 8025858 8025ae8: 70a0 strb r0, [r4, #2] 8025aea: bd70 pop {r4, r5, r6, pc} 8025aec: 40002800 .word 0x40002800 08025af0 : * specify the register. * @param Data: Data to be written in the specified RTC Backup data register. * @retval None */ void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data) { 8025af0: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025af2: 2300 movs r3, #0 8025af4: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025af6: 4b05 ldr r3, [pc, #20] ; (8025b0c ) 8025af8: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025afa: 9b01 ldr r3, [sp, #4] 8025afc: eb03 0080 add.w r0, r3, r0, lsl #2 8025b00: 9001 str r0, [sp, #4] /* Write the specified register */ *(__IO uint32_t *)tmp = (uint32_t)Data; 8025b02: 9b01 ldr r3, [sp, #4] 8025b04: 6019 str r1, [r3, #0] } 8025b06: b002 add sp, #8 8025b08: 4770 bx lr 8025b0a: bf00 nop 8025b0c: 40002850 .word 0x40002850 08025b10 : * This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to * specify the register. * @retval None */ uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR) { 8025b10: b082 sub sp, #8 __IO uint32_t tmp = 0; 8025b12: 2300 movs r3, #0 8025b14: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8025b16: 4b05 ldr r3, [pc, #20] ; (8025b2c ) 8025b18: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8025b1a: 9b01 ldr r3, [sp, #4] 8025b1c: eb03 0080 add.w r0, r3, r0, lsl #2 8025b20: 9001 str r0, [sp, #4] /* Read the specified register */ return (*(__IO uint32_t *)tmp); 8025b22: 9b01 ldr r3, [sp, #4] 8025b24: 6818 ldr r0, [r3, #0] } 8025b26: b002 add sp, #8 8025b28: 4770 bx lr 8025b2a: bf00 nop 8025b2c: 40002850 .word 0x40002850 08025b30 : /* Check the parameters */ assert_param(IS_RTC_GET_IT(RTC_IT)); /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); 8025b30: 4b0a ldr r3, [pc, #40] ; (8025b5c ) 8025b32: 6c1a ldr r2, [r3, #64] ; 0x40 * @arg RTC_IT_ALRA: Alarm A interrupt * @arg RTC_IT_TAMP1: Tamper 1 event interrupt * @retval The new state of RTC_IT (SET or RESET). */ ITStatus RTC_GetITStatus(uint32_t RTC_IT) { 8025b34: b510 push {r4, lr} /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8025b36: 689c ldr r4, [r3, #8] /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8025b38: 68d9 ldr r1, [r3, #12] /* Check the parameters */ assert_param(IS_RTC_GET_IT(RTC_IT)); /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); 8025b3a: f002 0204 and.w r2, r2, #4 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8025b3e: ea02 32d0 and.w r2, r2, r0, lsr #15 8025b42: ea00 0304 and.w r3, r0, r4 /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8025b46: 4313 orrs r3, r2 8025b48: d006 beq.n 8025b58 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8025b4a: b28b uxth r3, r1 /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8025b4c: ea13 1310 ands.w r3, r3, r0, lsr #4 { bitstatus = SET; 8025b50: bf0c ite eq 8025b52: 2000 moveq r0, #0 8025b54: 2001 movne r0, #1 8025b56: bd10 pop {r4, pc} } else { bitstatus = RESET; 8025b58: 4618 mov r0, r3 } return bitstatus; } 8025b5a: bd10 pop {r4, pc} 8025b5c: 40002800 .word 0x40002800 08025b60 : /* Get the RTC_ISR Interrupt pending bits mask */ tmpreg = (uint32_t)(RTC_IT >> 4); /* Clear the interrupt pending bits in the RTC_ISR register */ RTC->ISR = (uint32_t)((uint32_t)(~((tmpreg | RTC_ISR_INIT)& 0x0000FFFF) | (uint32_t)(RTC->ISR & RTC_ISR_INIT))); 8025b60: 4b05 ldr r3, [pc, #20] ; (8025b78 ) 8025b62: 68da ldr r2, [r3, #12] 8025b64: f3c0 100f ubfx r0, r0, #4, #16 8025b68: f040 0080 orr.w r0, r0, #128 ; 0x80 8025b6c: f002 0280 and.w r2, r2, #128 ; 0x80 8025b70: ea62 0200 orn r2, r2, r0 8025b74: 60da str r2, [r3, #12] 8025b76: 4770 bx lr 8025b78: 40002800 .word 0x40002800 08025b7c : */ void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface) { assert_param(IS_SYSCFG_ETH_MEDIA_INTERFACE(SYSCFG_ETH_MediaInterface)); /* Configure MII_RMII selection bit */ *(__IO uint32_t *) PMC_MII_RMII_SEL_BB = SYSCFG_ETH_MediaInterface; 8025b7c: 4b01 ldr r3, [pc, #4] ; (8025b84 ) 8025b7e: 6018 str r0, [r3, #0] 8025b80: 4770 bx lr 8025b82: bf00 nop 8025b84: 422700dc .word 0x422700dc 08025b88 : { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); /* Clear the IT pending Bit */ TIMx->SR = (uint16_t)~TIM_IT; 8025b88: 43c9 mvns r1, r1 8025b8a: 8201 strh r1, [r0, #16] 8025b8c: 4770 bx lr 8025b8e: 0000 movs r0, r0 08025b90 : * @param USARTx: where x can be 1, 2, 3, 4, 5 or 6 to select the USART or * UART peripheral. * @retval None */ void USART_DeInit(USART_TypeDef* USARTx) { 8025b90: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); if (USARTx == USART1) 8025b92: 4b23 ldr r3, [pc, #140] ; (8025c20 ) 8025b94: 4298 cmp r0, r3 8025b96: d105 bne.n 8025ba4 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE); 8025b98: 2010 movs r0, #16 8025b9a: 2101 movs r1, #1 8025b9c: f7ff fe1e bl 80257dc RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, DISABLE); 8025ba0: 2010 movs r0, #16 8025ba2: e037 b.n 8025c14 } else if (USARTx == USART2) 8025ba4: 4b1f ldr r3, [pc, #124] ; (8025c24 ) 8025ba6: 4298 cmp r0, r3 8025ba8: d107 bne.n 8025bba { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, ENABLE); 8025baa: f44f 3000 mov.w r0, #131072 ; 0x20000 8025bae: 2101 movs r1, #1 8025bb0: f7ff fe08 bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); 8025bb4: f44f 3000 mov.w r0, #131072 ; 0x20000 8025bb8: e009 b.n 8025bce } else if (USARTx == USART3) 8025bba: 4b1b ldr r3, [pc, #108] ; (8025c28 ) 8025bbc: 4298 cmp r0, r3 8025bbe: d10b bne.n 8025bd8 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); 8025bc0: f44f 2080 mov.w r0, #262144 ; 0x40000 8025bc4: 2101 movs r1, #1 8025bc6: f7ff fdfd bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8025bca: f44f 2080 mov.w r0, #262144 ; 0x40000 8025bce: 2100 movs r1, #0 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); } } } 8025bd0: e8bd 4008 ldmia.w sp!, {r3, lr} RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); } else if (USARTx == USART3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8025bd4: f7ff bdf6 b.w 80257c4 } else if (USARTx == UART4) 8025bd8: 4b14 ldr r3, [pc, #80] ; (8025c2c ) 8025bda: 4298 cmp r0, r3 8025bdc: d107 bne.n 8025bee { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, ENABLE); 8025bde: f44f 2000 mov.w r0, #524288 ; 0x80000 8025be2: 2101 movs r1, #1 8025be4: f7ff fdee bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, DISABLE); 8025be8: f44f 2000 mov.w r0, #524288 ; 0x80000 8025bec: e7ef b.n 8025bce } else if (USARTx == UART5) 8025bee: 4b10 ldr r3, [pc, #64] ; (8025c30 ) 8025bf0: 4298 cmp r0, r3 8025bf2: d107 bne.n 8025c04 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, ENABLE); 8025bf4: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025bf8: 2101 movs r1, #1 8025bfa: f7ff fde3 bl 80257c4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, DISABLE); 8025bfe: f44f 1080 mov.w r0, #1048576 ; 0x100000 8025c02: e7e4 b.n 8025bce } else { if (USARTx == USART6) 8025c04: 4b0b ldr r3, [pc, #44] ; (8025c34 ) 8025c06: 4298 cmp r0, r3 8025c08: d109 bne.n 8025c1e { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); 8025c0a: 2020 movs r0, #32 8025c0c: 2101 movs r1, #1 8025c0e: f7ff fde5 bl 80257dc RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025c12: 2020 movs r0, #32 8025c14: 2100 movs r1, #0 } } } 8025c16: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (USARTx == USART6) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8025c1a: f7ff bddf b.w 80257dc 8025c1e: bd08 pop {r3, pc} 8025c20: 40011000 .word 0x40011000 8025c24: 40004400 .word 0x40004400 8025c28: 40004800 .word 0x40004800 8025c2c: 40004c00 .word 0x40004c00 8025c30: 40005000 .word 0x40005000 8025c34: 40011400 .word 0x40011400 08025c38 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025c38: 8a03 ldrh r3, [r0, #16] /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; 8025c3a: 88ca ldrh r2, [r1, #6] { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8025c3c: b29b uxth r3, r3 /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); 8025c3e: f423 5340 bic.w r3, r3, #12288 ; 0x3000 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8025c42: b530 push {r4, r5, lr} /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; 8025c44: 4313 orrs r3, r2 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8025c46: 460d mov r5, r1 /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; 8025c48: 8203 strh r3, [r0, #16] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; 8025c4a: 8983 ldrh r3, [r0, #12] /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8025c4c: 8909 ldrh r1, [r1, #8] 8025c4e: 88aa ldrh r2, [r5, #4] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8025c50: f423 53b0 bic.w r3, r3, #5632 ; 0x1600 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8025c54: 430a orrs r2, r1 8025c56: 8969 ldrh r1, [r5, #10] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8025c58: f023 030c bic.w r3, r3, #12 8025c5c: 041b lsls r3, r3, #16 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8025c5e: 430a orrs r2, r1 /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8025c60: 0c1b lsrs r3, r3, #16 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8025c62: b292 uxth r2, r2 USART_InitStruct->USART_Mode; /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; 8025c64: 4313 orrs r3, r2 8025c66: 8183 strh r3, [r0, #12] /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8025c68: 8a83 ldrh r3, [r0, #20] /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; 8025c6a: 89aa ldrh r2, [r5, #12] /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8025c6c: b29b uxth r3, r3 /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); 8025c6e: f423 7340 bic.w r3, r3, #768 ; 0x300 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; 8025c72: 4313 orrs r3, r2 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8025c74: b085 sub sp, #20 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; 8025c76: 8283 strh r3, [r0, #20] * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8025c78: 4604 mov r4, r0 /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; /*---------------------------- USART BRR Configuration -----------------------*/ /* Configure the USART Baud Rate */ RCC_GetClocksFreq(&RCC_ClocksStatus); 8025c7a: 4668 mov r0, sp 8025c7c: f7ff fd02 bl 8025684 if ((USARTx == USART1) || (USARTx == USART6)) 8025c80: 4b19 ldr r3, [pc, #100] ; (8025ce8 ) 8025c82: 429c cmp r4, r3 8025c84: d003 beq.n 8025c8e 8025c86: f503 6380 add.w r3, r3, #1024 ; 0x400 8025c8a: 429c cmp r4, r3 8025c8c: d101 bne.n 8025c92 { apbclock = RCC_ClocksStatus.PCLK2_Frequency; 8025c8e: 9b03 ldr r3, [sp, #12] 8025c90: e000 b.n 8025c94 } else { apbclock = RCC_ClocksStatus.PCLK1_Frequency; 8025c92: 9b02 ldr r3, [sp, #8] } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025c94: 89a2 ldrh r2, [r4, #12] 8025c96: b212 sxth r2, r2 8025c98: 2a00 cmp r2, #0 8025c9a: f04f 0119 mov.w r1, #25 8025c9e: 682a ldr r2, [r5, #0] { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8025ca0: fb01 f103 mul.w r1, r1, r3 { apbclock = RCC_ClocksStatus.PCLK1_Frequency; } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025ca4: da01 bge.n 8025caa { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8025ca6: 0052 lsls r2, r2, #1 8025ca8: e000 b.n 8025cac } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); 8025caa: 0092 lsls r2, r2, #2 } tmpreg = (integerdivider / 100) << 4; 8025cac: 2364 movs r3, #100 ; 0x64 integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); 8025cae: fbb1 f1f2 udiv r1, r1, r2 } tmpreg = (integerdivider / 100) << 4; 8025cb2: fbb1 f2f3 udiv r2, r1, r3 8025cb6: 0112 lsls r2, r2, #4 /* Determine the fractional part */ fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); 8025cb8: 0910 lsrs r0, r2, #4 8025cba: fb03 1110 mls r1, r3, r0, r1 /* Implement the fractional part in the register */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8025cbe: 89a0 ldrh r0, [r4, #12] 8025cc0: b200 sxth r0, r0 8025cc2: 2800 cmp r0, #0 8025cc4: da06 bge.n 8025cd4 { tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); 8025cc6: 00c9 lsls r1, r1, #3 8025cc8: 3132 adds r1, #50 ; 0x32 8025cca: fbb1 f3f3 udiv r3, r1, r3 8025cce: f003 0307 and.w r3, r3, #7 8025cd2: e005 b.n 8025ce0 } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F); 8025cd4: 0109 lsls r1, r1, #4 8025cd6: 3132 adds r1, #50 ; 0x32 8025cd8: fbb1 f3f3 udiv r3, r1, r3 8025cdc: f003 030f and.w r3, r3, #15 8025ce0: 431a orrs r2, r3 } /* Write to USART BRR register */ USARTx->BRR = (uint16_t)tmpreg; 8025ce2: 8122 strh r2, [r4, #8] } 8025ce4: b005 add sp, #20 8025ce6: bd30 pop {r4, r5, pc} 8025ce8: 40011000 .word 0x40011000 08025cec : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 8025cec: 8983 ldrh r3, [r0, #12] { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8025cee: b119 cbz r1, 8025cf8 { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 8025cf0: b29b uxth r3, r3 8025cf2: f443 5300 orr.w r3, r3, #8192 ; 0x2000 8025cf6: e003 b.n 8025d00 } else { /* Disable the selected USART by clearing the UE bit in the CR1 register */ USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); 8025cf8: f423 5300 bic.w r3, r3, #8192 ; 0x2000 8025cfc: 041b lsls r3, r3, #16 8025cfe: 0c1b lsrs r3, r3, #16 8025d00: 8183 strh r3, [r0, #12] 8025d02: 4770 bx lr 08025d04 : } usartxbase = (uint32_t)USARTx; /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8025d04: f3c1 1342 ubfx r3, r1, #5, #3 * @param NewState: new state of the specified USARTx interrupts. * This parameter can be: ENABLE or DISABLE. * @retval None */ void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState) { 8025d08: b510 push {r4, lr} /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itpos = USART_IT & IT_MASK; itmask = (((uint32_t)0x01) << itpos); 8025d0a: 2401 movs r4, #1 8025d0c: f001 011f and.w r1, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d10: 42a3 cmp r3, r4 /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itpos = USART_IT & IT_MASK; itmask = (((uint32_t)0x01) << itpos); 8025d12: fa04 f101 lsl.w r1, r4, r1 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d16: d101 bne.n 8025d1c { usartxbase += 0x0C; 8025d18: 300c adds r0, #12 8025d1a: e004 b.n 8025d26 } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8025d1c: 2b02 cmp r3, #2 8025d1e: d101 bne.n 8025d24 { usartxbase += 0x10; 8025d20: 3010 adds r0, #16 8025d22: e000 b.n 8025d26 } else /* The IT is in CR3 register */ { usartxbase += 0x14; 8025d24: 3014 adds r0, #20 } if (NewState != DISABLE) { *(__IO uint32_t*)usartxbase |= itmask; 8025d26: 6803 ldr r3, [r0, #0] } else /* The IT is in CR3 register */ { usartxbase += 0x14; } if (NewState != DISABLE) 8025d28: b10a cbz r2, 8025d2e { *(__IO uint32_t*)usartxbase |= itmask; 8025d2a: 4319 orrs r1, r3 8025d2c: e001 b.n 8025d32 } else { *(__IO uint32_t*)usartxbase &= ~itmask; 8025d2e: ea23 0101 bic.w r1, r3, r1 8025d32: 6001 str r1, [r0, #0] 8025d34: bd10 pop {r4, pc} 08025d36 : * @arg USART_IT_FE: Framing Error interrupt * @arg USART_IT_PE: Parity Error interrupt * @retval The new state of USART_IT (SET or RESET). */ ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT) { 8025d36: b510 push {r4, lr} { assert_param(IS_USART_1236_PERIPH(USARTx)); } /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8025d38: f3c1 1442 ubfx r4, r1, #5, #3 /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8025d3c: 2201 movs r2, #1 8025d3e: f001 031f and.w r3, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d42: 2c01 cmp r4, #1 /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8025d44: fa02 f203 lsl.w r2, r2, r3 if (usartreg == 0x01) /* The IT is in CR1 register */ 8025d48: d101 bne.n 8025d4e { itmask &= USARTx->CR1; 8025d4a: 8983 ldrh r3, [r0, #12] 8025d4c: e003 b.n 8025d56 } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8025d4e: 2c02 cmp r4, #2 { itmask &= USARTx->CR2; 8025d50: bf0c ite eq 8025d52: 8a03 ldrheq r3, [r0, #16] } else /* The IT is in CR3 register */ { itmask &= USARTx->CR3; 8025d54: 8a83 ldrhne r3, [r0, #20] 8025d56: b29b uxth r3, r3 8025d58: 4013 ands r3, r2 } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; bitpos &= USARTx->SR; 8025d5a: 8802 ldrh r2, [r0, #0] 8025d5c: b292 uxth r2, r2 if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8025d5e: b143 cbz r3, 8025d72 { itmask &= USARTx->CR3; } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; 8025d60: 2301 movs r3, #1 8025d62: 0a09 lsrs r1, r1, #8 8025d64: fa03 f101 lsl.w r1, r3, r1 bitpos &= USARTx->SR; if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8025d68: 4211 tst r1, r2 { bitstatus = SET; 8025d6a: bf0c ite eq 8025d6c: 2000 moveq r0, #0 8025d6e: 2001 movne r0, #1 8025d70: bd10 pop {r4, pc} } else { bitstatus = RESET; 8025d72: 4618 mov r0, r3 } return bitstatus; } 8025d74: bd10 pop {r4, pc} 08025d76 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } bitpos = USART_IT >> 0x08; itmask = ((uint16_t)0x01 << (uint16_t)bitpos); 8025d76: 0a09 lsrs r1, r1, #8 8025d78: 2301 movs r3, #1 8025d7a: fa03 f301 lsl.w r3, r3, r1 USARTx->SR = (uint16_t)~itmask; 8025d7e: 43db mvns r3, r3 8025d80: 8003 strh r3, [r0, #0] 8025d82: 4770 bx lr 08025d84 : SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Set HSION bit */ RCC->CR |= (uint32_t)0x00000001; 8025d84: 4b35 ldr r3, [pc, #212] ; (8025e5c ) 8025d86: 681a ldr r2, [r3, #0] 8025d88: f042 0201 orr.w r2, r2, #1 8025d8c: 601a str r2, [r3, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 8025d8e: 2200 movs r2, #0 8025d90: 609a str r2, [r3, #8] /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; 8025d92: 6819 ldr r1, [r3, #0] 8025d94: f021 7184 bic.w r1, r1, #17301504 ; 0x1080000 8025d98: f421 3180 bic.w r1, r1, #65536 ; 0x10000 8025d9c: 6019 str r1, [r3, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; 8025d9e: 4930 ldr r1, [pc, #192] ; (8025e60 ) 8025da0: 6059 str r1, [r3, #4] /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8025da2: 6819 ldr r1, [r3, #0] * SystemFrequency variable. * @param None * @retval None */ void SystemInit(void) { 8025da4: b082 sub sp, #8 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8025da6: f421 2180 bic.w r1, r1, #262144 ; 0x40000 8025daa: 6019 str r1, [r3, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; 8025dac: 60da str r2, [r3, #12] static void SetSysClock(void) { /******************************************************************************/ /* PLL (clocked by HSE) used as System clock source */ /******************************************************************************/ __IO uint32_t StartUpCounter = 0, HSEStatus = 0; 8025dae: 9200 str r2, [sp, #0] 8025db0: 9201 str r2, [sp, #4] /* Enable HSE */ RCC->CR |= ((uint32_t)RCC_CR_HSEON); 8025db2: 681a ldr r2, [r3, #0] 8025db4: f442 3280 orr.w r2, r2, #65536 ; 0x10000 8025db8: 601a str r2, [r3, #0] /* Wait till HSE is ready and if Time out is reached exit */ do { HSEStatus = RCC->CR & RCC_CR_HSERDY; 8025dba: 681a ldr r2, [r3, #0] 8025dbc: f402 3200 and.w r2, r2, #131072 ; 0x20000 8025dc0: 9201 str r2, [sp, #4] StartUpCounter++; 8025dc2: 9a00 ldr r2, [sp, #0] 8025dc4: 3201 adds r2, #1 8025dc6: 9200 str r2, [sp, #0] } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); 8025dc8: 9a01 ldr r2, [sp, #4] 8025dca: b91a cbnz r2, 8025dd4 8025dcc: 9a00 ldr r2, [sp, #0] 8025dce: f5b2 6fa0 cmp.w r2, #1280 ; 0x500 8025dd2: d1f2 bne.n 8025dba if ((RCC->CR & RCC_CR_HSERDY) != RESET) 8025dd4: 4b21 ldr r3, [pc, #132] ; (8025e5c ) 8025dd6: 681b ldr r3, [r3, #0] 8025dd8: f413 3300 ands.w r3, r3, #131072 ; 0x20000 { HSEStatus = (uint32_t)0x01; 8025ddc: bf18 it ne 8025dde: 2301 movne r3, #1 } else { HSEStatus = (uint32_t)0x00; 8025de0: 9301 str r3, [sp, #4] } if (HSEStatus == (uint32_t)0x01) 8025de2: 9b01 ldr r3, [sp, #4] 8025de4: 2b01 cmp r3, #1 8025de6: d133 bne.n 8025e50 { /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; 8025de8: 4b1c ldr r3, [pc, #112] ; (8025e5c ) 8025dea: 6c1a ldr r2, [r3, #64] ; 0x40 8025dec: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 8025df0: 641a str r2, [r3, #64] ; 0x40 PWR->CR |= PWR_CR_VOS; 8025df2: 4a1c ldr r2, [pc, #112] ; (8025e64 ) 8025df4: 6811 ldr r1, [r2, #0] 8025df6: f441 4180 orr.w r1, r1, #16384 ; 0x4000 8025dfa: 6011 str r1, [r2, #0] /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; 8025dfc: 689a ldr r2, [r3, #8] 8025dfe: 609a str r2, [r3, #8] /* PCLK2 = HCLK / 2*/ RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; 8025e00: 689a ldr r2, [r3, #8] 8025e02: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8025e06: 609a str r2, [r3, #8] /* PCLK1 = HCLK / 4*/ RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; 8025e08: 689a ldr r2, [r3, #8] 8025e0a: f442 52a0 orr.w r2, r2, #5120 ; 0x1400 8025e0e: 609a str r2, [r3, #8] /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | 8025e10: 4a15 ldr r2, [pc, #84] ; (8025e68 ) 8025e12: 605a str r2, [r3, #4] (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); /* Enable the main PLL */ RCC->CR |= RCC_CR_PLLON; 8025e14: 681a ldr r2, [r3, #0] 8025e16: f042 7280 orr.w r2, r2, #16777216 ; 0x1000000 8025e1a: 601a str r2, [r3, #0] /* Wait till the main PLL is ready */ while((RCC->CR & RCC_CR_PLLRDY) == 0) 8025e1c: 6819 ldr r1, [r3, #0] 8025e1e: 4a0f ldr r2, [pc, #60] ; (8025e5c ) 8025e20: 0189 lsls r1, r1, #6 8025e22: d5fb bpl.n 8025e1c { } /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; 8025e24: 4b11 ldr r3, [pc, #68] ; (8025e6c ) 8025e26: f240 6105 movw r1, #1541 ; 0x605 8025e2a: 6019 str r1, [r3, #0] /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); 8025e2c: 6893 ldr r3, [r2, #8] 8025e2e: f023 0303 bic.w r3, r3, #3 8025e32: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_SW_PLL; 8025e34: 6893 ldr r3, [r2, #8] 8025e36: f043 0302 orr.w r3, r3, #2 8025e3a: 6093 str r3, [r2, #8] /* Wait till the main PLL is used as system clock source */ while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); 8025e3c: 6891 ldr r1, [r2, #8] 8025e3e: 4b07 ldr r3, [pc, #28] ; (8025e5c ) 8025e40: f001 010c and.w r1, r1, #12 8025e44: 2908 cmp r1, #8 8025e46: d1f9 bne.n 8025e3c { } /* Добавил переход на внутренний генератор в случае отказа HSE */ RCC->CR|=RCC_CR_CSSON; 8025e48: 681a ldr r2, [r3, #0] 8025e4a: f442 2200 orr.w r2, r2, #524288 ; 0x80000 8025e4e: 601a str r2, [r3, #0] /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ 8025e50: 4b07 ldr r3, [pc, #28] ; (8025e70 ) 8025e52: f04f 6200 mov.w r2, #134217728 ; 0x8000000 8025e56: 609a str r2, [r3, #8] #endif } 8025e58: b002 add sp, #8 8025e5a: 4770 bx lr 8025e5c: 40023800 .word 0x40023800 8025e60: 24003010 .word 0x24003010 8025e64: 40007000 .word 0x40007000 8025e68: 07405419 .word 0x07405419 8025e6c: 40023c00 .word 0x40023c00 8025e70: e000ed00 .word 0xe000ed00 08025e74 : GPIO_TABLE(EXPAND_AS_DEFS) }; void gpio_hw_config_pin(GPIO_TypeDef *port, uint8_t pin, uint16_t conf) { uint8_t shift; shift = pin * 2; 8025e74: 004b lsls r3, r1, #1 port->MODER &= ~(GPIO_MODER_MASK << shift); 8025e76: b2db uxtb r3, r3 gpio_pindef_t gpio_pins[] = { GPIO_TABLE(EXPAND_AS_DEFS) }; void gpio_hw_config_pin(GPIO_TypeDef *port, uint8_t pin, uint16_t conf) { 8025e78: b570 push {r4, r5, r6, lr} uint8_t shift; shift = pin * 2; port->MODER &= ~(GPIO_MODER_MASK << shift); 8025e7a: 2403 movs r4, #3 8025e7c: 6805 ldr r5, [r0, #0] 8025e7e: fa04 f403 lsl.w r4, r4, r3 8025e82: 43e4 mvns r4, r4 8025e84: 4025 ands r5, r4 8025e86: 6005 str r5, [r0, #0] port->MODER |= (uint32_t)((conf >> GPIO_MODE_CFG_SHIFT) & GPIO_MODER_MASK) << shift; 8025e88: 6806 ldr r6, [r0, #0] 8025e8a: f002 0503 and.w r5, r2, #3 8025e8e: fa05 f503 lsl.w r5, r5, r3 8025e92: 4335 orrs r5, r6 8025e94: 6005 str r5, [r0, #0] port->OTYPER &= ~(GPIO_TYPER_MASK << pin); 8025e96: 6846 ldr r6, [r0, #4] 8025e98: 2501 movs r5, #1 8025e9a: fa05 f501 lsl.w r5, r5, r1 8025e9e: ea26 0505 bic.w r5, r6, r5 8025ea2: 6045 str r5, [r0, #4] port->OTYPER |= (uint32_t)((conf >> GPIO_TYPE_CFG_SHIFT) & GPIO_TYPER_MASK) << pin; 8025ea4: 6845 ldr r5, [r0, #4] 8025ea6: f3c2 0680 ubfx r6, r2, #2, #1 8025eaa: fa06 f101 lsl.w r1, r6, r1 8025eae: 4329 orrs r1, r5 8025eb0: 6041 str r1, [r0, #4] port->OSPEEDR &= ~(GPIO_SPEEDR_MASK << shift); 8025eb2: 6881 ldr r1, [r0, #8] 8025eb4: 4021 ands r1, r4 8025eb6: 6081 str r1, [r0, #8] port->OSPEEDR |= (uint32_t)((conf >> GPIO_SPEED_CFG_SHIFT) & GPIO_SPEEDR_MASK) << shift; 8025eb8: 6885 ldr r5, [r0, #8] 8025eba: f3c2 1101 ubfx r1, r2, #4, #2 8025ebe: fa01 f103 lsl.w r1, r1, r3 8025ec2: 4329 orrs r1, r5 8025ec4: 6081 str r1, [r0, #8] port->PUPDR &= ~(GPIO_PUPDR_MASK << shift); 8025ec6: 68c1 ldr r1, [r0, #12] 8025ec8: 400c ands r4, r1 8025eca: 60c4 str r4, [r0, #12] port->PUPDR |= (uint32_t)((conf >> GPIO_PUPD_CFG_SHIFT) & GPIO_PUPDR_MASK) << shift; 8025ecc: 68c1 ldr r1, [r0, #12] 8025ece: f3c2 1281 ubfx r2, r2, #6, #2 8025ed2: fa02 f303 lsl.w r3, r2, r3 8025ed6: 430b orrs r3, r1 8025ed8: 60c3 str r3, [r0, #12] 8025eda: bd70 pop {r4, r5, r6, pc} 08025edc : } void gpio_connect_af(gpio_t id, uint8_t af_n) { 8025edc: b510 push {r4, lr} gpio_pindef_t *pin = &gpio_pins[id]; 8025ede: 4b13 ldr r3, [pc, #76] ; (8025f2c ) 8025ee0: eb03 02c0 add.w r2, r3, r0, lsl #3 uint8_t shift; if (pin->pin < 8) { shift = pin->pin * 4; pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8025ee4: f853 3030 ldr.w r3, [r3, r0, lsl #3] } void gpio_connect_af(gpio_t id, uint8_t af_n) { gpio_pindef_t *pin = &gpio_pins[id]; uint8_t shift; if (pin->pin < 8) { 8025ee8: 7912 ldrb r2, [r2, #4] 8025eea: 2a07 cmp r2, #7 8025eec: d80e bhi.n 8025f0c shift = pin->pin * 4; 8025eee: 0092 lsls r2, r2, #2 pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8025ef0: 6a1c ldr r4, [r3, #32] 8025ef2: b2d2 uxtb r2, r2 8025ef4: 200f movs r0, #15 8025ef6: fa00 f002 lsl.w r0, r0, r2 8025efa: ea24 0000 bic.w r0, r4, r0 8025efe: 6218 str r0, [r3, #32] pin->port->AFR[0] |= af_n << shift; 8025f00: 6a18 ldr r0, [r3, #32] 8025f02: fa01 f202 lsl.w r2, r1, r2 8025f06: 4302 orrs r2, r0 8025f08: 621a str r2, [r3, #32] 8025f0a: bd10 pop {r4, pc} } else { shift = (pin->pin - 8) * 4; 8025f0c: 3a08 subs r2, #8 8025f0e: 0092 lsls r2, r2, #2 pin->port->AFR[1] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8025f10: 6a5c ldr r4, [r3, #36] ; 0x24 8025f12: b2d2 uxtb r2, r2 8025f14: 200f movs r0, #15 8025f16: fa00 f002 lsl.w r0, r0, r2 8025f1a: ea24 0000 bic.w r0, r4, r0 8025f1e: 6258 str r0, [r3, #36] ; 0x24 pin->port->AFR[1] |= af_n << shift; 8025f20: 6a58 ldr r0, [r3, #36] ; 0x24 8025f22: fa01 f202 lsl.w r2, r1, r2 8025f26: 4302 orrs r2, r0 8025f28: 625a str r2, [r3, #36] ; 0x24 8025f2a: bd10 pop {r4, pc} 8025f2c: 200005c0 .word 0x200005c0 08025f30 : } } } void gpio_set(gpio_t pin, bool value) { if (gpio_pins[pin].flags & GPIO_INV) 8025f30: 4b0e ldr r3, [pc, #56] ; (8025f6c ) 8025f32: eb03 02c0 add.w r2, r3, r0, lsl #3 8025f36: 88d2 ldrh r2, [r2, #6] 8025f38: f002 0210 and.w r2, r2, #16 8025f3c: b292 uxth r2, r2 8025f3e: b10a cbz r2, 8025f44 value = !value; 8025f40: f081 0101 eor.w r1, r1, #1 8025f44: 00c2 lsls r2, r0, #3 if (value) 8025f46: b141 cbz r1, 8025f5a gpio_pins[pin].port->BSRRL = 1 << gpio_pins[pin].pin; 8025f48: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8025f4c: 189b adds r3, r3, r2 8025f4e: 2201 movs r2, #1 8025f50: 791b ldrb r3, [r3, #4] 8025f52: fa02 f303 lsl.w r3, r2, r3 8025f56: 830b strh r3, [r1, #24] 8025f58: 4770 bx lr else gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; 8025f5a: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8025f5e: 189b adds r3, r3, r2 8025f60: 2201 movs r2, #1 8025f62: 791b ldrb r3, [r3, #4] 8025f64: fa02 f303 lsl.w r3, r2, r3 8025f68: 834b strh r3, [r1, #26] 8025f6a: 4770 bx lr 8025f6c: 200005c0 .word 0x200005c0 08025f70 : } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 8025f70: b570 push {r4, r5, r6, lr} gpio_pindef_t *pin = &gpio_pins[id]; 8025f72: 4e1e ldr r6, [pc, #120] ; (8025fec ) 8025f74: eb06 05c0 add.w r5, r6, r0, lsl #3 } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 8025f78: 4604 mov r4, r0 gpio_pindef_t *pin = &gpio_pins[id]; if (pin->flags & GPIO_AF) { 8025f7a: 88e9 ldrh r1, [r5, #6] 8025f7c: f401 7300 and.w r3, r1, #512 ; 0x200 8025f80: b29b uxth r3, r3 8025f82: b13b cbz r3, 8025f94 uint8_t af_n = (uint8_t)(pin->flags >> _GPIO_AF_SHIFT); gpio_connect_af(id, af_n); 8025f84: 0a89 lsrs r1, r1, #10 8025f86: f7ff ffa9 bl 8025edc gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | 8025f8a: f856 0034 ldr.w r0, [r6, r4, lsl #3] 8025f8e: 7929 ldrb r1, [r5, #4] 8025f90: 2232 movs r2, #50 ; 0x32 8025f92: e005 b.n 8025fa0 GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) 8025f94: 07cb lsls r3, r1, #31 8025f96: d507 bpl.n 8025fa8 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 8025f98: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8025f9c: 7929 ldrb r1, [r5, #4] 8025f9e: 2230 movs r2, #48 ; 0x30 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } 8025fa0: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} gpio_connect_af(id, af_n); gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 8025fa4: f7ff bf66 b.w 8025e74 GPIO_SPEED_HIGH_CFG); else if (pin->flags & GPIO_IN_PU) { 8025fa8: f001 0302 and.w r3, r1, #2 8025fac: b29b uxth r3, r3 8025fae: b123 cbz r3, 8025fba gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | GPIO_PU_CFG | 8025fb0: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8025fb4: 7929 ldrb r1, [r5, #4] 8025fb6: 2270 movs r2, #112 ; 0x70 8025fb8: e00d b.n 8025fd6 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } else if (pin->flags & GPIO_OUT) { 8025fba: f001 0304 and.w r3, r1, #4 8025fbe: b29b uxth r3, r3 8025fc0: b19b cbz r3, 8025fea gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | 8025fc2: f001 0120 and.w r1, r1, #32 8025fc6: b28a uxth r2, r1 8025fc8: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8025fcc: 7929 ldrb r1, [r5, #4] 8025fce: 2a00 cmp r2, #0 8025fd0: bf0c ite eq 8025fd2: 2231 moveq r2, #49 ; 0x31 8025fd4: 2235 movne r2, #53 ; 0x35 8025fd6: f7ff ff4d bl 8025e74 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 8025fda: 88e9 ldrh r1, [r5, #6] 8025fdc: 4620 mov r0, r4 8025fde: f3c1 01c0 ubfx r1, r1, #3, #1 } } 8025fe2: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} else if (pin->flags & GPIO_OUT) { gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 8025fe6: f7ff bfa3 b.w 8025f30 8025fea: bd70 pop {r4, r5, r6, pc} 8025fec: 200005c0 .word 0x200005c0 08025ff0 : } } void gpio_init(void) { 8025ff0: b538 push {r3, r4, r5, lr} uint32_t i; GPIO_DeInit(GPIOA); 8025ff2: 4812 ldr r0, [pc, #72] ; (802603c ) GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 8025ff4: 4d12 ldr r5, [pc, #72] ; (8026040 ) uint32_t i; GPIO_DeInit(GPIOA); 8025ff6: f7ff fa5d bl 80254b4 GPIO_DeInit(GPIOB); 8025ffa: 4812 ldr r0, [pc, #72] ; (8026044 ) 8025ffc: f7ff fa5a bl 80254b4 GPIO_DeInit(GPIOC); 8026000: 4811 ldr r0, [pc, #68] ; (8026048 ) 8026002: f7ff fa57 bl 80254b4 GPIO_DeInit(GPIOD); 8026006: 4811 ldr r0, [pc, #68] ; (802604c ) 8026008: f7ff fa54 bl 80254b4 GPIO_DeInit(GPIOE); 802600c: 4810 ldr r0, [pc, #64] ; (8026050 ) 802600e: f7ff fa51 bl 80254b4 // configure clocks RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | 8026012: 4b10 ldr r3, [pc, #64] ; (8026054 ) 8026014: 6b1a ldr r2, [r3, #48] ; 0x30 8026016: f042 021f orr.w r2, r2, #31 802601a: 631a str r2, [r3, #48] ; 0x30 RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { 802601c: 2400 movs r4, #0 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 802601e: eb05 03c4 add.w r3, r5, r4, lsl #3 RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { if (gpio_pins[i].flags & GPIO_NOINIT) 8026022: 88db ldrh r3, [r3, #6] 8026024: f003 0380 and.w r3, r3, #128 ; 0x80 8026028: b29b uxth r3, r3 802602a: b913 cbnz r3, 8026032 continue; else { gpio_set_config(i); 802602c: b2e0 uxtb r0, r4 802602e: f7ff ff9f bl 8025f70 RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { 8026032: 3401 adds r4, #1 8026034: 2c11 cmp r4, #17 8026036: d1f2 bne.n 802601e continue; else { gpio_set_config(i); } } } 8026038: bd38 pop {r3, r4, r5, pc} 802603a: bf00 nop 802603c: 40020000 .word 0x40020000 8026040: 200005c0 .word 0x200005c0 8026044: 40020400 .word 0x40020400 8026048: 40020800 .word 0x40020800 802604c: 40020c00 .word 0x40020c00 8026050: 40021000 .word 0x40021000 8026054: 40023800 .word 0x40023800 08026058 : gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; } void gpio_invert_output(gpio_t pin) { gpio_pins[pin].port->ODR ^= 1 << gpio_pins[pin].pin; 8026058: 4a06 ldr r2, [pc, #24] ; (8026074 ) 802605a: f852 3030 ldr.w r3, [r2, r0, lsl #3] 802605e: eb02 02c0 add.w r2, r2, r0, lsl #3 8026062: 6959 ldr r1, [r3, #20] 8026064: 7912 ldrb r2, [r2, #4] 8026066: 2001 movs r0, #1 8026068: fa00 f202 lsl.w r2, r0, r2 802606c: 404a eors r2, r1 802606e: 615a str r2, [r3, #20] 8026070: 4770 bx lr 8026072: bf00 nop 8026074: 200005c0 .word 0x200005c0 08026078 : } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 8026078: 490e ldr r1, [pc, #56] ; (80260b4 ) 802607a: eb01 02c0 add.w r2, r1, r0, lsl #3 void gpio_invert_output(gpio_t pin) { gpio_pins[pin].port->ODR ^= 1 << gpio_pins[pin].pin; } bool gpio_get(gpio_t pin) { 802607e: b510 push {r4, lr} bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 8026080: 88d3 ldrh r3, [r2, #6] 8026082: f003 0480 and.w r4, r3, #128 ; 0x80 8026086: b2a4 uxth r4, r4 8026088: b994 cbnz r4, 80260b0 return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 802608a: f851 1030 ldr.w r1, [r1, r0, lsl #3] 802608e: 7912 ldrb r2, [r2, #4] 8026090: 6908 ldr r0, [r1, #16] 8026092: 2101 movs r1, #1 8026094: fa01 f102 lsl.w r1, r1, r2 8026098: 4001 ands r1, r0 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 802609a: f003 0310 and.w r3, r3, #16 bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 802609e: 40d1 lsrs r1, r2 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80260a0: b29b uxth r3, r3 bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 80260a2: bf0c ite eq 80260a4: 2000 moveq r0, #0 80260a6: 2001 movne r0, #1 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 80260a8: b11b cbz r3, 80260b2 80260aa: f080 0001 eor.w r0, r0, #1 80260ae: bd10 pop {r4, pc} } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; 80260b0: 2000 movs r0, #0 } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; } } 80260b2: bd10 pop {r4, pc} 80260b4: 200005c0 .word 0x200005c0 080260b8 : #include "rng.h" #include "stm32f4xx.h" void RNG_Init(void) { 80260b8: b508 push {r3, lr} RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); 80260ba: 2040 movs r0, #64 ; 0x40 80260bc: 2101 movs r1, #1 80260be: f7ff fb51 bl 8025764 RNG_Cmd(ENABLE); 80260c2: 2001 movs r0, #1 } 80260c4: e8bd 4008 ldmia.w sp!, {r3, lr} void RNG_Init(void) { RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_RNG,ENABLE); RNG_Cmd(ENABLE); 80260c8: f7ff bba8 b.w 802581c 080260cc : } uint32_t GetRandomNumber(void) { return RNG_GetRandomNumber();; 80260cc: f7ff bbb2 b.w 8025834 080260d0 : /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); } TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 80260d0: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 80260d4: 2901 cmp r1, #1 /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); } TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 80260d6: 4603 mov r3, r0 80260d8: 460e mov r6, r1 80260da: 79c0 ldrb r0, [r0, #7] TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 80260dc: d137 bne.n 802614e tmp.date = TM_RTC_BCD2BIN(data->date); tmp.month = TM_RTC_BCD2BIN(data->month); 80260de: 7a1c ldrb r4, [r3, #8] tmp.year = TM_RTC_BCD2BIN(data->year); 80260e0: 7a5d ldrb r5, [r3, #9] tmp.hours = TM_RTC_BCD2BIN(data->hours); tmp.minutes = TM_RTC_BCD2BIN(data->minutes); tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 80260e2: f893 8000 ldrb.w r8, [r3] TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { tmp.date = TM_RTC_BCD2BIN(data->date); 80260e6: 220a movs r2, #10 80260e8: 0901 lsrs r1, r0, #4 80260ea: f000 000f and.w r0, r0, #15 80260ee: fb02 0001 mla r0, r2, r1, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 80260f2: 0921 lsrs r1, r4, #4 80260f4: f004 040f and.w r4, r4, #15 80260f8: fb02 4101 mla r1, r2, r1, r4 tmp.year = TM_RTC_BCD2BIN(data->year); 80260fc: 092c lsrs r4, r5, #4 80260fe: f005 050f and.w r5, r5, #15 8026102: fb02 5404 mla r4, r2, r4, r5 tmp.hours = TM_RTC_BCD2BIN(data->hours); 8026106: 795d ldrb r5, [r3, #5] 8026108: ea4f 1c15 mov.w ip, r5, lsr #4 802610c: f005 050f and.w r5, r5, #15 8026110: fb02 5c0c mla ip, r2, ip, r5 tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8026114: 791d ldrb r5, [r3, #4] 8026116: 092f lsrs r7, r5, #4 8026118: f005 050f and.w r5, r5, #15 802611c: fb02 5707 mla r7, r2, r7, r5 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8026120: ea4f 1518 mov.w r5, r8, lsr #4 8026124: f008 080f and.w r8, r8, #15 8026128: fb02 8505 mla r5, r2, r5, r8 tmp.day = TM_RTC_BCD2BIN(data->day); 802612c: f893 8006 ldrb.w r8, [r3, #6] 8026130: ea4f 1918 mov.w r9, r8, lsr #4 8026134: f008 080f and.w r8, r8, #15 8026138: fb02 8209 mla r2, r2, r9, r8 TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { tmp.date = TM_RTC_BCD2BIN(data->date); 802613c: b2c0 uxtb r0, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 802613e: b2c9 uxtb r1, r1 tmp.year = TM_RTC_BCD2BIN(data->year); 8026140: b2e4 uxtb r4, r4 tmp.hours = TM_RTC_BCD2BIN(data->hours); 8026142: fa5f fc8c uxtb.w ip, ip tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8026146: b2ff uxtb r7, r7 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8026148: b2ed uxtb r5, r5 tmp.day = TM_RTC_BCD2BIN(data->day); 802614a: b2d2 uxtb r2, r2 802614c: e006 b.n 802615c } else { tmp.date = data->date; tmp.month = data->month; 802614e: 7a19 ldrb r1, [r3, #8] tmp.year = data->year; 8026150: 7a5c ldrb r4, [r3, #9] tmp.hours = data->hours; 8026152: f893 c005 ldrb.w ip, [r3, #5] tmp.minutes = data->minutes; 8026156: 791f ldrb r7, [r3, #4] tmp.seconds = data->seconds; 8026158: 781d ldrb r5, [r3, #0] tmp.day = data->day; 802615a: 799a ldrb r2, [r3, #6] } /* Check year and month */ if ( 802615c: 2c63 cmp r4, #99 ; 0x63 802615e: d86c bhi.n 802623a tmp.year > 99 || 8026160: 2900 cmp r1, #0 8026162: d06a beq.n 802623a tmp.month == 0 || 8026164: 290c cmp r1, #12 8026166: d868 bhi.n 802623a tmp.month > 12 || 8026168: 2800 cmp r0, #0 802616a: d066 beq.n 802623a tmp.date == 0 || tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 802616c: f014 0f03 tst.w r4, #3 8026170: d10a bne.n 8026188 8026172: f504 69fa add.w r9, r4, #2000 ; 0x7d0 8026176: f04f 0864 mov.w r8, #100 ; 0x64 802617a: fb99 faf8 sdiv sl, r9, r8 802617e: fb08 981a mls r8, r8, sl, r9 8026182: f1b8 0f00 cmp.w r8, #0 8026186: d10c bne.n 80261a2 8026188: f504 64fa add.w r4, r4, #2000 ; 0x7d0 802618c: f44f 78c8 mov.w r8, #400 ; 0x190 8026190: fb94 f9f8 sdiv r9, r4, r8 8026194: fb08 4419 mls r4, r8, r9, r4 8026198: f1d4 0401 rsbs r4, r4, #1 802619c: bf38 it cc 802619e: 2400 movcc r4, #0 80261a0: e000 b.n 80261a4 80261a2: 2401 movs r4, #1 80261a4: f8df 80a8 ldr.w r8, [pc, #168] ; 8026250 80261a8: f04f 090c mov.w r9, #12 80261ac: fb09 8404 mla r4, r9, r4, r8 80261b0: 1861 adds r1, r4, r1 /* Check year and month */ if ( tmp.year > 99 || tmp.month == 0 || tmp.month > 12 || tmp.date == 0 || 80261b2: f811 1c01 ldrb.w r1, [r1, #-1] 80261b6: 4281 cmp r1, r0 80261b8: d33f bcc.n 802623a tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 80261ba: f1bc 0f17 cmp.w ip, #23 80261be: d83c bhi.n 802623a tmp.hours > 23 || 80261c0: 2f3b cmp r7, #59 ; 0x3b 80261c2: d83a bhi.n 802623a tmp.minutes > 59 || 80261c4: 2d3b cmp r5, #59 ; 0x3b 80261c6: d838 bhi.n 802623a tmp.seconds > 59 || 80261c8: 2a00 cmp r2, #0 80261ca: d036 beq.n 802623a tmp.day == 0 || 80261cc: 2a07 cmp r2, #7 80261ce: d834 bhi.n 802623a /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 80261d0: 795a ldrb r2, [r3, #5] 80261d2: 4d1b ldr r5, [pc, #108] ; (8026240 ) RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 80261d4: 4c1b ldr r4, [pc, #108] ; (8026244 ) /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 80261d6: 702a strb r2, [r5, #0] RTC_TimeStruct.RTC_Minutes = data->minutes; 80261d8: 791a ldrb r2, [r3, #4] RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80261da: 481b ldr r0, [pc, #108] ; (8026248 ) return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; RTC_TimeStruct.RTC_Minutes = data->minutes; 80261dc: 706a strb r2, [r5, #1] RTC_TimeStruct.RTC_Seconds = data->seconds; 80261de: 781a ldrb r2, [r3, #0] 80261e0: 70aa strb r2, [r5, #2] /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 80261e2: 79da ldrb r2, [r3, #7] 80261e4: 70a2 strb r2, [r4, #2] RTC_DateStruct.RTC_Month = data->month; 80261e6: 7a1a ldrb r2, [r3, #8] 80261e8: 7062 strb r2, [r4, #1] RTC_DateStruct.RTC_Year = data->year; 80261ea: 7a5a ldrb r2, [r3, #9] RTC_DateStruct.RTC_WeekDay = data->day; 80261ec: 799b ldrb r3, [r3, #6] RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; 80261ee: 70e2 strb r2, [r4, #3] RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80261f0: 221f movs r2, #31 RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80261f2: 2700 movs r7, #0 RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80261f4: 6042 str r2, [r0, #4] RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80261f6: f502 7278 add.w r2, r2, #992 ; 0x3e0 RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; 80261fa: 7023 strb r3, [r4, #0] /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80261fc: 6007 str r7, [r0, #0] RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80261fe: 6082 str r2, [r0, #8] RTC_Init(&RTC_InitStruct); 8026200: f7ff fb5a bl 80258b8 /* Set time */ if (format == TM_RTC_Format_BCD) { 8026204: 2e01 cmp r6, #1 8026206: d105 bne.n 8026214 RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); 8026208: 4630 mov r0, r6 802620a: 4629 mov r1, r5 802620c: f7ff fb98 bl 8025940 RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); } /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); 8026210: 4630 mov r0, r6 8026212: e004 b.n 802621e /* Set time */ if (format == TM_RTC_Format_BCD) { RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); } else { RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); 8026214: 4638 mov r0, r7 8026216: 4629 mov r1, r5 8026218: f7ff fb92 bl 8025940 /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); } else { RTC_SetDate(RTC_Format_BIN, &RTC_DateStruct); 802621c: 4638 mov r0, r7 802621e: 4621 mov r1, r4 8026220: f7ff fbfc bl 8025a1c } if (TM_RTC_Status != RTC_STATUS_ZERO) { 8026224: 4b09 ldr r3, [pc, #36] ; (802624c ) 8026226: 6818 ldr r0, [r3, #0] 8026228: b140 cbz r0, 802623c /* Write backup registers */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); 802622a: 2013 movs r0, #19 802622c: f244 3121 movw r1, #17185 ; 0x4321 8026230: f7ff fc5e bl 8025af0 } /* Return OK */ return TM_RTC_Result_Ok; 8026234: 2000 movs r0, #0 8026236: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} tmp.seconds > 59 || tmp.day == 0 || tmp.day > 7 ) { /* Invalid date */ return TM_RTC_Result_Error; 802623a: 2001 movs r0, #1 RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); } /* Return OK */ return TM_RTC_Result_Ok; } 802623c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8026240: 2000e5bc .word 0x2000e5bc 8026244: 2000e5cc .word 0x2000e5cc 8026248: 2000e5c0 .word 0x2000e5c0 802624c: 200019d8 .word 0x200019d8 8026250: 20000648 .word 0x20000648 08026254 : TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026254: b530 push {r4, r5, lr} TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026256: 2200 movs r2, #0 /* Return OK */ return TM_RTC_Result_Ok; } TM_RTC_Result_t TM_RTC_SetDateTimeString(char* str) { 8026258: b085 sub sp, #20 TM_RTC_t tmp; uint8_t i = 0; 802625a: 4613 mov r3, r2 /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802625c: 250a movs r5, #10 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802625e: e006 b.n 802626e tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026260: fb05 1202 mla r2, r5, r2, r1 8026264: 3a30 subs r2, #48 ; 0x30 i++; 8026266: 3301 adds r3, #1 uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026268: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802626c: b2db uxtb r3, r3 TM_RTC_t tmp; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802626e: 5cc1 ldrb r1, [r0, r3] 8026270: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026274: 2c09 cmp r4, #9 8026276: d9f3 bls.n 8026260 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026278: 3301 adds r3, #1 802627a: f88d 2007 strb.w r2, [sp, #7] 802627e: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026280: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026282: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026284: e006 b.n 8026294 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026286: fb05 1202 mla r2, r5, r2, r1 802628a: 3a30 subs r2, #48 ; 0x30 i++; 802628c: 3301 adds r3, #1 i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802628e: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026292: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026294: 5cc1 ldrb r1, [r0, r3] 8026296: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802629a: 2c09 cmp r4, #9 802629c: d9f3 bls.n 8026286 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 802629e: 3301 adds r3, #1 80262a0: f88d 2008 strb.w r2, [sp, #8] 80262a4: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262a6: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262a8: 250a movs r5, #10 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262aa: e006 b.n 80262ba tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262ac: fb05 1202 mla r2, r5, r2, r1 80262b0: 3a30 subs r2, #48 ; 0x30 i++; 80262b2: 3301 adds r3, #1 i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262b4: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80262b8: b2db uxtb r3, r3 } i++; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262ba: 5cc1 ldrb r1, [r0, r3] 80262bc: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80262c0: 2c09 cmp r4, #9 80262c2: d9f3 bls.n 80262ac tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80262c4: 3301 adds r3, #1 80262c6: f88d 2009 strb.w r2, [sp, #9] 80262ca: b2db uxtb r3, r3 /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262cc: 2200 movs r2, #0 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262ce: 250a movs r5, #10 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262d0: e006 b.n 80262e0 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262d2: fb05 1202 mla r2, r5, r2, r1 80262d6: 3a30 subs r2, #48 ; 0x30 i++; 80262d8: 3301 adds r3, #1 i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262da: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80262de: b2db uxtb r3, r3 } i++; /* Get day in a week */ tmp.day = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262e0: 5cc1 ldrb r1, [r0, r3] 80262e2: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80262e6: 2c09 cmp r4, #9 80262e8: d9f3 bls.n 80262d2 tmp.day = tmp.day * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80262ea: 3301 adds r3, #1 80262ec: f88d 2006 strb.w r2, [sp, #6] 80262f0: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262f2: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262f4: 250a movs r5, #10 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80262f6: e006 b.n 8026306 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80262f8: fb05 1202 mla r2, r5, r2, r1 80262fc: 3a30 subs r2, #48 ; 0x30 i++; 80262fe: 3301 adds r3, #1 i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026300: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026304: b2db uxtb r3, r3 } i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026306: 5cc1 ldrb r1, [r0, r3] 8026308: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802630c: 2c09 cmp r4, #9 802630e: d9f3 bls.n 80262f8 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026310: 3301 adds r3, #1 8026312: f88d 2005 strb.w r2, [sp, #5] 8026316: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026318: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802631a: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802631c: e006 b.n 802632c tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802631e: fb05 1202 mla r2, r5, r2, r1 8026322: 3a30 subs r2, #48 ; 0x30 i++; 8026324: 3301 adds r3, #1 i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026326: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802632a: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802632c: 5cc1 ldrb r1, [r0, r3] 802632e: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026332: 2c09 cmp r4, #9 8026334: d9f3 bls.n 802631e tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026336: 3301 adds r3, #1 8026338: f88d 2004 strb.w r2, [sp, #4] 802633c: b2db uxtb r3, r3 /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802633e: 2200 movs r2, #0 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026340: 250a movs r5, #10 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026342: e006 b.n 8026352 tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026344: fb05 1202 mla r2, r5, r2, r1 8026348: 3a30 subs r2, #48 ; 0x30 i++; 802634a: 3301 adds r3, #1 i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.seconds = tmp.seconds * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802634c: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026350: b2db uxtb r3, r3 } i++; /* Get seconds */ tmp.seconds = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026352: 5cc1 ldrb r1, [r0, r3] 8026354: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026358: 2c09 cmp r4, #9 802635a: d9f3 bls.n 8026344 802635c: a804 add r0, sp, #16 i++; } i++; /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); 802635e: 2100 movs r1, #0 8026360: f800 2d10 strb.w r2, [r0, #-16]! 8026364: 4668 mov r0, sp 8026366: f7ff feb3 bl 80260d0 } 802636a: b005 add sp, #20 802636c: bd30 pop {r4, r5, pc} 0802636e : uint16_t TM_RTC_GetDaysInYear(uint8_t year) { /* Return days in year */ return TM_RTC_DAYS_IN_YEAR(2000 + year); } void TM_RTC_Config(TM_RTC_ClockSource_t source) { 802636e: b508 push {r3, lr} if (source == TM_RTC_ClockSource_Internal) { 8026370: b950 cbnz r0, 8026388 /* Enable the LSI OSC */ RCC_LSICmd(ENABLE); 8026372: 2001 movs r0, #1 8026374: f7ff f980 bl 8025678 /* Wait till LSI is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET); 8026378: 2061 movs r0, #97 ; 0x61 802637a: f7ff fa3b bl 80257f4 802637e: 2800 cmp r0, #0 8026380: d0fa beq.n 8026378 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI); 8026382: f44f 7000 mov.w r0, #512 ; 0x200 8026386: e00a b.n 802639e } else if (source == TM_RTC_ClockSource_External) { 8026388: 2801 cmp r0, #1 802638a: d10a bne.n 80263a2 /* Enable the LSE OSC */ RCC_LSEConfig(RCC_LSE_ON); 802638c: f7ff f964 bl 8025658 /* Wait till LSE is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET); 8026390: 2041 movs r0, #65 ; 0x41 8026392: f7ff fa2f bl 80257f4 8026396: 2800 cmp r0, #0 8026398: d0fa beq.n 8026390 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); 802639a: f44f 7080 mov.w r0, #256 ; 0x100 802639e: f7ff f9b7 bl 8025710 } /* Enable the RTC Clock */ RCC_RTCCLKCmd(ENABLE); 80263a2: 2001 movs r0, #1 80263a4: f7ff f9cc bl 8025740 /* Wait for register synchronization */ RTC_WaitForSynchro(); 80263a8: f7ff faa8 bl 80258fc /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 80263ac: 2013 movs r0, #19 80263ae: f241 2134 movw r1, #4660 ; 0x1234 } 80263b2: e8bd 4008 ldmia.w sp!, {r3, lr} /* Wait for register synchronization */ RTC_WaitForSynchro(); /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 80263b6: f7ff bb9b b.w 8025af0 80263ba: 0000 movs r0, r0 080263bc : /* Enable wakeup command */ RTC_WakeUpCmd(ENABLE); } } uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data) { 80263bc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} uint32_t days = 0, seconds = 0; uint16_t i; uint16_t year = (uint16_t) (data->year + 2000); 80263c0: 7a42 ldrb r2, [r0, #9] 80263c2: f240 73b2 movw r3, #1970 ; 0x7b2 80263c6: f502 62fa add.w r2, r2, #2000 ; 0x7d0 80263ca: 2100 movs r1, #0 if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); 80263cc: f44f 75c8 mov.w r5, #400 ; 0x190 80263d0: 2664 movs r6, #100 ; 0x64 80263d2: 079c lsls r4, r3, #30 80263d4: d108 bne.n 80263e8 80263d6: fbb3 f4f6 udiv r4, r3, r6 80263da: fb06 3414 mls r4, r6, r4, r3 80263de: b2a4 uxth r4, r4 80263e0: b114 cbz r4, 80263e8 80263e2: f44f 74b7 mov.w r4, #366 ; 0x16e 80263e6: e008 b.n 80263fa 80263e8: fbb3 f4f5 udiv r4, r3, r5 80263ec: fb05 3414 mls r4, r5, r4, r3 80263f0: b2a4 uxth r4, r4 80263f2: 2c00 cmp r4, #0 80263f4: d0f5 beq.n 80263e2 80263f6: f240 146d movw r4, #365 ; 0x16d /* Year is below offset year */ if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { 80263fa: 3301 adds r3, #1 80263fc: b29b uxth r3, r3 80263fe: 4293 cmp r3, r2 days += TM_RTC_DAYS_IN_YEAR(i); 8026400: 4421 add r1, r4 /* Year is below offset year */ if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { 8026402: d3e6 bcc.n 80263d2 days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 8026404: 2364 movs r3, #100 ; 0x64 8026406: fbb2 f7f3 udiv r7, r2, r3 802640a: fb03 2317 mls r3, r3, r7, r2 802640e: b29f uxth r7, r3 8026410: f44f 73c8 mov.w r3, #400 ; 0x190 8026414: fbb2 f4f3 udiv r4, r2, r3 8026418: fb03 2414 mls r4, r3, r4, r2 802641c: b2a4 uxth r4, r4 802641e: f1d4 0401 rsbs r4, r4, #1 8026422: bf38 it cc 8026424: 2400 movcc r4, #0 /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { 8026426: 7a06 ldrb r6, [r0, #8] days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 8026428: f8df c058 ldr.w ip, [pc, #88] ; 8026484 802642c: 2300 movs r3, #0 802642e: f002 0203 and.w r2, r2, #3 8026432: f04f 080c mov.w r8, #12 8026436: e00c b.n 8026452 8026438: b922 cbnz r2, 8026444 802643a: 2f00 cmp r7, #0 802643c: bf0c ite eq 802643e: 4625 moveq r5, r4 8026440: 2501 movne r5, #1 8026442: e000 b.n 8026446 8026444: 4625 mov r5, r4 8026446: fb08 3505 mla r5, r8, r5, r3 802644a: 3301 adds r3, #1 802644c: f81c 5005 ldrb.w r5, [ip, r5] 8026450: 1949 adds r1, r1, r5 /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { 8026452: 1c5d adds r5, r3, #1 8026454: b2ad uxth r5, r5 8026456: 42b5 cmp r5, r6 8026458: d3ee bcc.n 8026438 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802645a: 79c3 ldrb r3, [r0, #7] seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 802645c: 7944 ldrb r4, [r0, #5] /* Days in current year */ for (i = 1; i < data->month; i++) { days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802645e: 3b01 subs r3, #1 8026460: 1859 adds r1, r3, r1 seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; 8026462: 7903 ldrb r3, [r0, #4] 8026464: 009a lsls r2, r3, #2 8026466: 019b lsls r3, r3, #6 8026468: 1a9a subs r2, r3, r2 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 802646a: f44f 6361 mov.w r3, #3600 ; 0xe10 802646e: fb03 2304 mla r3, r3, r4, r2 seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; seconds += data->seconds; 8026472: 7802 ldrb r2, [r0, #0] /* seconds = days * 86400; */ return seconds; } 8026474: 4802 ldr r0, [pc, #8] ; (8026480 ) } /* Day starts with 1 */ days += data->date - 1; seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; 8026476: 189b adds r3, r3, r2 seconds += data->seconds; /* seconds = days * 86400; */ return seconds; } 8026478: fb00 3001 mla r0, r0, r1, r3 802647c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8026480: 00015180 .word 0x00015180 8026484: 20000648 .word 0x20000648 08026488 : /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); } void TM_RTC_GetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 8026488: b538 push {r3, r4, r5, lr} 802648a: 4604 mov r4, r0 uint32_t unix; /* Get time */ if (format == TM_RTC_Format_BIN) { 802648c: 460d mov r5, r1 802648e: b909 cbnz r1, 8026494 RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); 8026490: 4608 mov r0, r1 8026492: e000 b.n 8026496 } else { RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); 8026494: 2001 movs r0, #1 8026496: 4911 ldr r1, [pc, #68] ; (80264dc ) 8026498: f7ff fa9e bl 80259d8 } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; 802649c: 4b0f ldr r3, [pc, #60] ; (80264dc ) 802649e: 781a ldrb r2, [r3, #0] 80264a0: 7162 strb r2, [r4, #5] data->minutes = RTC_TimeStruct.RTC_Minutes; 80264a2: 785a ldrb r2, [r3, #1] data->seconds = RTC_TimeStruct.RTC_Seconds; 80264a4: 789b ldrb r3, [r3, #2] RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; data->minutes = RTC_TimeStruct.RTC_Minutes; 80264a6: 7122 strb r2, [r4, #4] data->seconds = RTC_TimeStruct.RTC_Seconds; 80264a8: 7023 strb r3, [r4, #0] /* Get subseconds */ data->subseconds = RTC->SSR; 80264aa: 4b0d ldr r3, [pc, #52] ; (80264e0 ) 80264ac: 6a9b ldr r3, [r3, #40] ; 0x28 80264ae: 8063 strh r3, [r4, #2] /* Get date */ if (format == TM_RTC_Format_BIN) { 80264b0: b90d cbnz r5, 80264b6 RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); 80264b2: 4628 mov r0, r5 80264b4: e000 b.n 80264b8 } else { RTC_GetDate(RTC_Format_BCD, &RTC_DateStruct); 80264b6: 2001 movs r0, #1 80264b8: 490a ldr r1, [pc, #40] ; (80264e4 ) 80264ba: f7ff faf9 bl 8025ab0 } /* Format date */ data->year = RTC_DateStruct.RTC_Year; 80264be: 4b09 ldr r3, [pc, #36] ; (80264e4 ) 80264c0: 78da ldrb r2, [r3, #3] 80264c2: 7262 strb r2, [r4, #9] data->month = RTC_DateStruct.RTC_Month; 80264c4: 785a ldrb r2, [r3, #1] 80264c6: 7222 strb r2, [r4, #8] data->date = RTC_DateStruct.RTC_Date; 80264c8: 789a ldrb r2, [r3, #2] data->day = RTC_DateStruct.RTC_WeekDay; 80264ca: 781b ldrb r3, [r3, #0] } /* Format date */ data->year = RTC_DateStruct.RTC_Year; data->month = RTC_DateStruct.RTC_Month; data->date = RTC_DateStruct.RTC_Date; 80264cc: 71e2 strb r2, [r4, #7] data->day = RTC_DateStruct.RTC_WeekDay; 80264ce: 71a3 strb r3, [r4, #6] /* Calculate unix offset */ unix = TM_RTC_GetUnixTimeStamp(data); 80264d0: 4620 mov r0, r4 80264d2: f7ff ff73 bl 80263bc data->unix = unix; 80264d6: 60e0 str r0, [r4, #12] 80264d8: bd38 pop {r3, r4, r5, pc} 80264da: bf00 nop 80264dc: 2000e5bc .word 0x2000e5bc 80264e0: 40002800 .word 0x40002800 80264e4: 2000e5cc .word 0x2000e5cc 080264e8 : } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80264e8: b5f0 push {r4, r5, r6, r7, lr} uint32_t status; uint8_t stat = 1; TM_RTC_t datatime; /* Enable PWR peripheral clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 80264ea: 2101 movs r1, #1 } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80264ec: b085 sub sp, #20 80264ee: 4605 mov r5, r0 uint32_t status; uint8_t stat = 1; TM_RTC_t datatime; /* Enable PWR peripheral clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 80264f0: f04f 5080 mov.w r0, #268435456 ; 0x10000000 80264f4: f7ff f942 bl 802577c /* Allow access to BKP Domain */ PWR_BackupAccessCmd(ENABLE); 80264f8: 2001 movs r0, #1 80264fa: f7ff f8a7 bl 802564c /* Get RTC status */ status = RTC_ReadBackupRegister(RTC_STATUS_REG); 80264fe: 2013 movs r0, #19 8026500: f7ff fb06 bl 8025b10 if (status == RTC_STATUS_TIME_OK) 8026504: f244 3321 movw r3, #17185 ; 0x4321 8026508: 4298 cmp r0, r3 802650a: 4e25 ldr r6, [pc, #148] ; (80265a0 ) 802650c: d113 bne.n 8026536 { TM_RTC_Status = RTC_STATUS_TIME_OK; 802650e: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8026510: b915 cbnz r5, 8026518 TM_RTC_Config(TM_RTC_ClockSource_Internal); 8026512: 4628 mov r0, r5 8026514: f7ff ff2b bl 802636e /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 8026518: f7ff f9f0 bl 80258fc /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 802651c: f44f 4080 mov.w r0, #16384 ; 0x4000 8026520: f7ff fb1e bl 8025b60 EXTI->PR = 0x00400000; 8026524: 4b1f ldr r3, [pc, #124] ; (80265a4 ) 8026526: f44f 0280 mov.w r2, #4194304 ; 0x400000 802652a: 615a str r2, [r3, #20] /* Get date and time */ TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); 802652c: 4668 mov r0, sp 802652e: 2100 movs r1, #0 8026530: f7ff ffaa bl 8026488 8026534: e02f b.n 8026596 } else if (status == RTC_STATUS_INIT_OK) 8026536: f241 2734 movw r7, #4660 ; 0x1234 802653a: 42b8 cmp r0, r7 802653c: d10f bne.n 802655e { TM_RTC_Status = RTC_STATUS_INIT_OK; 802653e: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8026540: b915 cbnz r5, 8026548 TM_RTC_Config(TM_RTC_ClockSource_Internal); 8026542: 4628 mov r0, r5 8026544: f7ff ff13 bl 802636e /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 8026548: f7ff f9d8 bl 80258fc /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 802654c: f44f 4080 mov.w r0, #16384 ; 0x4000 8026550: f7ff fb06 bl 8025b60 EXTI->PR = 0x00400000; 8026554: 4b13 ldr r3, [pc, #76] ; (80265a4 ) 8026556: f44f 0280 mov.w r2, #4194304 ; 0x400000 802655a: 615a str r2, [r3, #20] 802655c: e01b b.n 8026596 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 802655e: 2400 movs r4, #0 /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8026560: 4628 mov r0, r5 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 8026562: 6034 str r4, [r6, #0] /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8026564: f7ff ff03 bl 802636e datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 8026568: a804 add r0, sp, #16 stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 802656a: 2301 movs r3, #1 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 802656c: f800 4d10 strb.w r4, [r0, #-16]! /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 8026570: 4621 mov r1, r4 8026572: 4668 mov r0, sp stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 8026574: f88d 3007 strb.w r3, [sp, #7] datatime.day = 1; 8026578: f88d 3006 strb.w r3, [sp, #6] datatime.month = 1; 802657c: f88d 3008 strb.w r3, [sp, #8] datatime.year = 0; 8026580: f88d 4009 strb.w r4, [sp, #9] datatime.hours = 0; 8026584: f88d 4005 strb.w r4, [sp, #5] datatime.minutes = 0; 8026588: f88d 4004 strb.w r4, [sp, #4] datatime.seconds = 0; /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 802658c: f7ff fda0 bl 80260d0 /* Initialized OK */ TM_RTC_Status = RTC_STATUS_INIT_OK; 8026590: 6037 str r7, [r6, #0] } /* If first time initialized */ if (stat == RTC_STATUS_ZERO) return 0; 8026592: 4620 mov r0, r4 8026594: e001 b.n 802659a return TM_RTC_Status; 8026596: 4b02 ldr r3, [pc, #8] ; (80265a0 ) 8026598: 6818 ldr r0, [r3, #0] } 802659a: b005 add sp, #20 802659c: bdf0 pop {r4, r5, r6, r7, pc} 802659e: bf00 nop 80265a0: 200019d8 .word 0x200019d8 80265a4: 40013c00 .word 0x40013c00 080265a8 : uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; /* Get seconds from unix */ data->seconds = unix % 60; 80265a8: 233c movs r3, #60 ; 0x3c /* seconds = days * 86400; */ return seconds; } void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) { 80265aa: b5f0 push {r4, r5, r6, r7, lr} uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; /* Get seconds from unix */ data->seconds = unix % 60; 80265ac: fbb1 f4f3 udiv r4, r1, r3 /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80265b0: fbb4 f2f3 udiv r2, r4, r3 void TM_RTC_GetDateTimeFromUnix(TM_RTC_t* data, uint32_t unix) { uint16_t year; /* Store unix time to unix in struct */ data->unix = unix; 80265b4: 60c1 str r1, [r0, #12] /* Get seconds from unix */ data->seconds = unix % 60; 80265b6: fb03 1114 mls r1, r3, r4, r1 80265ba: 7001 strb r1, [r0, #0] /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80265bc: fb03 4312 mls r3, r3, r2, r4 /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 80265c0: 2118 movs r1, #24 /* Get seconds from unix */ data->seconds = unix % 60; /* Go to minutes */ unix /= 60; /* Get minutes */ data->minutes = unix % 60; 80265c2: 7103 strb r3, [r0, #4] /* Go to hours */ unix /= 60; /* Get hours */ data->hours = unix % 24; 80265c4: fbb2 f3f1 udiv r3, r2, r1 80265c8: fb01 2213 mls r2, r1, r3, r2 80265cc: 7142 strb r2, [r0, #5] /* Go to days */ unix /= 24; /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; 80265ce: 1cd9 adds r1, r3, #3 80265d0: 2207 movs r2, #7 80265d2: fbb1 f4f2 udiv r4, r1, r2 80265d6: fb02 1214 mls r2, r2, r4, r1 80265da: 3201 adds r2, #1 80265dc: 7182 strb r2, [r0, #6] /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 80265de: f240 156d movw r5, #365 ; 0x16d /* Get week day */ /* Monday is day one */ data->day = (unix + 3) % 7 + 1; /* Get year */ year = 1970; 80265e2: f240 72b2 movw r2, #1970 ; 0x7b2 while (1) { if (TM_RTC_LEAP_YEAR(year)) { 80265e6: f44f 71c8 mov.w r1, #400 ; 0x190 80265ea: 2464 movs r4, #100 ; 0x64 80265ec: f012 0603 ands.w r6, r2, #3 80265f0: d105 bne.n 80265fe 80265f2: fbb2 f7f4 udiv r7, r2, r4 80265f6: fb04 2717 mls r7, r4, r7, r2 80265fa: b2bf uxth r7, r7 80265fc: b92f cbnz r7, 802660a 80265fe: fbb2 f7f1 udiv r7, r2, r1 8026602: fb01 2717 mls r7, r1, r7, r2 8026606: b2bf uxth r7, r7 8026608: b927 cbnz r7, 8026614 if (unix >= 366) { 802660a: 42ab cmp r3, r5 802660c: d90b bls.n 8026626 unix -= 366; 802660e: f5a3 73b7 sub.w r3, r3, #366 ; 0x16e /* Get year */ year = 1970; while (1) { if (TM_RTC_LEAP_YEAR(year)) { if (unix >= 366) { 8026612: e005 b.n 8026620 unix -= 366; } else { break; } } else if (unix >= 365) { 8026614: f5b3 7fb6 cmp.w r3, #364 ; 0x16c 8026618: d905 bls.n 8026626 unix -= 365; 802661a: f46f 76b6 mvn.w r6, #364 ; 0x16c 802661e: 199b adds r3, r3, r6 } else { break; } year++; 8026620: 3201 adds r2, #1 8026622: b292 uxth r2, r2 } 8026624: e7e2 b.n 80265ec /* Get year in xx format */ data->year = (uint8_t) (year - 2000); 8026626: f102 0130 add.w r1, r2, #48 ; 0x30 802662a: 7241 strb r1, [r0, #9] /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 802662c: 2100 movs r1, #0 802662e: 7201 strb r1, [r0, #8] if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 8026630: 2164 movs r1, #100 ; 0x64 8026632: fbb2 f7f1 udiv r7, r2, r1 8026636: fb01 2117 mls r1, r1, r7, r2 802663a: b28f uxth r7, r1 802663c: f44f 71c8 mov.w r1, #400 ; 0x190 8026640: fbb2 f4f1 udiv r4, r2, r1 8026644: fb01 2214 mls r2, r1, r4, r2 8026648: b292 uxth r2, r2 unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 802664a: 4c0c ldr r4, [pc, #48] ; (802667c ) year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 802664c: e012 b.n 8026674 if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { 802664e: b906 cbnz r6, 8026652 8026650: b907 cbnz r7, 8026654 8026652: b922 cbnz r2, 802665e 8026654: 1865 adds r5, r4, r1 8026656: 7b2d ldrb r5, [r5, #12] 8026658: 42ab cmp r3, r5 802665a: d300 bcc.n 802665e 802665c: e007 b.n 802666e unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { 802665e: 5c65 ldrb r5, [r4, r1] 8026660: 42ab cmp r3, r5 8026662: d204 bcs.n 802666e break; } } /* Get month */ /* Month starts with 1 */ data->month++; 8026664: 3101 adds r1, #1 /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 8026666: 3301 adds r3, #1 break; } } /* Get month */ /* Month starts with 1 */ data->month++; 8026668: 7201 strb r1, [r0, #8] /* Get date */ /* Date starts with 1 */ data->date = unix + 1; 802666a: 71c3 strb r3, [r0, #7] 802666c: bdf0 pop {r4, r5, r6, r7, pc} year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 802666e: 3101 adds r1, #1 if (TM_RTC_LEAP_YEAR(year) && unix >= (uint32_t)TM_RTC_Months[1][data->month]) { unix -= TM_RTC_Months[1][data->month]; } else if (unix >= (uint32_t)TM_RTC_Months[0][data->month]) { unix -= TM_RTC_Months[0][data->month]; 8026670: 1b5b subs r3, r3, r5 year++; } /* Get year in xx format */ data->year = (uint8_t) (year - 2000); /* Get month */ for (data->month = 0; data->month < 12; data->month++) { 8026672: 7201 strb r1, [r0, #8] 8026674: 7a01 ldrb r1, [r0, #8] 8026676: 290b cmp r1, #11 8026678: d9e9 bls.n 802664e 802667a: e7f3 b.n 8026664 802667c: 20000648 .word 0x20000648 08026680 : * @brief Кореектировака времени. * @param Часовой пояс * @retval */ void TM_RTC_Correction(float utc) { 8026680: b510 push {r4, lr} 8026682: b088 sub sp, #32 8026684: 4604 mov r4, r0 TM_RTC_t newData; int utcSec; uint32_t unixTime; /* Получаем текущее время */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8026686: 2100 movs r1, #0 8026688: 4668 mov r0, sp 802668a: f7ff fefd bl 8026488 /* Рассчитываем поправку */ utcSec = (int)(3600.0*utc); 802668e: 4620 mov r0, r4 8026690: f7f9 ff42 bl 8020518 <__aeabi_f2d> 8026694: a308 add r3, pc, #32 ; (adr r3, 80266b8 ) 8026696: e9d3 2300 ldrd r2, r3, [r3] 802669a: f7f9 ff91 bl 80205c0 <__aeabi_dmul> 802669e: f7fa fa29 bl 8020af4 <__aeabi_d2iz> unixTime = data.unix + utcSec; 80266a2: 9903 ldr r1, [sp, #12] 80266a4: 1841 adds r1, r0, r1 /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); 80266a6: a804 add r0, sp, #16 80266a8: f7ff ff7e bl 80265a8 TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); 80266ac: a804 add r0, sp, #16 80266ae: 2100 movs r1, #0 80266b0: f7ff fd0e bl 80260d0 } 80266b4: b008 add sp, #32 80266b6: bd10 pop {r4, pc} 80266b8: 00000000 .word 0x00000000 80266bc: 40ac2000 .word 0x40ac2000 080266c0 : return TM_RTC_Status; } void TM_RTC_SetDataTimeUnix(uint32_t unixTime) { 80266c0: b51f push {r0, r1, r2, r3, r4, lr} 80266c2: 4601 mov r1, r0 TM_RTC_t data; TM_RTC_GetDateTimeFromUnix(&data, unixTime); 80266c4: 4668 mov r0, sp 80266c6: f7ff ff6f bl 80265a8 TM_RTC_SetDateTime(&data, TM_RTC_Format_BIN); 80266ca: 4668 mov r0, sp 80266cc: 2100 movs r1, #0 80266ce: f7ff fcff bl 80260d0 } 80266d2: b005 add sp, #20 80266d4: bd00 pop {pc} 080266d6 : /* Read data from backup register */ return *(uint32_t *)((&RTC->BKP0R) + 4 * location); } /* Callbacks */ __weak void TM_RTC_RequestHandler(void) { 80266d6: 4770 bx lr 080266d8 : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmAHandler(void) { 80266d8: 4770 bx lr 080266da : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmBHandler(void) { 80266da: 4770 bx lr 080266dc : /* If user needs this function, then they should be defined separatelly in your project */ } /* Private RTC IRQ handlers */ void RTC_WKUP_IRQHandler(void) { 80266dc: b508 push {r3, lr} /* Check for RTC interrupt */ if (RTC_GetITStatus(RTC_IT_WUT) != RESET) { 80266de: f44f 4080 mov.w r0, #16384 ; 0x4000 80266e2: f7ff fa25 bl 8025b30 80266e6: b128 cbz r0, 80266f4 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 80266e8: f44f 4080 mov.w r0, #16384 ; 0x4000 80266ec: f7ff fa38 bl 8025b60 /* Call user function */ TM_RTC_RequestHandler(); 80266f0: f7ff fff1 bl 80266d6 } /* Clear EXTI line 22 bit */ EXTI->PR = 0x00400000; 80266f4: 4b02 ldr r3, [pc, #8] ; (8026700 ) 80266f6: f44f 0280 mov.w r2, #4194304 ; 0x400000 80266fa: 615a str r2, [r3, #20] 80266fc: bd08 pop {r3, pc} 80266fe: bf00 nop 8026700: 40013c00 .word 0x40013c00 08026704 : } void RTC_Alarm_IRQHandler(void) { 8026704: b508 push {r3, lr} /* RTC Alarm A check */ if (RTC_GetITStatus(RTC_IT_ALRA) != RESET) { 8026706: f44f 5080 mov.w r0, #4096 ; 0x1000 802670a: f7ff fa11 bl 8025b30 802670e: b128 cbz r0, 802671c /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRA); 8026710: f44f 5080 mov.w r0, #4096 ; 0x1000 8026714: f7ff fa24 bl 8025b60 /* Call user function for Alarm A */ TM_RTC_AlarmAHandler(); 8026718: f7ff ffde bl 80266d8 } /* RTC Alarm B check */ if (RTC_GetITStatus(RTC_IT_ALRB) != RESET) { 802671c: f44f 5000 mov.w r0, #8192 ; 0x2000 8026720: f7ff fa06 bl 8025b30 8026724: b128 cbz r0, 8026732 /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRB); 8026726: f44f 5000 mov.w r0, #8192 ; 0x2000 802672a: f7ff fa19 bl 8025b60 /* Call user function for Alarm B */ TM_RTC_AlarmBHandler(); 802672e: f7ff ffd4 bl 80266da } /* Clear EXTI line 17 bit */ EXTI->PR = 0x00020000; 8026732: 4b02 ldr r3, [pc, #8] ; (802673c ) 8026734: f44f 3200 mov.w r2, #131072 ; 0x20000 8026738: 615a str r2, [r3, #20] 802673a: bd08 pop {r3, pc} 802673c: 40013c00 .word 0x40013c00 08026740 : /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 8026740: b530 push {r4, r5, lr} uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026742: 2200 movs r2, #0 /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 8026744: b085 sub sp, #20 TM_RTC_t tmp; uint32_t unixTime; uint8_t i = 0; 8026746: 4613 mov r3, r2 /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026748: 250a movs r5, #10 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802674a: e006 b.n 802675a tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802674c: fb05 1202 mla r2, r5, r2, r1 8026750: 3a30 subs r2, #48 ; 0x30 i++; 8026752: 3301 adds r3, #1 uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026754: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8026758: b2db uxtb r3, r3 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802675a: 5cc1 ldrb r1, [r0, r3] 802675c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026760: 2c09 cmp r4, #9 8026762: d9f3 bls.n 802674c tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 8026764: 3301 adds r3, #1 8026766: f88d 2007 strb.w r2, [sp, #7] 802676a: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802676c: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802676e: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026770: e006 b.n 8026780 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026772: fb05 1202 mla r2, r5, r2, r1 8026776: 3a30 subs r2, #48 ; 0x30 i++; 8026778: 3301 adds r3, #1 i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802677a: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802677e: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026780: 5cc1 ldrb r1, [r0, r3] 8026782: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8026786: 2c09 cmp r4, #9 8026788: d9f3 bls.n 8026772 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } //i++; i+=3; 802678a: 3303 adds r3, #3 802678c: f88d 2008 strb.w r2, [sp, #8] 8026790: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026792: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026794: 250a movs r5, #10 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8026796: e006 b.n 80267a6 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8026798: fb05 1202 mla r2, r5, r2, r1 802679c: 3a30 subs r2, #48 ; 0x30 i++; 802679e: 3301 adds r3, #1 i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267a0: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80267a4: b2db uxtb r3, r3 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267a6: 5cc1 ldrb r1, [r0, r3] 80267a8: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80267ac: 2c09 cmp r4, #9 80267ae: d9f3 bls.n 8026798 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; i++; 80267b0: 3302 adds r3, #2 80267b2: f88d 2009 strb.w r2, [sp, #9] 80267b6: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267b8: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267ba: 250a movs r5, #10 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267bc: e006 b.n 80267cc tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267be: fb05 1202 mla r2, r5, r2, r1 80267c2: 3a30 subs r2, #48 ; 0x30 i++; 80267c4: 3301 adds r3, #1 i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267c6: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80267ca: b2db uxtb r3, r3 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267cc: 5cc1 ldrb r1, [r0, r3] 80267ce: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80267d2: 2c09 cmp r4, #9 80267d4: d9f3 bls.n 80267be tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80267d6: 3301 adds r3, #1 80267d8: f88d 2005 strb.w r2, [sp, #5] 80267dc: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267de: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267e0: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267e2: e006 b.n 80267f2 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267e4: fb05 1202 mla r2, r5, r2, r1 80267e8: 3a30 subs r2, #48 ; 0x30 i++; 80267ea: 3301 adds r3, #1 i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80267ec: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80267f0: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80267f2: 5cc1 ldrb r1, [r0, r3] 80267f4: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80267f8: 2c09 cmp r4, #9 80267fa: d9f3 bls.n 80267e4 i++; } i++; /* Get seconds */ tmp.seconds = 0; 80267fc: 2300 movs r3, #0 80267fe: f88d 3000 strb.w r3, [sp] /* Устанавливаем +1 для профилактики */ tmp.year += 1; 8026802: f89d 3009 ldrb.w r3, [sp, #9] 8026806: f88d 2004 strb.w r2, [sp, #4] 802680a: 3301 adds r3, #1 unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 802680c: 4668 mov r0, sp /* Get seconds */ tmp.seconds = 0; /* Устанавливаем +1 для профилактики */ tmp.year += 1; 802680e: f88d 3009 strb.w r3, [sp, #9] unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 8026812: f7ff fdd3 bl 80263bc if (location > 18) { return; } /* Write data to backup register */ *(uint32_t *)((&RTC->BKP0R) + 4 * location) = value; 8026816: 4b02 ldr r3, [pc, #8] ; (8026820 ) 8026818: 6018 str r0, [r3, #0] /* Устанавливаем +1 для профилактики */ tmp.year += 1; unixTime = TM_RTC_GetUnixTimeStamp(&tmp); TM_RTC_WriteBackupRegister(RTC_BKP_DR0, unixTime); 802681a: b005 add sp, #20 802681c: bd30 pop {r4, r5, pc} 802681e: bf00 nop 8026820: 40002850 .word 0x40002850 08026824 : //static TN_MUTEX spi_mutex; static uint8_t spi_tx_rx(uint8_t byte) { while (!(SPI2->SR & SPI_SR_TXE)) {} 8026824: 4907 ldr r1, [pc, #28] ; (8026844 ) 8026826: 890a ldrh r2, [r1, #8] 8026828: 4b06 ldr r3, [pc, #24] ; (8026844 ) 802682a: f002 0202 and.w r2, r2, #2 802682e: b292 uxth r2, r2 8026830: 2a00 cmp r2, #0 8026832: d0f8 beq.n 8026826 SPI2->DR = byte; 8026834: 8198 strh r0, [r3, #12] while (!(SPI2->SR & SPI_SR_RXNE)) {} 8026836: 891a ldrh r2, [r3, #8] 8026838: 07d2 lsls r2, r2, #31 802683a: d5fc bpl.n 8026836 return SPI2->DR; 802683c: 4b01 ldr r3, [pc, #4] ; (8026844 ) 802683e: 8998 ldrh r0, [r3, #12] } 8026840: b2c0 uxtb r0, r0 8026842: 4770 bx lr 8026844: 40003800 .word 0x40003800 08026848 : status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); } static inline void send_addr(int addr) { 8026848: b510 push {r4, lr} 802684a: 4604 mov r4, r0 spi_tx_rx((addr >> 16) & 0xFF); 802684c: f3c0 4007 ubfx r0, r0, #16, #8 8026850: f7ff ffe8 bl 8026824 spi_tx_rx((addr >> 8) & 0xFF); 8026854: f3c4 2007 ubfx r0, r4, #8, #8 8026858: f7ff ffe4 bl 8026824 spi_tx_rx(addr & 0xFF); 802685c: b2e0 uxtb r0, r4 } 802685e: e8bd 4010 ldmia.w sp!, {r4, lr} } static inline void send_addr(int addr) { spi_tx_rx((addr >> 16) & 0xFF); spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); 8026862: f7ff bfdf b.w 8026824 08026866 : spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 8026866: 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) { 8026868: b508 push {r3, lr} uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 802686a: 2100 movs r1, #0 802686c: f7ff fb60 bl 8025f30 spi_tx_rx(CMD_RDSR); 8026870: 2005 movs r0, #5 8026872: f7ff ffd7 bl 8026824 do { status = spi_tx_rx(0); 8026876: 2000 movs r0, #0 8026878: f7ff ffd4 bl 8026824 } while (!(status & SR_WEL)); 802687c: f000 0002 and.w r0, r0, #2 8026880: b2c0 uxtb r0, r0 8026882: 2800 cmp r0, #0 8026884: d0f7 beq.n 8026876 // spi_cs_up(); SPI_FLASH_CS_H(); 8026886: 2005 movs r0, #5 8026888: 2101 movs r1, #1 } 802688a: 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(); 802688e: f7ff bb4f b.w 8025f30 08026892 : } static inline void wait_write_end(void) { uint8_t status; SPI_FLASH_CS_L(); 8026892: 2005 movs r0, #5 } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); } static inline void wait_write_end(void) { 8026894: b508 push {r3, lr} uint8_t status; SPI_FLASH_CS_L(); 8026896: 2100 movs r1, #0 8026898: f7ff fb4a bl 8025f30 spi_tx_rx(CMD_RDSR); 802689c: 2005 movs r0, #5 802689e: f7ff ffc1 bl 8026824 do { status = spi_tx_rx(0); 80268a2: 2000 movs r0, #0 80268a4: f7ff ffbe bl 8026824 } while (status & SR_WIP); 80268a8: 07c1 lsls r1, r0, #31 80268aa: d4fa bmi.n 80268a2 SPI_FLASH_CS_H(); 80268ac: 2005 movs r0, #5 80268ae: 2101 movs r1, #1 } 80268b0: 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(); 80268b4: f7ff bb3c b.w 8025f30 080268b8 : *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 80268b8: b570 push {r4, r5, r6, lr} 80268ba: 4605 mov r5, r0 80268bc: 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(); 80268be: 2005 movs r0, #5 80268c0: 2100 movs r1, #0 *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 80268c2: 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(); 80268c4: f7ff fb34 bl 8025f30 spi_tx_rx(CMD_READ); 80268c8: 2003 movs r0, #3 80268ca: f7ff ffab bl 8026824 send_addr(addr); 80268ce: 4628 mov r0, r5 80268d0: f7ff ffba bl 8026848 *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 80268d4: 19a6 adds r6, r4, r6 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 80268d6: e004 b.n 80268e2 *((uint8_t *)buf++) = spi_tx_rx(0); 80268d8: 2000 movs r0, #0 80268da: f7ff ffa3 bl 8026824 80268de: f804 0b01 strb.w r0, [r4], #1 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 80268e2: 42b4 cmp r4, r6 80268e4: d1f8 bne.n 80268d8 *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 80268e6: 2005 movs r0, #5 80268e8: 2101 movs r1, #1 80268ea: f7ff fb21 bl 8025f30 // tn_mutex_unlock(&spi_mutex); return len; } 80268ee: f04f 30ff mov.w r0, #4294967295 80268f2: bd70 pop {r4, r5, r6, pc} 080268f4 : // 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) 80268f4: 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) { 80268f6: b570 push {r4, r5, r6, lr} 80268f8: 4615 mov r5, r2 // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; // don't allow page wrapping ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) 80268fa: 18d2 adds r2, r2, r3 80268fc: 2aff cmp r2, #255 ; 0xff len = 0x100 - (addr & 0xFF); 80268fe: bf88 it hi 8026900: f5c3 7580 rsbhi r5, r3, #256 ; 0x100 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8026904: 4604 mov r4, r0 8026906: 460e mov r6, r1 ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) len = 0x100 - (addr & 0xFF); ret = len; SPI_FLASH_CS_L(); 8026908: 2005 movs r0, #5 802690a: 2100 movs r1, #0 802690c: f7ff fb10 bl 8025f30 spi_tx_rx(CMD_WREN); 8026910: 2006 movs r0, #6 8026912: f7ff ff87 bl 8026824 SPI_FLASH_CS_H(); 8026916: 2005 movs r0, #5 8026918: 2101 movs r1, #1 802691a: f7ff fb09 bl 8025f30 wait_write_enable(); 802691e: f7ff ffa2 bl 8026866 SPI_FLASH_CS_L(); 8026922: 2100 movs r1, #0 8026924: 2005 movs r0, #5 8026926: f7ff fb03 bl 8025f30 spi_tx_rx(CMD_PP); 802692a: 2002 movs r0, #2 802692c: f7ff ff7a bl 8026824 send_addr(addr); 8026930: 4620 mov r0, r4 8026932: f7ff ff89 bl 8026848 while (len--) 8026936: 2400 movs r4, #0 8026938: e003 b.n 8026942 spi_tx_rx(*((uint8_t *)buf++)); 802693a: 5d30 ldrb r0, [r6, r4] 802693c: f7ff ff72 bl 8026824 8026940: 3401 adds r4, #1 wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 8026942: 42ac cmp r4, r5 8026944: d1f9 bne.n 802693a spi_tx_rx(*((uint8_t *)buf++)); SPI_FLASH_CS_H(); 8026946: 2005 movs r0, #5 8026948: 2101 movs r1, #1 802694a: f7ff faf1 bl 8025f30 wait_write_end(); 802694e: f7ff ffa0 bl 8026892 // tn_mutex_unlock(&spi_mutex); return ret; } 8026952: b2a0 uxth r0, r4 8026954: bd70 pop {r4, r5, r6, pc} 08026956 : ssize_t spi_flash_write(int addr, const void *buf, size_t len, uint32_t timeout) { 8026956: b5f8 push {r3, r4, r5, r6, r7, lr} 8026958: 4607 mov r7, r0 802695a: 460e mov r6, r1 802695c: 4615 mov r5, r2 int ret = 0, offset = 0; 802695e: 2400 movs r4, #0 do { ret = spi_flash_pp(addr + offset, buf + offset, len - offset, 0); 8026960: 1938 adds r0, r7, r4 8026962: 1931 adds r1, r6, r4 8026964: 1b2a subs r2, r5, r4 8026966: 2300 movs r3, #0 8026968: f7ff ffc4 bl 80268f4 offset += ret; 802696c: 1824 adds r4, r4, r0 } while (len - offset); 802696e: 42a5 cmp r5, r4 8026970: d1f6 bne.n 8026960 return 0; } 8026972: 2000 movs r0, #0 8026974: bdf8 pop {r3, r4, r5, r6, r7, pc} 08026976 : wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 8026976: 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(); 8026978: 2100 movs r1, #0 wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 802697a: 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(); 802697c: 2005 movs r0, #5 802697e: f7ff fad7 bl 8025f30 spi_tx_rx(CMD_WREN); 8026982: 2006 movs r0, #6 8026984: f7ff ff4e bl 8026824 SPI_FLASH_CS_H(); 8026988: 2005 movs r0, #5 802698a: 2101 movs r1, #1 802698c: f7ff fad0 bl 8025f30 wait_write_enable(); 8026990: f7ff ff69 bl 8026866 SPI_FLASH_CS_L(); 8026994: 2100 movs r1, #0 8026996: 2005 movs r0, #5 8026998: f7ff faca bl 8025f30 spi_tx_rx(CMD_SE); 802699c: 2020 movs r0, #32 802699e: f7ff ff41 bl 8026824 send_addr(addr); 80269a2: 4620 mov r0, r4 80269a4: f7ff ff50 bl 8026848 SPI_FLASH_CS_H(); 80269a8: 2005 movs r0, #5 80269aa: 2101 movs r1, #1 80269ac: f7ff fac0 bl 8025f30 wait_write_end(); 80269b0: f7ff ff6f bl 8026892 // tn_mutex_unlock(&spi_mutex); return 0; } 80269b4: 2000 movs r0, #0 80269b6: bd10 pop {r4, pc} 080269b8 : bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 80269b8: 4b28 ldr r3, [pc, #160] ; (8026a5c ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { 80269ba: b513 push {r0, r1, r4, lr} uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 80269bc: 2400 movs r4, #0 80269be: 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; 80269c0: 4b27 ldr r3, [pc, #156] ; (8026a60 ) 80269c2: 6c1a ldr r2, [r3, #64] ; 0x40 80269c4: f442 4280 orr.w r2, r2, #16384 ; 0x4000 80269c8: 641a str r2, [r3, #64] ; 0x40 RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; 80269ca: 6a1a ldr r2, [r3, #32] 80269cc: f442 4200 orr.w r2, r2, #32768 ; 0x8000 80269d0: 621a str r2, [r3, #32] RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; 80269d2: 6a1a ldr r2, [r3, #32] 80269d4: f422 4200 bic.w r2, r2, #32768 ; 0x8000 80269d8: 621a str r2, [r3, #32] SPI2->CR1 &= ~SPI_CR1_SPE; 80269da: f5a3 3300 sub.w r3, r3, #131072 ; 0x20000 spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); 80269de: 4621 mov r1, r4 RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; SPI2->CR1 &= ~SPI_CR1_SPE; 80269e0: 881a ldrh r2, [r3, #0] 80269e2: f022 0240 bic.w r2, r2, #64 ; 0x40 80269e6: 0412 lsls r2, r2, #16 80269e8: 0c12 lsrs r2, r2, #16 80269ea: 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; 80269ec: f44f 7241 mov.w r2, #772 ; 0x304 80269f0: 801a strh r2, [r3, #0] SPI2->CR2 = 0;//SPI_CR2_SSOE; 80269f2: 809c strh r4, [r3, #4] SPI2->CR1 |= SPI_CR1_SPE; 80269f4: 881a ldrh r2, [r3, #0] 80269f6: b292 uxth r2, r2 80269f8: f042 0240 orr.w r2, r2, #64 ; 0x40 80269fc: 801a strh r2, [r3, #0] spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); 80269fe: 2005 movs r0, #5 8026a00: f7ff fa96 bl 8025f30 spi_tx_rx(CMD_RDSFDP); 8026a04: 205a movs r0, #90 ; 0x5a 8026a06: f7ff ff0d bl 8026824 send_addr(addr); 8026a0a: 4620 mov r0, r4 8026a0c: f7ff ff1c bl 8026848 spi_tx_rx(0); 8026a10: 4620 mov r0, r4 8026a12: f7ff ff07 bl 8026824 while (len--) *((uint8_t *)buf++) = spi_tx_rx(0); 8026a16: 2000 movs r0, #0 8026a18: f7ff ff04 bl 8026824 8026a1c: ab01 add r3, sp, #4 8026a1e: 5518 strb r0, [r3, r4] 8026a20: 3401 adds r4, #1 static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 8026a22: 2c04 cmp r4, #4 8026a24: d1f7 bne.n 8026a16 *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 8026a26: 2005 movs r0, #5 8026a28: 2101 movs r1, #1 8026a2a: f7ff fa81 bl 8025f30 spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 8026a2e: f89d 3004 ldrb.w r3, [sp, #4] 8026a32: 2b53 cmp r3, #83 ; 0x53 8026a34: d110 bne.n 8026a58 8026a36: f89d 3005 ldrb.w r3, [sp, #5] 8026a3a: 2b46 cmp r3, #70 ; 0x46 8026a3c: d10c bne.n 8026a58 8026a3e: f89d 3006 ldrb.w r3, [sp, #6] 8026a42: 2b44 cmp r3, #68 ; 0x44 8026a44: d108 bne.n 8026a58 8026a46: f89d 0007 ldrb.w r0, [sp, #7] 8026a4a: f1b0 0c50 subs.w ip, r0, #80 ; 0x50 8026a4e: f1dc 0000 rsbs r0, ip, #0 8026a52: eb50 000c adcs.w r0, r0, ip 8026a56: e000 b.n 8026a5a tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; 8026a58: 2000 movs r0, #0 if (!spi_flash_desc.sector_size) return; spi_flash_desc.present = true; */ } 8026a5a: bd1c pop {r2, r3, r4, pc} 8026a5c: 2000e5ec .word 0x2000e5ec 8026a60: 40023800 .word 0x40023800 08026a64 : #define bufsize2 (countof(txbuf2)-1) uint8_t rxbuf1[bufsize1] = {0}; uint8_t rxbuf2[bufsize2] = {0}; void spi_flash_test(void) { 8026a64: b510 push {r4, lr} if (!spi_flash_init()) 8026a66: f7ff ffa7 bl 80269b8 8026a6a: 2800 cmp r0, #0 8026a6c: d04a beq.n 8026b04 return; int ret = 0, addr = 0, offset = 0; spi_flash_read(0, rxbuf1, bufsize1, 0); 8026a6e: 2000 movs r0, #0 8026a70: f640 62f9 movw r2, #3833 ; 0xef9 8026a74: 4603 mov r3, r0 8026a76: 4924 ldr r1, [pc, #144] ; (8026b08 ) 8026a78: f7ff ff1e bl 80268b8 spi_flash_erase_sector(0,0); 8026a7c: 2000 movs r0, #0 8026a7e: 4601 mov r1, r0 8026a80: f7ff ff79 bl 8026976 spi_flash_read(0, rxbuf1, bufsize1, 0); 8026a84: 2000 movs r0, #0 8026a86: 4920 ldr r1, [pc, #128] ; (8026b08 ) 8026a88: f640 62f9 movw r2, #3833 ; 0xef9 8026a8c: 4603 mov r3, r0 8026a8e: f7ff ff13 bl 80268b8 spi_flash_write(addr, txbuf1, bufsize1, 0); 8026a92: 2000 movs r0, #0 8026a94: 4603 mov r3, r0 8026a96: 491d ldr r1, [pc, #116] ; (8026b0c ) 8026a98: f640 62f9 movw r2, #3833 ; 0xef9 8026a9c: f7ff ff5b bl 8026956 memset(rxbuf1, 0, bufsize1); 8026aa0: 2100 movs r1, #0 8026aa2: f640 62f9 movw r2, #3833 ; 0xef9 8026aa6: 4818 ldr r0, [pc, #96] ; (8026b08 ) 8026aa8: f7fb f80a bl 8021ac0 spi_flash_read(0, rxbuf1, bufsize1, 0); 8026aac: 2000 movs r0, #0 8026aae: 4916 ldr r1, [pc, #88] ; (8026b08 ) 8026ab0: f640 62f9 movw r2, #3833 ; 0xef9 8026ab4: 4603 mov r3, r0 8026ab6: f7ff feff bl 80268b8 if (memcmp(txbuf1, rxbuf1, bufsize1) != 0) 8026aba: 4814 ldr r0, [pc, #80] ; (8026b0c ) 8026abc: 4912 ldr r1, [pc, #72] ; (8026b08 ) 8026abe: f640 62f9 movw r2, #3833 ; 0xef9 8026ac2: f7fa ff11 bl 80218e8 8026ac6: 4604 mov r4, r0 8026ac8: b9e0 cbnz r0, 8026b04 return; spi_flash_erase_sector(0,0); 8026aca: 4601 mov r1, r0 8026acc: f7ff ff53 bl 8026976 spi_flash_read(0, rxbuf1, bufsize1, 0); 8026ad0: 4623 mov r3, r4 8026ad2: 4620 mov r0, r4 8026ad4: 490c ldr r1, [pc, #48] ; (8026b08 ) 8026ad6: f640 62f9 movw r2, #3833 ; 0xef9 8026ada: f7ff feed bl 80268b8 spi_flash_write(0, txbuf2, bufsize2, 0); 8026ade: 4623 mov r3, r4 8026ae0: 224e movs r2, #78 ; 0x4e 8026ae2: 4620 mov r0, r4 8026ae4: 490a ldr r1, [pc, #40] ; (8026b10 ) 8026ae6: f7ff ff36 bl 8026956 memset(rxbuf2, 0, bufsize2); 8026aea: 4621 mov r1, r4 8026aec: 224e movs r2, #78 ; 0x4e 8026aee: 4809 ldr r0, [pc, #36] ; (8026b14 ) 8026af0: f7fa ffe6 bl 8021ac0 spi_flash_read(0, rxbuf2, bufsize2, 0); 8026af4: 4907 ldr r1, [pc, #28] ; (8026b14 ) 8026af6: 4620 mov r0, r4 8026af8: 224e movs r2, #78 ; 0x4e 8026afa: 4623 mov r3, r4 spi_flash_desc.sector_size, spi_flash_desc.sector_size * spi_flash_desc.sector_count); return 0; */ } 8026afc: e8bd 4010 ldmia.w sp!, {r4, lr} spi_flash_read(0, rxbuf1, bufsize1, 0); spi_flash_write(0, txbuf2, bufsize2, 0); memset(rxbuf2, 0, bufsize2); spi_flash_read(0, rxbuf2, bufsize2, 0); 8026b00: f7ff beda b.w 80268b8 8026b04: bd10 pop {r4, pc} 8026b06: bf00 nop 8026b08: 200019dc .word 0x200019dc 8026b0c: 200006af .word 0x200006af 8026b10: 20000660 .word 0x20000660 8026b14: 200028d5 .word 0x200028d5 08026b18 : \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 */ 8026b18: f000 0007 and.w r0, r0, #7 uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8026b1c: f1c0 0307 rsb r3, r0, #7 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026b20: 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; 8026b22: 2b04 cmp r3, #4 8026b24: bf28 it cs 8026b26: 2304 movcs r3, #4 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8026b28: 2a06 cmp r2, #6 8026b2a: d901 bls.n 8026b30 8026b2c: 3803 subs r0, #3 8026b2e: e000 b.n 8026b32 8026b30: 2000 movs r0, #0 return ( ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) | 8026b32: 2201 movs r2, #1 8026b34: fa02 f303 lsl.w r3, r2, r3 8026b38: 3b01 subs r3, #1 8026b3a: f003 0305 and.w r3, r3, #5 ((SubPriority & ((1 << (SubPriorityBits )) - 1))) ); } 8026b3e: fa03 f000 lsl.w r0, r3, r0 8026b42: 4770 bx lr 08026b44 : 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) { 8026b44: 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; 8026b46: 4d34 ldr r5, [pc, #208] ; (8026c18 ) 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) { 8026b48: 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; 8026b4c: 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) 8026b4e: 2a09 cmp r2, #9 8026b50: bf0c ite eq 8026b52: f44f 5280 moveq.w r2, #4096 ; 0x1000 8026b56: 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; 8026b58: 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; 8026b5a: 80ee strh r6, [r5, #6] USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026b5c: 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) { 8026b5e: 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; 8026b60: 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; 8026b62: 6029 str r1, [r5, #0] USART_InitStructure.USART_WordLength = wordlen_tmp; 8026b64: 80aa strh r2, [r5, #4] USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8026b66: 81ae strh r6, [r5, #12] USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_DeInit(uart); 8026b68: f7ff f812 bl 8025b90 if (uart == USART1) { 8026b6c: 4b2b ldr r3, [pc, #172] ; (8026c1c ) 8026b6e: 429c cmp r4, r3 8026b70: d111 bne.n 8026b96 RCC->APB2ENR |= RCC_APB2Periph_USART1; 8026b72: f503 3394 add.w r3, r3, #75776 ; 0x12800 8026b76: 6c5a ldr r2, [r3, #68] ; 0x44 8026b78: f042 0210 orr.w r2, r2, #16 8026b7c: 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 */ 8026b7e: 4b28 ldr r3, [pc, #160] ; (8026c20 ) 8026b80: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART1_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026b82: f3c0 2002 ubfx r0, r0, #8, #3 8026b86: f7ff ffc7 bl 8026b18 __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 */ 8026b8a: 4b26 ldr r3, [pc, #152] ; (8026c24 ) 8026b8c: 0100 lsls r0, r0, #4 8026b8e: 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 */ 8026b92: 2220 movs r2, #32 8026b94: e028 b.n 8026be8 USART_Cmd(USART1, ENABLE); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); USART_ITConfig(USART1, USART_IT_TXE, DISABLE); } if (uart == USART2) { 8026b96: 4b24 ldr r3, [pc, #144] ; (8026c28 ) 8026b98: 429c cmp r4, r3 8026b9a: d111 bne.n 8026bc0 RCC->APB1ENR |= RCC_APB1Periph_USART2; 8026b9c: f503 33fa add.w r3, r3, #128000 ; 0x1f400 8026ba0: 6c1a ldr r2, [r3, #64] ; 0x40 8026ba2: f442 3200 orr.w r2, r2, #131072 ; 0x20000 8026ba6: 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 */ 8026ba8: 4b1d ldr r3, [pc, #116] ; (8026c20 ) 8026baa: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART2_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026bac: f3c0 2002 ubfx r0, r0, #8, #3 8026bb0: f7ff ffb2 bl 8026b18 __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 */ 8026bb4: 4b1b ldr r3, [pc, #108] ; (8026c24 ) 8026bb6: 0100 lsls r0, r0, #4 8026bb8: 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 */ 8026bbc: 2240 movs r2, #64 ; 0x40 8026bbe: e013 b.n 8026be8 USART_Cmd(USART2, ENABLE); USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); USART_ITConfig(USART2, USART_IT_TXE, DISABLE); } if (uart == USART3) { 8026bc0: 4b1a ldr r3, [pc, #104] ; (8026c2c ) 8026bc2: 429c cmp r4, r3 8026bc4: d127 bne.n 8026c16 RCC->APB1ENR |= RCC_APB1Periph_USART3; 8026bc6: f503 33f8 add.w r3, r3, #126976 ; 0x1f000 8026bca: 6c1a ldr r2, [r3, #64] ; 0x40 8026bcc: f442 2280 orr.w r2, r2, #262144 ; 0x40000 8026bd0: 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 */ 8026bd2: 4b13 ldr r3, [pc, #76] ; (8026c20 ) 8026bd4: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x05, 0)); 8026bd6: f3c0 2002 ubfx r0, r0, #8, #3 8026bda: f7ff ff9d bl 8026b18 __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 */ 8026bde: 4b11 ldr r3, [pc, #68] ; (8026c24 ) 8026be0: 0100 lsls r0, r0, #4 8026be2: 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 */ 8026be6: 2280 movs r2, #128 ; 0x80 8026be8: 605a str r2, [r3, #4] NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); 8026bea: 4620 mov r0, r4 8026bec: 4629 mov r1, r5 8026bee: f7ff f823 bl 8025c38 USART_Cmd(USART3, ENABLE); 8026bf2: 4620 mov r0, r4 8026bf4: 2101 movs r1, #1 8026bf6: f7ff f879 bl 8025cec USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); 8026bfa: 4620 mov r0, r4 8026bfc: 2201 movs r2, #1 8026bfe: f240 5125 movw r1, #1317 ; 0x525 8026c02: f7ff f87f bl 8025d04 USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8026c06: 4620 mov r0, r4 8026c08: f240 7127 movw r1, #1831 ; 0x727 8026c0c: 4632 mov r2, r6 } } 8026c0e: 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); 8026c12: f7ff b877 b.w 8025d04 8026c16: bd70 pop {r4, r5, r6, pc} 8026c18: 2000e938 .word 0x2000e938 8026c1c: 40011000 .word 0x40011000 8026c20: e000ed00 .word 0xe000ed00 8026c24: e000e100 .word 0xe000e100 8026c28: 40004400 .word 0x40004400 8026c2c: 40004800 .word 0x40004800 08026c30 : } } void InitUSART(void) { 8026c30: b507 push {r0, r1, r2, lr} xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026c32: 2100 movs r1, #0 8026c34: 2064 movs r0, #100 ; 0x64 8026c36: f002 fc3b bl 80294b0 8026c3a: 4b0a ldr r3, [pc, #40] ; (8026c64 ) rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8026c3c: 490a ldr r1, [pc, #40] ; (8026c68 ) USART_ITConfig(USART3, USART_IT_TXE, DISABLE); } } void InitUSART(void) { xSem_rx_buf = xSemaphoreCreateCounting( UPS_RBUF_SIZE, 0 ); 8026c3e: 6018 str r0, [r3, #0] rbuf32_init(&ups_tx_rbuf, ups_tx_fifo, UPS_RBUF_SIZE); 8026c40: 2264 movs r2, #100 ; 0x64 8026c42: 480a ldr r0, [pc, #40] ; (8026c6c ) 8026c44: f002 f8bc bl 8028dc0 rbuf32_init(&ups_rx_rbuf, ups_rx_fifo, UPS_RBUF_SIZE); 8026c48: 2264 movs r2, #100 ; 0x64 8026c4a: 4809 ldr r0, [pc, #36] ; (8026c70 ) 8026c4c: 4909 ldr r1, [pc, #36] ; (8026c74 ) 8026c4e: f002 f8b7 bl 8028dc0 uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); 8026c52: 2300 movs r3, #0 8026c54: 9300 str r3, [sp, #0] 8026c56: 4808 ldr r0, [pc, #32] ; (8026c78 ) 8026c58: f44f 6116 mov.w r1, #2400 ; 0x960 8026c5c: 2208 movs r2, #8 8026c5e: f7ff ff71 bl 8026b44 } 8026c62: bd0e pop {r1, r2, r3, pc} 8026c64: 2000e948 .word 0x2000e948 8026c68: 2000e608 .word 0x2000e608 8026c6c: 2000e928 .word 0x2000e928 8026c70: 2000e5f8 .word 0x2000e5f8 8026c74: 2000e798 .word 0x2000e798 8026c78: 40004400 .word 0x40004400 08026c7c : } int ups_send_block(void *data, uint8_t len) { int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026c7c: 4a0f ldr r2, [pc, #60] ; (8026cbc ) 8026c7e: 8993 ldrh r3, [r2, #12] 8026c80: f023 0380 bic.w r3, r3, #128 ; 0x80 8026c84: 041b lsls r3, r3, #16 8026c86: 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) { 8026c88: b570 push {r4, r5, r6, lr} 8026c8a: 4606 mov r6, r0 8026c8c: 460d mov r5, r1 int i = 0; uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026c8e: 8193 strh r3, [r2, #12] } UPS_USART->CR1 |= USART_CR1_TXEIE; } int ups_send_block(void *data, uint8_t len) { int i = 0; 8026c90: 2400 movs r4, #0 uint32_t s_temp = 0; UPS_USART->CR1 &= ~USART_CR1_TXEIE; //DBG printf("STOP \r\n"); while (i < len) { 8026c92: e008 b.n 8026ca6 if (!rbuf_isfull(&ups_tx_rbuf)) { 8026c94: 480a ldr r0, [pc, #40] ; (8026cc0 ) 8026c96: f002 f899 bl 8028dcc 8026c9a: b930 cbnz r0, 8026caa s_temp = ((uint8_t *)data)[i++]; 8026c9c: 5d31 ldrb r1, [r6, r4] rbuf32_put(&ups_tx_rbuf, s_temp); 8026c9e: 4808 ldr r0, [pc, #32] ; (8026cc0 ) 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++]; 8026ca0: 3401 adds r4, #1 rbuf32_put(&ups_tx_rbuf, s_temp); 8026ca2: f002 f8b4 bl 8028e0e 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) { 8026ca6: 42ac cmp r4, r5 8026ca8: dbf4 blt.n 8026c94 rbuf32_put(&ups_tx_rbuf, s_temp); } else break; } UPS_USART->CR1 |= USART_CR1_TXEIE; 8026caa: 4b04 ldr r3, [pc, #16] ; (8026cbc ) 8026cac: 899a ldrh r2, [r3, #12] 8026cae: b292 uxth r2, r2 8026cb0: f042 0280 orr.w r2, r2, #128 ; 0x80 8026cb4: 819a strh r2, [r3, #12] return i; } 8026cb6: 4620 mov r0, r4 8026cb8: bd70 pop {r4, r5, r6, pc} 8026cba: bf00 nop 8026cbc: 40004400 .word 0x40004400 8026cc0: 2000e928 .word 0x2000e928 08026cc4 : int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8026cc4: 4b09 ldr r3, [pc, #36] ; (8026cec ) } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 8026cc6: b507 push {r0, r1, r2, lr} int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8026cc8: 2100 movs r1, #0 } UPS_USART->CR1 |= USART_CR1_TXEIE; return i; } int ups_getchar(unsigned int timeout) { 8026cca: 4602 mov r2, r0 int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); 8026ccc: 6818 ldr r0, [r3, #0] 8026cce: 460b mov r3, r1 8026cd0: f002 fd44 bl 802975c 8026cd4: 9001 str r0, [sp, #4] if (res == pdFALSE) { 8026cd6: b128 cbz r0, 8026ce4 return -1; } rbuf32_get(&ups_rx_rbuf, &res); 8026cd8: 4805 ldr r0, [pc, #20] ; (8026cf0 ) 8026cda: a901 add r1, sp, #4 8026cdc: f002 f882 bl 8028de4 // DBG printf("STOP \r\n"); // DBG printf("wr: %d 0x%x\r\n", rs485_rx_rbuf.read_index,res); return res; 8026ce0: 9801 ldr r0, [sp, #4] 8026ce2: e001 b.n 8026ce8 int ups_getchar(unsigned int timeout) { int res; res = xSemaphoreTake( xSem_rx_buf, (TickType_t)timeout ); if (res == pdFALSE) { return -1; 8026ce4: 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; } 8026ce8: bd0e pop {r1, r2, r3, pc} 8026cea: bf00 nop 8026cec: 2000e948 .word 0x2000e948 8026cf0: 2000e5f8 .word 0x2000e5f8 08026cf4 : portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } } void USART1_IRQHandler(void) { 8026cf4: 4770 bx lr 8026cf6: 0000 movs r0, r0 08026cf8 : } void USART2_IRQHandler(void) { 8026cf8: b513 push {r0, r1, r4, lr} inline void rs232_irq_handler(void) { uint32_t c = 0; 8026cfa: 2300 movs r3, #0 8026cfc: 9301 str r3, [sp, #4] static BaseType_t xHigherPriorityTaskWoken = pdFALSE; if ((UPS_USART->SR & USART_SR_ORE)) { 8026cfe: 4b26 ldr r3, [pc, #152] ; (8026d98 ) 8026d00: 881a ldrh r2, [r3, #0] 8026d02: f002 0208 and.w r2, r2, #8 8026d06: b292 uxth r2, r2 8026d08: b112 cbz r2, 8026d10 c = (uint32_t)UPS_USART->DR; 8026d0a: 889b ldrh r3, [r3, #4] 8026d0c: b29b uxth r3, r3 8026d0e: 9301 str r3, [sp, #4] //DBG printf("overrunRS485\r\n"); } if (USART_GetITStatus(UPS_USART, USART_IT_TXE) != RESET) { 8026d10: 4c21 ldr r4, [pc, #132] ; (8026d98 ) 8026d12: f240 7127 movw r1, #1831 ; 0x727 8026d16: 4620 mov r0, r4 8026d18: f7ff f80d bl 8025d36 8026d1c: b1c0 cbz r0, 8026d50 if(rbuf32_get(&ups_tx_rbuf, &c)) { 8026d1e: 481f ldr r0, [pc, #124] ; (8026d9c ) 8026d20: a901 add r1, sp, #4 8026d22: f002 f85f bl 8028de4 8026d26: b118 cbz r0, 8026d30 UPS_USART->DR = (uint16_t)c; 8026d28: f8bd 3004 ldrh.w r3, [sp, #4] 8026d2c: 80a3 strh r3, [r4, #4] 8026d2e: e00a b.n 8026d46 //DBG printf("wr: %d 0x%x\r\n", rs485_tx_rbuf.read_index,c); } else { UPS_USART->CR1 &= ~USART_CR1_TXEIE; 8026d30: 89a3 ldrh r3, [r4, #12] 8026d32: f023 0380 bic.w r3, r3, #128 ; 0x80 8026d36: 041b lsls r3, r3, #16 8026d38: 0c1b lsrs r3, r3, #16 8026d3a: 81a3 strh r3, [r4, #12] UPS_USART->CR1 |= USART_CR1_RXNEIE; 8026d3c: 89a3 ldrh r3, [r4, #12] 8026d3e: b29b uxth r3, r3 8026d40: f043 0320 orr.w r3, r3, #32 8026d44: 81a3 strh r3, [r4, #12] } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); 8026d46: 4814 ldr r0, [pc, #80] ; (8026d98 ) 8026d48: f240 7127 movw r1, #1831 ; 0x727 8026d4c: f7ff f813 bl 8025d76 } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) 8026d50: 4c11 ldr r4, [pc, #68] ; (8026d98 ) 8026d52: f240 5125 movw r1, #1317 ; 0x525 8026d56: 4620 mov r0, r4 8026d58: f7fe ffed bl 8025d36 8026d5c: b1d8 cbz r0, 8026d96 { c = (uint32_t)UPS_USART->DR; 8026d5e: 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)) 8026d60: 480f ldr r0, [pc, #60] ; (8026da0 ) } USART_ClearITPendingBit(UPS_USART, USART_IT_TXE); } if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) { c = (uint32_t)UPS_USART->DR; 8026d62: b29b uxth r3, r3 8026d64: 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)) 8026d66: f002 f831 bl 8028dcc 8026d6a: b918 cbnz r0, 8026d74 rbuf32_put(&ups_rx_rbuf, c); 8026d6c: 480c ldr r0, [pc, #48] ; (8026da0 ) 8026d6e: 9901 ldr r1, [sp, #4] 8026d70: f002 f84d bl 8028e0e USART_ClearITPendingBit(UPS_USART, USART_IT_RXNE); 8026d74: 4808 ldr r0, [pc, #32] ; (8026d98 ) xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 8026d76: 4c0b ldr r4, [pc, #44] ; (8026da4 ) { 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); 8026d78: f240 5125 movw r1, #1317 ; 0x525 8026d7c: f7fe fffb bl 8025d76 xSemaphoreGiveFromISR(xSem_rx_buf, &xHigherPriorityTaskWoken); 8026d80: 4b09 ldr r3, [pc, #36] ; (8026da8 ) 8026d82: 4621 mov r1, r4 8026d84: 6818 ldr r0, [r3, #0] 8026d86: f002 fcb7 bl 80296f8 portYIELD_FROM_ISR(xHigherPriorityTaskWoken); 8026d8a: 6823 ldr r3, [r4, #0] 8026d8c: b11b cbz r3, 8026d96 8026d8e: 4b07 ldr r3, [pc, #28] ; (8026dac ) 8026d90: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8026d94: 601a str r2, [r3, #0] } void USART2_IRQHandler(void) { rs232_irq_handler(); } 8026d96: bd1c pop {r2, r3, r4, pc} 8026d98: 40004400 .word 0x40004400 8026d9c: 2000e928 .word 0x2000e928 8026da0: 2000e5f8 .word 0x2000e5f8 8026da4: 20002924 .word 0x20002924 8026da8: 2000e948 .word 0x2000e948 8026dac: e000ed04 .word 0xe000ed04 08026db0 : void USART3_IRQHandler(void) { 8026db0: 4770 bx lr 8026db2: 0000 movs r0, r0 08026db4 : /** * @brief Задача инициализации. Запускает основные задачи девайса и умирает. * @retval */ void InitTask(void *params) { 8026db4: b51f push {r0, r1, r2, r3, r4, lr} // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8026db6: 2400 movs r4, #0 void InitTask(void *params) { // ----------------------------------------------------------------------------- // xTaskCreate(vTaskWdt, "WDT", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- InitUSART(); 8026db8: f7ff ff3a bl 8026c30 ups_megatec_init(); 8026dbc: f001 ffec bl 8028d98 // ----------------------------------------------------------------------------- // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* SETTINGS_SetDefaultDebug(); SETTINGS_Save();*/ SETTINGS_Load(); 8026dc0: f001 fcf6 bl 80287b0 set_mode_jumper(); 8026dc4: f001 fdf6 bl 80289b4 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); 8026dc8: f001 fd50 bl 802886c /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8026dcc: 2280 movs r2, #128 ; 0x80 8026dce: 4623 mov r3, r4 8026dd0: 4932 ldr r1, [pc, #200] ; (8026e9c ) 8026dd2: 9400 str r4, [sp, #0] 8026dd4: 9401 str r4, [sp, #4] 8026dd6: 9402 str r4, [sp, #8] 8026dd8: 9403 str r4, [sp, #12] 8026dda: 4831 ldr r0, [pc, #196] ; (8026ea0 ) 8026ddc: f002 fdc8 bl 8029970 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef BUTTON_ENABLE BUTTON_Init(); 8026de0: f001 fda0 bl 8028924 xTaskCreate(vTaskButtons, "Buttons", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8026de4: 2280 movs r2, #128 ; 0x80 8026de6: 4623 mov r3, r4 8026de8: 492e ldr r1, [pc, #184] ; (8026ea4 ) 8026dea: 9400 str r4, [sp, #0] 8026dec: 9401 str r4, [sp, #4] 8026dee: 9402 str r4, [sp, #8] 8026df0: 9403 str r4, [sp, #12] 8026df2: 482d ldr r0, [pc, #180] ; (8026ea8 ) 8026df4: f002 fdbc bl 8029970 //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); // Так было 8026df8: 2001 movs r0, #1 8026dfa: f7ff fb75 bl 80264e8 // ----------------------------------------------------------------------------- #ifdef UPS_ENABLE /* UPS_Init(); xTaskCreate(UPS_TaskParsing, "UPS_Parsing", 2*configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); xTaskCreate(UPS_TaskState, "UPS_State", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);*/ xTaskCreate(UPS_Monitor, "UPS_Monitor", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8026dfe: 2280 movs r2, #128 ; 0x80 8026e00: 4623 mov r3, r4 8026e02: 492a ldr r1, [pc, #168] ; (8026eac ) 8026e04: 9400 str r4, [sp, #0] 8026e06: 9401 str r4, [sp, #4] 8026e08: 9402 str r4, [sp, #8] 8026e0a: 9403 str r4, [sp, #12] 8026e0c: 4828 ldr r0, [pc, #160] ; (8026eb0 ) 8026e0e: f002 fdaf bl 8029970 #endif // ----------------------------------------------------------------------------- /* Random number generator */ RNG_Init(); 8026e12: f7ff f951 bl 80260b8 // ----------------------------------------------------------------------------- #ifdef NET_ENABLE ETH_BSP_Config(); 8026e16: f00f f8f7 bl 8036008 LwIP_Init(); 8026e1a: f00e fbdd bl 80355d8 #ifdef WEB_SERVER_ENABLE HTTP_Init(); 8026e1e: f003 fec3 bl 802aba8 #endif #ifdef SNMP_ENABLE SNMP_Init(); 8026e22: f00e feb1 bl 8035b88 xTaskCreate(SNMP_SysUpTimeTask, "snmpSysUpTime", configMINIMAL_STACK_SIZE, 8026e26: 2280 movs r2, #128 ; 0x80 8026e28: 4623 mov r3, r4 8026e2a: 9400 str r4, [sp, #0] 8026e2c: 9401 str r4, [sp, #4] 8026e2e: 9402 str r4, [sp, #8] 8026e30: 9403 str r4, [sp, #12] 8026e32: 4920 ldr r1, [pc, #128] ; (8026eb4 ) 8026e34: 4820 ldr r0, [pc, #128] ; (8026eb8 ) 8026e36: f002 fd9b bl 8029970 NULL, tskIDLE_PRIORITY, NULL); xTaskCreate(snmp_trap_tread, "snmpTrapTest", 3*configMINIMAL_STACK_SIZE, 8026e3a: 4623 mov r3, r4 8026e3c: 491f ldr r1, [pc, #124] ; (8026ebc ) 8026e3e: 9400 str r4, [sp, #0] 8026e40: f44f 72c0 mov.w r2, #384 ; 0x180 8026e44: 9401 str r4, [sp, #4] 8026e46: 9402 str r4, [sp, #8] 8026e48: 9403 str r4, [sp, #12] 8026e4a: 481d ldr r0, [pc, #116] ; (8026ec0 ) 8026e4c: f002 fd90 bl 8029970 #endif #endif // ----------------------------------------------------------------------------- /* SNTP */ SNTP_Init(); 8026e50: f00e ff38 bl 8035cc4 xTaskCreate(vTaskOnceSynchro, "sntpOnceSinhro", 2*configMINIMAL_STACK_SIZE, 8026e54: 4b1b ldr r3, [pc, #108] ; (8026ec4 ) 8026e56: 9400 str r4, [sp, #0] 8026e58: 9301 str r3, [sp, #4] 8026e5a: 9402 str r4, [sp, #8] 8026e5c: 4623 mov r3, r4 8026e5e: 9403 str r4, [sp, #12] 8026e60: 4919 ldr r1, [pc, #100] ; (8026ec8 ) 8026e62: 481a ldr r0, [pc, #104] ; (8026ecc ) 8026e64: f44f 7280 mov.w r2, #256 ; 0x100 8026e68: f002 fd82 bl 8029970 NULL, tskIDLE_PRIORITY, &xHandleSntpOnceSinhro); xTaskCreate(vTaskPeriodicSynchro, "sntpPeriodicSinhro", 2*configMINIMAL_STACK_SIZE, 8026e6c: 4918 ldr r1, [pc, #96] ; (8026ed0 ) 8026e6e: 9400 str r4, [sp, #0] 8026e70: f44f 7280 mov.w r2, #256 ; 0x100 8026e74: 4623 mov r3, r4 8026e76: 9401 str r4, [sp, #4] 8026e78: 9402 str r4, [sp, #8] 8026e7a: 9403 str r4, [sp, #12] 8026e7c: 4815 ldr r0, [pc, #84] ; (8026ed4 ) 8026e7e: f002 fd77 bl 8029970 //TEST_IO(); /* Контроль успешной загрузки. Сброс флага bootry */ /* Сброс флага и сохранение нового значения во флеш памяти происходт после некоторой задержки для запуска всех задач */ vTaskDelay(4000); 8026e82: f44f 607a mov.w r0, #4000 ; 0xfa0 8026e86: f003 f80d bl 8029ea4 /* if (!dhcp) SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); 8026e8a: 4620 mov r0, r4 8026e8c: f002 fe48 bl 8029b20 taskYIELD(); } 8026e90: b004 add sp, #16 8026e92: e8bd 4010 ldmia.w sp!, {r4, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); taskYIELD(); 8026e96: f003 bc07 b.w 802a6a8 8026e9a: bf00 nop 8026e9c: 08036be8 .word 0x08036be8 8026ea0: 08028891 .word 0x08028891 8026ea4: 08036bf2 .word 0x08036bf2 8026ea8: 080289a1 .word 0x080289a1 8026eac: 08036bfa .word 0x08036bfa 8026eb0: 0802923d .word 0x0802923d 8026eb4: 08036c06 .word 0x08036c06 8026eb8: 0803595d .word 0x0803595d 8026ebc: 08036c14 .word 0x08036c14 8026ec0: 08035aad .word 0x08035aad 8026ec4: 20002928 .word 0x20002928 8026ec8: 08036c21 .word 0x08036c21 8026ecc: 08035d91 .word 0x08035d91 8026ed0: 08036c30 .word 0x08036c30 8026ed4: 08035d49 .word 0x08035d49 08026ed8
: void vApplicationTickHook(void) { } int main() { 8026ed8: b51f push {r0, r1, r2, r3, r4, lr} This function disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void) { __ASM volatile ("cpsid i" : : : "memory"); 8026eda: b672 cpsid i //TIM_Cmd(TIM13, DISABLE); //TIM_ClearITPendingBit(TIM13, TIM_IT_Update); __disable_irq(); NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x20000); 8026edc: f04f 6000 mov.w r0, #134217728 ; 0x8000000 8026ee0: f44f 3100 mov.w r1, #131072 ; 0x20000 8026ee4: f7fe fa10 bl 8025308 __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { uint32_t reg_value; uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07); /* only values 0..7 are used */ reg_value = SCB->AIRCR; /* read old register configuration */ 8026ee8: 4a17 ldr r2, [pc, #92] ; (8026f48 ) 8026eea: 68d1 ldr r1, [r2, #12] reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ 8026eec: f64f 03ff movw r3, #63743 ; 0xf8ff 8026ef0: 400b ands r3, r1 reg_value = (reg_value | 8026ef2: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 8026ef6: 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; 8026efa: 60d3 str r3, [r2, #12] NVIC_SetPriorityGrouping(0); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); 8026efc: f44f 7040 mov.w r0, #768 ; 0x300 8026f00: f7fe f9c4 bl 802528c This function enables IRQ interrupts by clearing the I-bit in the CPSR. Can only be executed in Privileged modes. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void) { __ASM volatile ("cpsie i" : : : "memory"); 8026f04: b662 cpsie i __enable_irq(); //WDG_Init(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); 8026f06: 2101 movs r1, #1 8026f08: f44f 5080 mov.w r0, #4096 ; 0x1000 8026f0c: f7fe fc1e bl 802574c /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 8026f10: 2040 movs r0, #64 ; 0x40 gpio_init(); spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8026f12: 2400 movs r4, #0 //WDG_Init(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 8026f14: f7fe fa2e bl 8025374 FLASH_ClearFlag(FLASH_FLAG_PGSERR); 8026f18: 2080 movs r0, #128 ; 0x80 8026f1a: f7fe fa2b bl 8025374 gpio_init(); 8026f1e: f7ff f867 bl 8025ff0 spi_flash_test(); 8026f22: f7ff fd9f bl 8026a64 // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8026f26: 4909 ldr r1, [pc, #36] ; (8026f4c ) 8026f28: 9400 str r4, [sp, #0] 8026f2a: f44f 727a mov.w r2, #1000 ; 0x3e8 8026f2e: 4623 mov r3, r4 8026f30: 9401 str r4, [sp, #4] 8026f32: 9402 str r4, [sp, #8] 8026f34: 9403 str r4, [sp, #12] 8026f36: 4806 ldr r0, [pc, #24] ; (8026f50 ) 8026f38: f002 fd1a bl 8029970 vTaskStartScheduler(); 8026f3c: f002 fe4a bl 8029bd4 /*while(1) { }*/ } 8026f40: 4620 mov r0, r4 8026f42: b004 add sp, #16 8026f44: bd10 pop {r4, pc} 8026f46: bf00 nop 8026f48: e000ed00 .word 0xe000ed00 8026f4c: 08036c43 .word 0x08036c43 8026f50: 08026db5 .word 0x08026db5 08026f54 : * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { 8026f54: 4770 bx lr 8026f56: 0000 movs r0, r0 08026f58 : } void HardFault_Output(uint32_t *sp) { 8026f58: 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]; 8026f5c: e890 0808 ldmia.w r0, {r3, fp} uint32_t r2 = sp[2]; 8026f60: f8d0 a008 ldr.w sl, [r0, #8] uint32_t r3 = sp[3]; 8026f64: f8d0 900c ldr.w r9, [r0, #12] uint32_t r12 = sp[4]; 8026f68: f8d0 8010 ldr.w r8, [r0, #16] uint32_t lr = sp[5]; 8026f6c: 6947 ldr r7, [r0, #20] uint32_t pc = sp[6]; 8026f6e: 6986 ldr r6, [r0, #24] uint32_t psr = sp[7]; 8026f70: 69c5 ldr r5, [r0, #28] printf("HardFault:\n\r"); 8026f72: 9301 str r3, [sp, #4] void NMI_Handler(void) { } void HardFault_Output(uint32_t *sp) { 8026f74: 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"); 8026f76: 4816 ldr r0, [pc, #88] ; (8026fd0 ) 8026f78: f000 fbc6 bl 8027708 /* Print CFSR register */ /* Print CPU registers */ printf("\n\rRegisters:\n\r"); 8026f7c: 4815 ldr r0, [pc, #84] ; (8026fd4 ) 8026f7e: f000 fbc3 bl 8027708 printf("SP 0x%08lx\n\r", (uint32_t)sp); 8026f82: 4815 ldr r0, [pc, #84] ; (8026fd8 ) 8026f84: 4621 mov r1, r4 8026f86: f000 fbbf bl 8027708 printf("R0 0x%08lx\n\r", r0); 8026f8a: 9b01 ldr r3, [sp, #4] 8026f8c: 4813 ldr r0, [pc, #76] ; (8026fdc ) 8026f8e: 4619 mov r1, r3 8026f90: f000 fbba bl 8027708 printf("R1 0x%08lx\n\r", r1); 8026f94: 4812 ldr r0, [pc, #72] ; (8026fe0 ) 8026f96: 4659 mov r1, fp 8026f98: f000 fbb6 bl 8027708 printf("R2 0x%08lx\n\r", r2); 8026f9c: 4811 ldr r0, [pc, #68] ; (8026fe4 ) 8026f9e: 4651 mov r1, sl 8026fa0: f000 fbb2 bl 8027708 printf("R3 0x%08lx\n\r", r3); 8026fa4: 4810 ldr r0, [pc, #64] ; (8026fe8 ) 8026fa6: 4649 mov r1, r9 8026fa8: f000 fbae bl 8027708 printf("R12 0x%08lx\n\r", r12); 8026fac: 480f ldr r0, [pc, #60] ; (8026fec ) 8026fae: 4641 mov r1, r8 8026fb0: f000 fbaa bl 8027708 printf("LR 0x%08lx\n\r", lr); 8026fb4: 480e ldr r0, [pc, #56] ; (8026ff0 ) 8026fb6: 4639 mov r1, r7 8026fb8: f000 fba6 bl 8027708 printf("PC 0x%08lx\n\r", pc); 8026fbc: 480d ldr r0, [pc, #52] ; (8026ff4 ) 8026fbe: 4631 mov r1, r6 8026fc0: f000 fba2 bl 8027708 printf("PSR 0x%08lx\n\r", psr); 8026fc4: 480c ldr r0, [pc, #48] ; (8026ff8 ) 8026fc6: 4629 mov r1, r5 8026fc8: f000 fb9e bl 8027708 8026fcc: e7fe b.n 8026fcc 8026fce: bf00 nop 8026fd0: 08036c4c .word 0x08036c4c 8026fd4: 08036c59 .word 0x08036c59 8026fd8: 08036c68 .word 0x08036c68 8026fdc: 08036c7e .word 0x08036c7e 8026fe0: 08036c94 .word 0x08036c94 8026fe4: 08036caa .word 0x08036caa 8026fe8: 08036cc0 .word 0x08036cc0 8026fec: 08036cd6 .word 0x08036cd6 8026ff0: 08036cec .word 0x08036cec 8026ff4: 08036d02 .word 0x08036d02 8026ff8: 08036d18 .word 0x08036d18 08026ffc : * @retval None */ __attribute__( (naked) ) void HardFault_Handler(void) { __asm volatile 8026ffc: f01e 0f04 tst.w lr, #4 8027000: bf0c ite eq 8027002: f3ef 8008 mrseq r0, MSP 8027006: f3ef 8009 mrsne r0, PSP 802700a: f8df 1004 ldr.w r1, [pc, #4] ; 8027010 802700e: 4708 bx r1 08027010 : 8027010: 08026f59 .word 0x08026f59 08027014 : * @brief This function handles Memory Manage exception. * @param None * @retval None */ void MemManage_Handler(void) { 8027014: e7fe b.n 8027014 8027016: 0000 movs r0, r0 08027018 : } } void TIM8_UP_TIM13_IRQHandler(void) { TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 8027018: 4801 ldr r0, [pc, #4] ; (8027020 ) 802701a: 2101 movs r1, #1 802701c: f7fe bdb4 b.w 8025b88 8027020: 40001c00 .word 0x40001c00 08027024 : * @brief This function handles Bus Fault exception. * @param None * @retval None */ void BusFault_Handler(void) { 8027024: e7fe b.n 8027024 08027026 : * @brief This function handles Usage Fault exception. * @param None * @retval None */ void UsageFault_Handler(void) { 8027026: e7fe b.n 8027026 08027028 : * @brief This function handles Debug Monitor exception. * @param None * @retval None */ void DebugMon_Handler(void) { 8027028: 4770 bx lr 0802702a : /*void PPP_IRQHandler(void) { }*/ void SDIO_IRQHandler(void) { 802702a: 4770 bx lr 0802702c : * @brief This function handles ethernet DMA interrupt request. * @param None * @retval None */ void ETH_IRQHandler(void) { 802702c: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 802702e: 2300 movs r3, #0 /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 8027030: 2040 movs r0, #64 ; 0x40 * @param None * @retval None */ void ETH_IRQHandler(void) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 8027032: 9301 str r3, [sp, #4] /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 8027034: f00f fa86 bl 8036544 8027038: 2801 cmp r0, #1 802703a: d104 bne.n 8027046 { /* Give the semaphore to wakeup LwIP task */ xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken ); 802703c: 4b09 ldr r3, [pc, #36] ; (8027064 ) 802703e: a901 add r1, sp, #4 8027040: 6818 ldr r0, [r3, #0] 8027042: f002 fb59 bl 80296f8 } /* Clear the interrupt flags. */ /* Clear the Eth DMA Rx IT pending bits */ ETH_DMAClearITPendingBit(ETH_DMA_IT_R); 8027046: 2040 movs r0, #64 ; 0x40 8027048: f00f fa92 bl 8036570 ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS); 802704c: f44f 3080 mov.w r0, #65536 ; 0x10000 8027050: f00f fa8e bl 8036570 // Switch tasks if necessary. */ if( xHigherPriorityTaskWoken != pdFALSE ) 8027054: 9b01 ldr r3, [sp, #4] 8027056: b11b cbz r3, 8027060 { portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); 8027058: 4b03 ldr r3, [pc, #12] ; (8027068 ) 802705a: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802705e: 601a str r2, [r3, #0] } } 8027060: bd0e pop {r1, r2, r3, pc} 8027062: bf00 nop 8027064: 2000e57c .word 0x2000e57c 8027068: e000ed04 .word 0xe000ed04 0802706c : #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 802706c: 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) 8027070: 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; 8027072: 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) { 8027076: 4681 mov r9, r0 8027078: 468a mov sl, r1 802707a: 4690 mov r8, r2 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 802707c: 461e mov r6, r3 802707e: 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; 8027080: 2401 movs r4, #1 8027082: 2500 movs r5, #0 char *bf = p->bf; while (num / d >= p->base) 8027084: e006 b.n 8027094 d *= p->base; 8027086: fb04 f307 mul.w r3, r4, r7 802708a: fb06 3305 mla r3, r6, r5, r3 802708e: fba4 4506 umull r4, r5, r4, r6 8027092: 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) 8027094: 4648 mov r0, r9 8027096: 4651 mov r1, sl 8027098: 4622 mov r2, r4 802709a: 462b mov r3, r5 802709c: f7f9 ff26 bl 8020eec <__aeabi_uldivmod> 80270a0: 42b9 cmp r1, r7 80270a2: bf08 it eq 80270a4: 42b0 cmpeq r0, r6 80270a6: d2ee bcs.n 8027086 80270a8: 2600 movs r6, #0 80270aa: e02d b.n 8027108 d *= p->base; while (d != 0) { int dgt = num / d; 80270ac: 4622 mov r2, r4 80270ae: 462b mov r3, r5 80270b0: 4648 mov r0, r9 80270b2: 4651 mov r1, sl 80270b4: f7f9 ff1a bl 8020eec <__aeabi_uldivmod> num %= d; 80270b8: 4651 mov r1, sl 80270ba: 4622 mov r2, r4 80270bc: 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; 80270be: 4607 mov r7, r0 num %= d; 80270c0: 4648 mov r0, r9 80270c2: f7f9 ff13 bl 8020eec <__aeabi_uldivmod> d /= p->base; 80270c6: 4620 mov r0, r4 80270c8: 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; 80270ca: 4691 mov r9, r2 80270cc: 469a mov sl, r3 d /= p->base; 80270ce: f8d8 200c ldr.w r2, [r8, #12] 80270d2: 2300 movs r3, #0 80270d4: f7f9 ff0a bl 8020eec <__aeabi_uldivmod> 80270d8: 4604 mov r4, r0 80270da: 460d mov r5, r1 if (n || dgt > 0 || d == 0) { 80270dc: b926 cbnz r6, 80270e8 80270de: 2f00 cmp r7, #0 80270e0: dc02 bgt.n 80270e8 80270e2: ea54 0305 orrs.w r3, r4, r5 80270e6: d1e1 bne.n 80270ac *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 80270e8: 2f09 cmp r7, #9 80270ea: b2fa uxtb r2, r7 80270ec: dd07 ble.n 80270fe 80270ee: f898 3000 ldrb.w r3, [r8] 80270f2: f013 0f04 tst.w r3, #4 80270f6: bf0c ite eq 80270f8: 2357 moveq r3, #87 ; 0x57 80270fa: 2337 movne r3, #55 ; 0x37 80270fc: e000 b.n 8027100 80270fe: 2330 movs r3, #48 ; 0x30 8027100: 189b adds r3, r3, r2 8027102: f80b 3b01 strb.w r3, [fp], #1 ++n; 8027106: 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) { 8027108: ea54 0305 orrs.w r3, r4, r5 802710c: d1ce bne.n 80270ac if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 802710e: 2300 movs r3, #0 8027110: f88b 3000 strb.w r3, [fp] 8027114: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08027118 : } #endif #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { 8027118: b570 push {r4, r5, r6, lr} int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 802711a: 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; 802711c: 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; 802711e: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 8027120: e000 b.n 8027124 d *= p->base; 8027122: 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) 8027124: fbb0 f5f3 udiv r5, r0, r3 8027128: 4295 cmp r5, r2 802712a: d2fa bcs.n 8027122 802712c: 2500 movs r5, #0 802712e: e01a b.n 8027166 d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 8027130: 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; 8027132: fbb0 f2f3 udiv r2, r0, r3 num %= d; 8027136: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 802713a: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 802713e: b91d cbnz r5, 8027148 8027140: 2a00 cmp r2, #0 8027142: dc01 bgt.n 8027148 8027144: 2b00 cmp r3, #0 8027146: d1f3 bne.n 8027130 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 8027148: 2a09 cmp r2, #9 802714a: b2d6 uxtb r6, r2 802714c: dd06 ble.n 802715c 802714e: 780a ldrb r2, [r1, #0] 8027150: f012 0f04 tst.w r2, #4 8027154: bf0c ite eq 8027156: 2257 moveq r2, #87 ; 0x57 8027158: 2237 movne r2, #55 ; 0x37 802715a: e000 b.n 802715e 802715c: 2230 movs r2, #48 ; 0x30 802715e: 1992 adds r2, r2, r6 8027160: f804 2b01 strb.w r2, [r4], #1 ++n; 8027164: 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) { 8027166: 2b00 cmp r3, #0 8027168: d1e2 bne.n 8027130 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 802716a: 7023 strb r3, [r4, #0] 802716c: bd70 pop {r4, r5, r6, pc} 0802716e : uli2a(num, p); } #endif static void ui2a(unsigned int num, struct param *p) { 802716e: b570 push {r4, r5, r6, lr} int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 8027170: 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; 8027172: 690c ldr r4, [r1, #16] #endif static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; 8027174: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 8027176: e000 b.n 802717a d *= p->base; 8027178: 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) 802717a: fbb0 f5f3 udiv r5, r0, r3 802717e: 4295 cmp r5, r2 8027180: d2fa bcs.n 8027178 8027182: 2500 movs r5, #0 8027184: e01a b.n 80271bc d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 8027186: 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; 8027188: fbb0 f2f3 udiv r2, r0, r3 num %= d; 802718c: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 8027190: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 8027194: b91d cbnz r5, 802719e 8027196: 2a00 cmp r2, #0 8027198: dc01 bgt.n 802719e 802719a: 2b00 cmp r3, #0 802719c: d1f3 bne.n 8027186 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 802719e: 2a09 cmp r2, #9 80271a0: b2d6 uxtb r6, r2 80271a2: dd06 ble.n 80271b2 80271a4: 780a ldrb r2, [r1, #0] 80271a6: f012 0f04 tst.w r2, #4 80271aa: bf0c ite eq 80271ac: 2257 moveq r2, #87 ; 0x57 80271ae: 2237 movne r2, #55 ; 0x37 80271b0: e000 b.n 80271b4 80271b2: 2230 movs r2, #48 ; 0x30 80271b4: 1992 adds r2, r2, r6 80271b6: f804 2b01 strb.w r2, [r4], #1 ++n; 80271ba: 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) { 80271bc: 2b00 cmp r3, #0 80271be: d1e2 bne.n 8027186 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 80271c0: 7023 strb r3, [r4, #0] 80271c2: bd70 pop {r4, r5, r6, pc} 080271c4 : } static void putchw(void *putp, putcf putf, struct param *p) { 80271c4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} char ch; int n = p->width; char *bf = p->bf; 80271c8: 6913 ldr r3, [r2, #16] } static void putchw(void *putp, putcf putf, struct param *p) { char ch; int n = p->width; 80271ca: 6854 ldr r4, [r2, #4] } static void putchw(void *putp, putcf putf, struct param *p) { 80271cc: 4606 mov r6, r0 80271ce: 460f mov r7, r1 80271d0: 4615 mov r5, r2 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 80271d2: e000 b.n 80271d6 n--; 80271d4: 3c01 subs r4, #1 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 80271d6: f813 2b01 ldrb.w r2, [r3], #1 80271da: b912 cbnz r2, 80271e2 n--; if (p->sign) 80271dc: 7a2b ldrb r3, [r5, #8] 80271de: b91b cbnz r3, 80271e8 80271e0: e003 b.n 80271ea char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 80271e2: 2c00 cmp r4, #0 80271e4: dcf6 bgt.n 80271d4 80271e6: e7f9 b.n 80271dc n--; if (p->sign) n--; 80271e8: 3c01 subs r4, #1 if (p->alt && p->base == 16) 80271ea: 782b ldrb r3, [r5, #0] 80271ec: 0799 lsls r1, r3, #30 80271ee: d507 bpl.n 8027200 80271f0: 68eb ldr r3, [r5, #12] 80271f2: 2b10 cmp r3, #16 80271f4: d101 bne.n 80271fa n -= 2; 80271f6: 3c02 subs r4, #2 80271f8: e002 b.n 8027200 else if (p->alt && p->base == 8) 80271fa: 2b08 cmp r3, #8 n--; 80271fc: bf08 it eq 80271fe: 3c01 subeq r4, #1 /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { 8027200: 782b ldrb r3, [r5, #0] 8027202: f013 0f09 tst.w r3, #9 8027206: d10d bne.n 8027224 8027208: 46a0 mov r8, r4 802720a: e004 b.n 8027216 while (n-- > 0) putf(putp, ' '); 802720c: 4630 mov r0, r6 802720e: 2120 movs r1, #32 8027210: 47b8 blx r7 8027212: 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) 8027216: f1b8 0f00 cmp.w r8, #0 802721a: dcf7 bgt.n 802720c return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 802721c: 1e63 subs r3, r4, #1 802721e: ea24 74e4 bic.w r4, r4, r4, asr #31 8027222: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, ' '); } /* print sign */ if (p->sign) 8027224: 7a29 ldrb r1, [r5, #8] 8027226: b109 cbz r1, 802722c putf(putp, p->sign); 8027228: 4630 mov r0, r6 802722a: 47b8 blx r7 /* Alternate */ if (p->alt && p->base == 16) { 802722c: 782b ldrb r3, [r5, #0] 802722e: 079a lsls r2, r3, #30 8027230: d512 bpl.n 8027258 8027232: 68eb ldr r3, [r5, #12] 8027234: 2b10 cmp r3, #16 8027236: d10a bne.n 802724e putf(putp, '0'); 8027238: 2130 movs r1, #48 ; 0x30 802723a: 4630 mov r0, r6 802723c: 47b8 blx r7 putf(putp, (p->uc ? 'X' : 'x')); 802723e: 782b ldrb r3, [r5, #0] 8027240: f013 0f04 tst.w r3, #4 8027244: 4630 mov r0, r6 8027246: bf0c ite eq 8027248: 2178 moveq r1, #120 ; 0x78 802724a: 2158 movne r1, #88 ; 0x58 802724c: e003 b.n 8027256 } else if (p->alt && p->base == 8) { 802724e: 2b08 cmp r3, #8 8027250: d102 bne.n 8027258 putf(putp, '0'); 8027252: 4630 mov r0, r6 8027254: 2130 movs r1, #48 ; 0x30 8027256: 47b8 blx r7 } /* Fill with zeros, after alternate or sign */ if (p->lz) { 8027258: 782b ldrb r3, [r5, #0] 802725a: 07db lsls r3, r3, #31 802725c: d50d bpl.n 802727a 802725e: 46a0 mov r8, r4 8027260: e004 b.n 802726c while (n-- > 0) putf(putp, '0'); 8027262: 4630 mov r0, r6 8027264: 2130 movs r1, #48 ; 0x30 8027266: 47b8 blx r7 8027268: f108 38ff add.w r8, r8, #4294967295 putf(putp, '0'); } /* Fill with zeros, after alternate or sign */ if (p->lz) { while (n-- > 0) 802726c: f1b8 0f00 cmp.w r8, #0 8027270: dcf7 bgt.n 8027262 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 8027272: 1e63 subs r3, r4, #1 8027274: ea24 74e4 bic.w r4, r4, r4, asr #31 8027278: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; 802727a: f8d5 8010 ldr.w r8, [r5, #16] while ((ch = *bf++)) 802727e: e001 b.n 8027284 putf(putp, ch); 8027280: 4630 mov r0, r6 8027282: 47b8 blx r7 putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; while ((ch = *bf++)) 8027284: f818 1b01 ldrb.w r1, [r8], #1 8027288: 2900 cmp r1, #0 802728a: d1f9 bne.n 8027280 putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { 802728c: 782b ldrb r3, [r5, #0] 802728e: f003 0309 and.w r3, r3, #9 8027292: 2b08 cmp r3, #8 8027294: d106 bne.n 80272a4 8027296: e003 b.n 80272a0 while (n-- > 0) putf(putp, ' '); 8027298: 4630 mov r0, r6 802729a: 2120 movs r1, #32 802729c: 47b8 blx r7 802729e: 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) 80272a0: 2c00 cmp r4, #0 80272a2: dcf9 bgt.n 8027298 80272a4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080272a8 <_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) 80272a8: 6883 ldr r3, [r0, #8] 80272aa: 6802 ldr r2, [r0, #0] 80272ac: 4293 cmp r3, r2 data->dest[data->num_chars] = c; 80272ae: bf3c itt cc 80272b0: 6842 ldrcc r2, [r0, #4] 80272b2: 54d1 strbcc r1, [r2, r3] data->num_chars ++; 80272b4: 6883 ldr r3, [r0, #8] 80272b6: 3301 adds r3, #1 80272b8: 6083 str r3, [r0, #8] 80272ba: 4770 bx lr 080272bc <_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; 80272bc: e890 000c ldmia.w r0, {r2, r3} 80272c0: 54d1 strb r1, [r2, r3] 80272c2: 3301 adds r3, #1 80272c4: 6043 str r3, [r0, #4] 80272c6: 4770 bx lr 080272c8 : putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 80272c8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80272cc: b09b sub sp, #108 ; 0x6c 80272ce: 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; 80272d0: aa04 add r2, sp, #16 putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 80272d2: 4605 mov r5, r0 80272d4: 460e mov r6, r1 80272d6: 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; 80272d8: 920e str r2, [sp, #56] ; 0x38 while ((ch = *(fmt++))) { 80272da: e208 b.n 80276ee if (ch != '%') { 80272dc: 2925 cmp r1, #37 ; 0x25 80272de: d000 beq.n 80272e2 80272e0: e13a b.n 8027558 #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; p.align_left = 0; 80272e2: 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; 80272e6: 2300 movs r3, #0 p.align_left = 0; 80272e8: f002 02fc and.w r2, r2, #252 ; 0xfc 80272ec: f363 02c3 bfi r2, r3, #3, #1 80272f0: f88d 2028 strb.w r2, [sp, #40] ; 0x28 p.sign = 0; p.prec = 2; 80272f4: 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; 80272f6: b2d2 uxtb r2, r2 80272f8: f002 0c01 and.w ip, r2, #1 80272fc: f3c2 0040 ubfx r0, r2, #1, #1 p.alt = 0; p.width = 0; 8027300: 930b str r3, [sp, #44] ; 0x2c p.align_left = 0; p.sign = 0; 8027302: f88d 3030 strb.w r3, [sp, #48] ; 0x30 p.prec = 2; 8027306: f88d 103c strb.w r1, [sp, #60] ; 0x3c 802730a: f3c2 02c0 ubfx r2, r2, #3, #1 /* Flags */ while ((ch = *(fmt++))) { 802730e: e012 b.n 8027336 switch (ch) { 8027310: 292d cmp r1, #45 ; 0x2d 8027312: d00f beq.n 8027334 8027314: d804 bhi.n 8027320 8027316: 2923 cmp r1, #35 ; 0x23 8027318: d008 beq.n 802732c 802731a: 292b cmp r1, #43 ; 0x2b 802731c: d10f bne.n 802733e 802731e: e007 b.n 8027330 8027320: 2930 cmp r1, #48 ; 0x30 8027322: d000 beq.n 8027326 8027324: e00b b.n 802733e case '-': p.align_left = 1; continue; case '0': p.lz = 1; 8027326: f04f 0c01 mov.w ip, #1 continue; 802732a: e004 b.n 8027336 case '#': p.alt = 1; 802732c: 2001 movs r0, #1 continue; 802732e: e002 b.n 8027336 case '+': p.sign = 1; 8027330: 2301 movs r3, #1 continue; 8027332: e000 b.n 8027336 /* Flags */ while ((ch = *(fmt++))) { switch (ch) { case '-': p.align_left = 1; 8027334: 2201 movs r2, #1 p.align_left = 0; p.sign = 0; p.prec = 2; /* Flags */ while ((ch = *(fmt++))) { 8027336: f817 1b01 ldrb.w r1, [r7], #1 802733a: 2900 cmp r1, #0 802733c: d1e8 bne.n 8027310 802733e: f89d 8028 ldrb.w r8, [sp, #40] ; 0x28 8027342: f88d 3030 strb.w r3, [sp, #48] ; 0x30 8027346: f36c 0800 bfi r8, ip, #0, #1 802734a: 46c4 mov ip, r8 802734c: f360 0c41 bfi ip, r0, #1, #1 8027350: 4660 mov r0, ip } break; } /* Width */ if (ch >= '0' && ch <= '9') { 8027352: f1a1 0330 sub.w r3, r1, #48 ; 0x30 8027356: f362 00c3 bfi r0, r2, #3, #1 802735a: 2b09 cmp r3, #9 802735c: f88d 0028 strb.w r0, [sp, #40] ; 0x28 8027360: d81d bhi.n 802739e 8027362: e004 b.n 802736e unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 8027364: fb00 3202 mla r2, r0, r2, r3 ch = *p++; 8027368: f817 1b01 ldrb.w r1, [r7], #1 802736c: e001 b.n 8027372 } break; } /* Width */ if (ch >= '0' && ch <= '9') { 802736e: 2200 movs r2, #0 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 8027370: 200a movs r0, #10 ui2a(num, p); } static int a2d(char ch) { if (ch >= '0' && ch <= '9') 8027372: f1a1 0330 sub.w r3, r1, #48 ; 0x30 8027376: fa5f fc83 uxtb.w ip, r3 802737a: f1bc 0f09 cmp.w ip, #9 802737e: d9f1 bls.n 8027364 return ch - '0'; else if (ch >= 'a' && ch <= 'f') 8027380: f1a1 0361 sub.w r3, r1, #97 ; 0x61 8027384: 2b05 cmp r3, #5 8027386: d802 bhi.n 802738e return ch - 'a' + 10; 8027388: f1a1 0357 sub.w r3, r1, #87 ; 0x57 802738c: e1b5 b.n 80276fa else if (ch >= 'A' && ch <= 'F') 802738e: f1a1 0341 sub.w r3, r1, #65 ; 0x41 8027392: 2b05 cmp r3, #5 8027394: d802 bhi.n 802739c return ch - 'A' + 10; 8027396: f1a1 0337 sub.w r3, r1, #55 ; 0x37 802739a: e1ae b.n 80276fa break; num = num * base + digit; ch = *p++; } *src = p; *nump = num; 802739c: 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 == '.') { 802739e: 292e cmp r1, #46 ; 0x2e 80273a0: d10e bne.n 80273c0 //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); if (ch >= '0' && ch <= '9') 80273a2: 783a ldrb r2, [r7, #0] 80273a4: 3a30 subs r2, #48 ; 0x30 80273a6: 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++); 80273a8: 1c7b adds r3, r7, #1 if (ch >= '0' && ch <= '9') 80273aa: 2a09 cmp r2, #9 p.prec = ch - '0'; 80273ac: bf98 it ls 80273ae: f88d 203c strbls.w r2, [sp, #60] ; 0x3c do { ch = *(fmt++); 80273b2: f813 1b01 ldrb.w r1, [r3], #1 } while (ch >= '0' && ch <= '9'); 80273b6: f1a1 0230 sub.w r2, r1, #48 ; 0x30 80273ba: 2a09 cmp r2, #9 ch = *(fmt++); if (ch >= '0' && ch <= '9') p.prec = ch - '0'; do { ch = *(fmt++); 80273bc: 461f mov r7, r3 } while (ch >= '0' && ch <= '9'); 80273be: d9f8 bls.n 80273b2 } #ifdef PRINTF_SIZE_T_SUPPORT # ifdef PRINTF_LONG_SUPPORT if (ch == 'z') { 80273c0: 297a cmp r1, #122 ; 0x7a 80273c2: d102 bne.n 80273ca ch = *(fmt++); 80273c4: f817 1b01 ldrb.w r1, [r7], #1 80273c8: e005 b.n 80273d6 } else # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { 80273ca: 296c cmp r1, #108 ; 0x6c 80273cc: d109 bne.n 80273e2 ch = *(fmt++); 80273ce: 7839 ldrb r1, [r7, #0] lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { 80273d0: 296c cmp r1, #108 ; 0x6c 80273d2: d002 beq.n 80273da # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 80273d4: 3701 adds r7, #1 lng = 1; 80273d6: 2301 movs r3, #1 80273d8: e004 b.n 80273e4 #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 80273da: 7879 ldrb r1, [r7, #1] lng = 2; 80273dc: 2302 movs r3, #2 if (ch == 'l') { ch = *(fmt++); lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 80273de: 3702 adds r7, #2 80273e0: e000 b.n 80273e4 while ((ch = *(fmt++))) { if (ch != '%') { putf(putp, ch); } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ 80273e2: 2300 movs r3, #0 lng = 2; } #endif } #endif switch (ch) { 80273e4: 2969 cmp r1, #105 ; 0x69 80273e6: d036 beq.n 8027456 80273e8: d816 bhi.n 8027418 80273ea: 2963 cmp r1, #99 ; 0x63 80273ec: f000 80a1 beq.w 8027532 80273f0: d80c bhi.n 802740c 80273f2: 2946 cmp r1, #70 ; 0x46 80273f4: f000 80b3 beq.w 802755e 80273f8: d806 bhi.n 8027408 80273fa: 2900 cmp r1, #0 80273fc: f000 8181 beq.w 8027702 8027400: 2925 cmp r1, #37 ; 0x25 8027402: f040 8174 bne.w 80276ee 8027406: e0a7 b.n 8027558 8027408: 2958 cmp r1, #88 ; 0x58 802740a: e012 b.n 8027432 802740c: 2964 cmp r1, #100 ; 0x64 802740e: d022 beq.n 8027456 8027410: 2966 cmp r1, #102 ; 0x66 8027412: f040 816c bne.w 80276ee 8027416: e0a2 b.n 802755e 8027418: 2973 cmp r1, #115 ; 0x73 802741a: f000 8090 beq.w 802753e 802741e: d805 bhi.n 802742c 8027420: 296f cmp r1, #111 ; 0x6f 8027422: d078 beq.n 8027516 8027424: 2970 cmp r1, #112 ; 0x70 8027426: f040 8162 bne.w 80276ee 802742a: e040 b.n 80274ae 802742c: 2975 cmp r1, #117 ; 0x75 802742e: d003 beq.n 8027438 8027430: 2978 cmp r1, #120 ; 0x78 8027432: f040 815c bne.w 80276ee 8027436: e041 b.n 80274bc case 0: goto abort; case 'u': p.base = 10; 8027438: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802743a: 2b02 cmp r3, #2 #endif switch (ch) { case 0: goto abort; case 'u': p.base = 10; 802743c: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802743e: d107 bne.n 8027450 ulli2a(va_arg(va, unsigned long long int), &p); 8027440: 3407 adds r4, #7 8027442: f024 0307 bic.w r3, r4, #7 8027446: f103 0408 add.w r4, r3, #8 802744a: e9d3 0100 ldrd r0, r1, [r3] 802744e: e017 b.n 8027480 else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 8027450: 6820 ldr r0, [r4, #0] 8027452: a90a add r1, sp, #40 ; 0x28 8027454: e04f b.n 80274f6 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 8027456: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8027458: 2b02 cmp r3, #2 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 802745a: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802745c: d112 bne.n 8027484 lli2a(va_arg(va, long long int), &p); 802745e: 3407 adds r4, #7 8027460: f024 0307 bic.w r3, r4, #7 8027464: e9d3 0100 ldrd r0, r1, [r3] 8027468: f103 0408 add.w r4, r3, #8 *bf = 0; } static void lli2a(long long int num, struct param *p) { if (num < 0) { 802746c: 2800 cmp r0, #0 802746e: f171 0300 sbcs.w r3, r1, #0 8027472: da05 bge.n 8027480 num = -num; p->sign = '-'; 8027474: 232d movs r3, #45 ; 0x2d } static void lli2a(long long int num, struct param *p) { if (num < 0) { num = -num; 8027476: 4240 negs r0, r0 8027478: eb61 0141 sbc.w r1, r1, r1, lsl #1 p->sign = '-'; 802747c: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ulli2a(num, p); 8027480: aa0a add r2, sp, #40 ; 0x28 8027482: e033 b.n 80274ec #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 8027484: 2b01 cmp r3, #1 li2a(va_arg(va, long int), &p); 8027486: 6820 ldr r0, [r4, #0] 8027488: 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) 802748c: d107 bne.n 802749e *bf = 0; } static void li2a(long num, struct param *p) { if (num < 0) { 802748e: 2800 cmp r0, #0 8027490: da03 bge.n 802749a num = -num; p->sign = '-'; 8027492: 232d movs r3, #45 ; 0x2d } static void li2a(long num, struct param *p) { if (num < 0) { num = -num; 8027494: 4240 negs r0, r0 p->sign = '-'; 8027496: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } uli2a(num, p); 802749a: a90a add r1, sp, #40 ; 0x28 802749c: e02f b.n 80274fe *bf = 0; } static void i2a(int num, struct param *p) { if (num < 0) { 802749e: 2800 cmp r0, #0 80274a0: da03 bge.n 80274aa num = -num; p->sign = '-'; 80274a2: 232d movs r3, #45 ; 0x2d } static void i2a(int num, struct param *p) { if (num < 0) { num = -num; 80274a4: 4240 negs r0, r0 p->sign = '-'; 80274a6: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ui2a(num, p); 80274aa: a90a add r1, sp, #40 ; 0x28 80274ac: e02a b.n 8027504 i2a(va_arg(va, int), &p); putchw(putp, putf, &p); break; #ifdef SIZEOF_POINTER case 'p': p.alt = 1; 80274ae: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 80274b2: f043 0302 orr.w r3, r3, #2 80274b6: f88d 3028 strb.w r3, [sp, #40] ; 0x28 # if defined(SIZEOF_INT) && SIZEOF_POINTER <= SIZEOF_INT lng = 0; 80274ba: 2300 movs r3, #0 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 80274bc: 2210 movs r2, #16 p.uc = (ch == 'X')?1:0; 80274be: f1b1 0e58 subs.w lr, r1, #88 ; 0x58 80274c2: f1de 0100 rsbs r1, lr, #0 80274c6: f89d 0028 ldrb.w r0, [sp, #40] ; 0x28 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 80274ca: 920d str r2, [sp, #52] ; 0x34 p.uc = (ch == 'X')?1:0; 80274cc: eb51 010e adcs.w r1, r1, lr 80274d0: aa1a add r2, sp, #104 ; 0x68 80274d2: f361 0082 bfi r0, r1, #2, #1 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80274d6: 2b02 cmp r3, #2 # endif #endif case 'x': case 'X': p.base = 16; p.uc = (ch == 'X')?1:0; 80274d8: f802 0d40 strb.w r0, [r2, #-64]! #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80274dc: d109 bne.n 80274f2 ulli2a(va_arg(va, unsigned long long int), &p); 80274de: 3407 adds r4, #7 80274e0: f024 0307 bic.w r3, r4, #7 80274e4: e9d3 0100 ldrd r0, r1, [r3] 80274e8: f103 0408 add.w r4, r3, #8 80274ec: f7ff fdbe bl 802706c 80274f0: e00b b.n 802750a else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 80274f2: 6820 ldr r0, [r4, #0] 80274f4: 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) 80274f6: 2b01 cmp r3, #1 80274f8: f104 0804 add.w r8, r4, #4 80274fc: d102 bne.n 8027504 uli2a(va_arg(va, unsigned long int), &p); 80274fe: f7ff fe0b bl 8027118 8027502: e001 b.n 8027508 else #endif ui2a(va_arg(va, unsigned int), &p); 8027504: f7ff fe33 bl 802716e 8027508: 4644 mov r4, r8 putchw(putp, putf, &p); 802750a: 4628 mov r0, r5 802750c: 4631 mov r1, r6 802750e: aa0a add r2, sp, #40 ; 0x28 8027510: f7ff fe58 bl 80271c4 break; 8027514: e0eb b.n 80276ee case 'o': p.base = 8; 8027516: 2308 movs r3, #8 ui2a(va_arg(va, unsigned int), &p); 8027518: 6820 ldr r0, [r4, #0] #endif ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; 802751a: 930d str r3, [sp, #52] ; 0x34 ui2a(va_arg(va, unsigned int), &p); 802751c: a90a add r1, sp, #40 ; 0x28 802751e: f7ff fe26 bl 802716e putchw(putp, putf, &p); 8027522: 4628 mov r0, r5 8027524: 4631 mov r1, r6 8027526: 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); 8027528: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); 802752c: f7ff fe4a bl 80271c4 8027530: e010 b.n 8027554 break; case 'c': putf(putp, (char)(va_arg(va, int))); 8027532: 4628 mov r0, r5 8027534: 7821 ldrb r1, [r4, #0] 8027536: f104 0804 add.w r8, r4, #4 802753a: 47b0 blx r6 802753c: e00a b.n 8027554 break; case 's': p.bf = va_arg(va, char *); 802753e: 6823 ldr r3, [r4, #0] putchw(putp, putf, &p); 8027540: aa0a add r2, sp, #40 ; 0x28 8027542: 4628 mov r0, r5 8027544: 4631 mov r1, r6 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 8027546: 930e str r3, [sp, #56] ; 0x38 putchw(putp, putf, &p); 8027548: f7ff fe3c bl 80271c4 p.bf = bf; 802754c: aa04 add r2, sp, #16 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 802754e: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); p.bf = bf; 8027552: 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 *); 8027554: 4644 mov r4, r8 putchw(putp, putf, &p); p.bf = bf; break; 8027556: e0ca b.n 80276ee case '%': putf(putp, ch); 8027558: 4628 mov r0, r5 802755a: 47b0 blx r6 break; 802755c: e0c7 b.n 80276ee case 'f': case 'F': fval = va_arg(va, double); 802755e: 3407 adds r4, #7 8027560: f024 0307 bic.w r3, r4, #7 8027564: f103 0408 add.w r4, r3, #8 8027568: e893 0404 ldmia.w r3, {r2, sl} 802756c: 9200 str r2, [sp, #0] sign = 0; if (fval < 0) 802756e: 4610 mov r0, r2 8027570: 4651 mov r1, sl 8027572: 2200 movs r2, #0 8027574: 2300 movs r3, #0 8027576: f7f9 fa95 bl 8020aa4 <__aeabi_dcmplt> 802757a: b138 cbz r0, 802758c { sign = 1; p.width--; 802757c: 9b0b ldr r3, [sp, #44] ; 0x2c 802757e: 3b01 subs r3, #1 8027580: 930b str r3, [sp, #44] ; 0x2c fval = - fval; 8027582: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 case 'F': fval = va_arg(va, double); sign = 0; if (fval < 0) { sign = 1; 8027586: f04f 0b01 mov.w fp, #1 802758a: e009 b.n 80275a0 p.width--; fval = - fval; } else if (p.sign) { 802758c: f89d 3030 ldrb.w r3, [sp, #48] ; 0x30 8027590: b12b cbz r3, 802759e sign = 2; p.width--; 8027592: 9b0b ldr r3, [sp, #44] ; 0x2c 8027594: 3b01 subs r3, #1 8027596: 930b str r3, [sp, #44] ; 0x2c sign = 1; p.width--; fval = - fval; } else if (p.sign) { sign = 2; 8027598: f04f 0b02 mov.w fp, #2 802759c: e000 b.n 80275a0 putf(putp, ch); break; case 'f': case 'F': fval = va_arg(va, double); sign = 0; 802759e: 469b mov fp, r3 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 80275a0: 4651 mov r1, sl 80275a2: 9800 ldr r0, [sp, #0] 80275a4: f7f9 faa6 bl 8020af4 <__aeabi_d2iz> fiter = 0; 80275a8: 2200 movs r2, #0 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 80275aa: 9001 str r0, [sp, #4] 80275ac: 4680 mov r8, r0 fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 80275ae: 210a movs r1, #10 } fpart = (int)fval; fiter = 0; while (fpart != 0) 80275b0: e008 b.n 80275c4 { temp_buffer[fiter++] = fpart % 10; 80275b2: fb98 f0f1 sdiv r0, r8, r1 80275b6: ab10 add r3, sp, #64 ; 0x40 80275b8: fb01 8810 mls r8, r1, r0, r8 80275bc: f843 8022 str.w r8, [r3, r2, lsl #2] 80275c0: 3201 adds r2, #1 fpart = fpart / 10; 80275c2: 4680 mov r8, r0 } fpart = (int)fval; fiter = 0; while (fpart != 0) 80275c4: f1b8 0f00 cmp.w r8, #0 80275c8: d1f3 bne.n 80275b2 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; if (fiter == -1) 80275ca: f102 39ff add.w r9, r2, #4294967295 80275ce: b912 cbnz r2, 80275d6 p.width--; 80275d0: 9a0b ldr r2, [sp, #44] ; 0x2c 80275d2: 3a01 subs r2, #1 80275d4: 920b str r2, [sp, #44] ; 0x2c /* Leading zeros */ if (p.lz) { 80275d6: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 80275da: 07d0 lsls r0, r2, #31 80275dc: d51b bpl.n 8027616 if (sign == 1) 80275de: f1bb 0f01 cmp.w fp, #1 80275e2: d102 bne.n 80275ea putf(putp, '-'); 80275e4: 4628 mov r0, r5 80275e6: 212d movs r1, #45 ; 0x2d 80275e8: e007 b.n 80275fa else if (sign == 2) 80275ea: f1bb 0f02 cmp.w fp, #2 80275ee: d105 bne.n 80275fc putf(putp, '+'); 80275f0: 4628 mov r0, r5 80275f2: 212b movs r1, #43 ; 0x2b 80275f4: e001 b.n 80275fa while (p.width-- > p.prec + fiter + 2) { putf(putp, '0'); 80275f6: 4628 mov r0, r5 80275f8: 2130 movs r1, #48 ; 0x30 80275fa: 47b0 blx r6 if (sign == 1) putf(putp, '-'); else if (sign == 2) putf(putp, '+'); while (p.width-- > p.prec + fiter + 2) 80275fc: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 8027600: 9b0b ldr r3, [sp, #44] ; 0x2c 8027602: 444a add r2, r9 8027604: 3202 adds r2, #2 8027606: 1e59 subs r1, r3, #1 8027608: 4293 cmp r3, r2 802760a: 910b str r1, [sp, #44] ; 0x2c 802760c: dcf3 bgt.n 80275f6 802760e: e017 b.n 8027640 else { while (p.width-- > p.prec + fiter + 2) { putf(putp, ' '); 8027610: 4628 mov r0, r5 8027612: 2120 movs r1, #32 8027614: 47b0 blx r6 } } else { while (p.width-- > p.prec + fiter + 2) 8027616: f89d 103c ldrb.w r1, [sp, #60] ; 0x3c 802761a: 9a0b ldr r2, [sp, #44] ; 0x2c 802761c: 4449 add r1, r9 802761e: 3102 adds r1, #2 8027620: 1e50 subs r0, r2, #1 8027622: 428a cmp r2, r1 8027624: 900b str r0, [sp, #44] ; 0x2c 8027626: dcf3 bgt.n 8027610 { putf(putp, ' '); } if (sign == 1) 8027628: f1bb 0f01 cmp.w fp, #1 802762c: d102 bne.n 8027634 putf(putp, '-'); 802762e: 4628 mov r0, r5 8027630: 212d movs r1, #45 ; 0x2d 8027632: e004 b.n 802763e else if (sign == 2) 8027634: f1bb 0f02 cmp.w fp, #2 8027638: d102 bne.n 8027640 putf(putp, '+'); 802763a: 4628 mov r0, r5 802763c: 212b movs r1, #43 ; 0x2b 802763e: 47b0 blx r6 } if (fiter == -1) 8027640: f1b9 3fff cmp.w r9, #4294967295 8027644: d102 bne.n 802764c putf(putp, '0'); 8027646: 4628 mov r0, r5 8027648: 2130 movs r1, #48 ; 0x30 802764a: e007 b.n 802765c while (fiter > -1) { putf(putp, '0' + (temp_buffer[fiter--])); 802764c: ab10 add r3, sp, #64 ; 0x40 802764e: 4628 mov r0, r5 8027650: f853 1029 ldr.w r1, [r3, r9, lsl #2] 8027654: 3130 adds r1, #48 ; 0x30 8027656: f109 39ff add.w r9, r9, #4294967295 802765a: b2c9 uxtb r1, r1 802765c: 47b0 blx r6 } if (fiter == -1) putf(putp, '0'); while (fiter > -1) 802765e: f1b9 3fff cmp.w r9, #4294967295 8027662: d1f3 bne.n 802764c { putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); 8027664: 4628 mov r0, r5 8027666: 212e movs r1, #46 ; 0x2e 8027668: 47b0 blx r6 ffactor = 1; 802766a: f04f 0901 mov.w r9, #1 while (p.prec-- > 0) 802766e: e01d b.n 80276ac { ffactor *= 10; 8027670: 230a movs r3, #10 fpart = (int)((fval - (int)fval)*ffactor); 8027672: 9801 ldr r0, [sp, #4] putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) { ffactor *= 10; 8027674: fb03 f909 mul.w r9, r3, r9 fpart = (int)((fval - (int)fval)*ffactor); 8027678: f7f8 ff3c bl 80204f4 <__aeabi_i2d> 802767c: 4602 mov r2, r0 802767e: 460b mov r3, r1 8027680: 9800 ldr r0, [sp, #0] 8027682: 4651 mov r1, sl 8027684: f7f8 fde8 bl 8020258 <__aeabi_dsub> 8027688: e9cd 0102 strd r0, r1, [sp, #8] 802768c: 4648 mov r0, r9 802768e: f7f8 ff31 bl 80204f4 <__aeabi_i2d> 8027692: 4602 mov r2, r0 8027694: 460b mov r3, r1 8027696: e9dd 0102 ldrd r0, r1, [sp, #8] 802769a: f7f8 ff91 bl 80205c0 <__aeabi_dmul> 802769e: f7f9 fa29 bl 8020af4 <__aeabi_d2iz> if (fpart == 0) 80276a2: 4680 mov r8, r0 80276a4: b910 cbnz r0, 80276ac putf(putp, '0'); 80276a6: 4628 mov r0, r5 80276a8: 2130 movs r1, #48 ; 0x30 80276aa: 47b0 blx r6 putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) 80276ac: f89d 303c ldrb.w r3, [sp, #60] ; 0x3c 80276b0: 1e5a subs r2, r3, #1 80276b2: f88d 203c strb.w r2, [sp, #60] ; 0x3c 80276b6: 2b00 cmp r3, #0 80276b8: d1da bne.n 8027670 putf(putp, '0'); } fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 80276ba: 220a movs r2, #10 80276bc: e008 b.n 80276d0 80276be: fb98 f1f2 sdiv r1, r8, r2 80276c2: a810 add r0, sp, #64 ; 0x40 80276c4: fb02 8811 mls r8, r2, r1, r8 80276c8: f840 8023 str.w r8, [r0, r3, lsl #2] 80276cc: 3301 adds r3, #1 fpart = fpart / 10; 80276ce: 4688 mov r8, r1 fpart = (int)((fval - (int)fval)*ffactor); if (fpart == 0) putf(putp, '0'); } fiter = 0; while (fpart != 0) 80276d0: f1b8 0f00 cmp.w r8, #0 80276d4: d1f3 bne.n 80276be 80276d6: 4698 mov r8, r3 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 80276d8: e006 b.n 80276e8 { putf(putp, '0' + (temp_buffer[fiter--])); 80276da: ab10 add r3, sp, #64 ; 0x40 80276dc: 4628 mov r0, r5 80276de: f853 1028 ldr.w r1, [r3, r8, lsl #2] 80276e2: 3130 adds r1, #48 ; 0x30 80276e4: b2c9 uxtb r1, r1 80276e6: 47b0 blx r6 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 80276e8: f118 38ff adds.w r8, r8, #4294967295 80276ec: d2f5 bcs.n 80276da char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; while ((ch = *(fmt++))) { 80276ee: f817 1b01 ldrb.w r1, [r7], #1 80276f2: 2900 cmp r1, #0 80276f4: f47f adf2 bne.w 80272dc 80276f8: e003 b.n 8027702 { const char *p = *src; unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) 80276fa: 2b0a cmp r3, #10 80276fc: f77f ae32 ble.w 8027364 8027700: e64c b.n 802739c break; } } } abort:; } 8027702: b01b add sp, #108 ; 0x6c 8027704: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08027708 : stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027708: b40f push {r0, r1, r2, r3} 802770a: b507 push {r0, r1, r2, lr} va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 802770c: 4906 ldr r1, [pc, #24] ; (8027728 ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 802770e: ab04 add r3, sp, #16 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027710: 6808 ldr r0, [r1, #0] 8027712: 4906 ldr r1, [pc, #24] ; (802772c ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 8027714: f853 2b04 ldr.w r2, [r3], #4 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 8027718: 6809 ldr r1, [r1, #0] } void tfp_printf(char *fmt, ...) { va_list va; va_start(va, fmt); 802771a: 9301 str r3, [sp, #4] tfp_format(stdout_putp, stdout_putf, fmt, va); 802771c: f7ff fdd4 bl 80272c8 va_end(va); } 8027720: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027724: b004 add sp, #16 8027726: 4770 bx lr 8027728: 20002930 .word 0x20002930 802772c: 2000292c .word 0x2000292c 08027730 : data->dest[data->num_chars] = c; data->num_chars ++; } int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { 8027730: b51f push {r0, r1, r2, r3, r4, lr} 8027732: 2400 movs r4, #0 struct _vsnprintf_putcf_data data; if (size < 1) 8027734: b181 cbz r1, 8027758 return 0; data.dest = str; data.dest_capacity = size-1; 8027736: 3901 subs r1, #1 struct _vsnprintf_putcf_data data; if (size < 1) return 0; data.dest = str; 8027738: 9002 str r0, [sp, #8] data.dest_capacity = size-1; 802773a: 9101 str r1, [sp, #4] data.num_chars = 0; tfp_format(&data, _vsnprintf_putcf, format, ap); 802773c: a801 add r0, sp, #4 802773e: 4908 ldr r1, [pc, #32] ; (8027760 ) if (size < 1) return 0; data.dest = str; data.dest_capacity = size-1; data.num_chars = 0; 8027740: 9403 str r4, [sp, #12] tfp_format(&data, _vsnprintf_putcf, format, ap); 8027742: f7ff fdc1 bl 80272c8 if (data.num_chars < data.dest_capacity) 8027746: 9903 ldr r1, [sp, #12] 8027748: 9b01 ldr r3, [sp, #4] 802774a: 9a02 ldr r2, [sp, #8] 802774c: 4299 cmp r1, r3 data.dest[data.num_chars] = '\0'; 802774e: bf34 ite cc 8027750: 5454 strbcc r4, [r2, r1] else data.dest[data.dest_capacity] = '\0'; 8027752: 54d4 strbcs r4, [r2, r3] return data.num_chars; 8027754: 9803 ldr r0, [sp, #12] 8027756: e000 b.n 802775a int tfp_vsnprintf(char *str, size_t size, const char *format, va_list ap) { struct _vsnprintf_putcf_data data; if (size < 1) return 0; 8027758: 4608 mov r0, r1 data.dest[data.num_chars] = '\0'; else data.dest[data.dest_capacity] = '\0'; return data.num_chars; } 802775a: b004 add sp, #16 802775c: bd10 pop {r4, pc} 802775e: bf00 nop 8027760: 080272a9 .word 0x080272a9 08027764 : int tfp_snprintf(char *str, size_t size, const char *format, ...) { 8027764: b40c push {r2, r3} 8027766: b507 push {r0, r1, r2, lr} 8027768: ab04 add r3, sp, #16 802776a: f853 2b04 ldr.w r2, [r3], #4 va_list ap; int retval; va_start(ap, format); 802776e: 9301 str r3, [sp, #4] retval = tfp_vsnprintf(str, size, format, ap); 8027770: f7ff ffde bl 8027730 va_end(ap); return retval; } 8027774: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 8027778: b002 add sp, #8 802777a: 4770 bx lr 0802777c : 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) { 802777c: b537 push {r0, r1, r2, r4, r5, lr} 802777e: 460d mov r5, r1 8027780: 4613 mov r3, r2 struct _vsprintf_putcf_data data; data.dest = str; 8027782: 9000 str r0, [sp, #0] data.num_chars = 0; 8027784: 2400 movs r4, #0 tfp_format(&data, _vsprintf_putcf, format, ap); 8027786: 4668 mov r0, sp 8027788: 462a mov r2, r5 802778a: 4904 ldr r1, [pc, #16] ; (802779c ) int tfp_vsprintf(char *str, const char *format, va_list ap) { struct _vsprintf_putcf_data data; data.dest = str; data.num_chars = 0; 802778c: 9401 str r4, [sp, #4] tfp_format(&data, _vsprintf_putcf, format, ap); 802778e: f7ff fd9b bl 80272c8 data.dest[data.num_chars] = '\0'; 8027792: e89d 000c ldmia.w sp, {r2, r3} 8027796: 54d4 strb r4, [r2, r3] return data.num_chars; } 8027798: 9801 ldr r0, [sp, #4] 802779a: bd3e pop {r1, r2, r3, r4, r5, pc} 802779c: 080272bd .word 0x080272bd 080277a0 : int tfp_sprintf(char *str, const char *format, ...) { 80277a0: b40e push {r1, r2, r3} 80277a2: b503 push {r0, r1, lr} 80277a4: aa03 add r2, sp, #12 80277a6: f852 1b04 ldr.w r1, [r2], #4 va_list ap; int retval; va_start(ap, format); 80277aa: 9201 str r2, [sp, #4] retval = tfp_vsprintf(str, format, ap); 80277ac: f7ff ffe6 bl 802777c va_end(ap); return retval; } 80277b0: e8bd 400c ldmia.w sp!, {r2, r3, lr} 80277b4: b003 add sp, #12 80277b6: 4770 bx lr 080277b8 : /* if (upsParams.lineFailBit) *str = '1'; else *str = '0';*/ *str = '0'; 80277b8: 2330 movs r3, #48 ; 0x30 80277ba: 7003 strb r3, [r0, #0] *len = 1; 80277bc: 2301 movs r3, #1 80277be: 700b strb r3, [r1, #0] 80277c0: 4770 bx lr 080277c2 : *str = '1'; else *str = '0'; *len = 1;*/ *str = '0'; 80277c2: 2330 movs r3, #48 ; 0x30 80277c4: 7003 strb r3, [r0, #0] *len = 1; 80277c6: 2301 movs r3, #1 80277c8: 700b strb r3, [r1, #0] 80277ca: 4770 bx lr 080277cc : /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 80277cc: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 80277ce: 4b08 ldr r3, [pc, #32] ; (80277f0 ) /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 80277d0: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 80277d2: 6818 ldr r0, [r3, #0] /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 80277d4: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 80277d6: f7f8 fe9f bl 8020518 <__aeabi_f2d> 80277da: 4602 mov r2, r0 80277dc: 460b mov r3, r1 80277de: 4620 mov r0, r4 80277e0: 4904 ldr r1, [pc, #16] ; (80277f4 ) 80277e2: f7ff ffdd bl 80277a0 *len = strlen(str); 80277e6: 4620 mov r0, r4 80277e8: f7fa fb42 bl 8021e70 80277ec: 7028 strb r0, [r5, #0] 80277ee: bd38 pop {r3, r4, r5, pc} 80277f0: 2000e954 .word 0x2000e954 80277f4: 08036d2e .word 0x08036d2e 080277f8 : /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 80277f8: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Freq_in); 80277fa: 4b08 ldr r3, [pc, #32] ; (802781c ) /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 80277fc: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Freq_in); 80277fe: 6818 ldr r0, [r3, #0] /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8027800: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Freq_in); 8027802: f7f8 fe89 bl 8020518 <__aeabi_f2d> 8027806: 4602 mov r2, r0 8027808: 460b mov r3, r1 802780a: 4620 mov r0, r4 802780c: 4904 ldr r1, [pc, #16] ; (8027820 ) 802780e: f7ff ffc7 bl 80277a0 *len = strlen(str); 8027812: 4620 mov r0, r4 8027814: f7fa fb2c bl 8021e70 8027818: 7028 strb r0, [r5, #0] 802781a: bd38 pop {r3, r4, r5, pc} 802781c: 2000e954 .word 0x2000e954 8027820: 08036d2e .word 0x08036d2e 08027824 : /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027824: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_in); 8027826: 4b08 ldr r3, [pc, #32] ; (8027848 ) /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 8027828: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_in); 802782a: 6858 ldr r0, [r3, #4] /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 802782c: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_in); 802782e: f7f8 fe73 bl 8020518 <__aeabi_f2d> 8027832: 4602 mov r2, r0 8027834: 460b mov r3, r1 8027836: 4620 mov r0, r4 8027838: 4904 ldr r1, [pc, #16] ; (802784c ) 802783a: f7ff ffb1 bl 80277a0 *len = strlen(str); 802783e: 4620 mov r0, r4 8027840: f7fa fb16 bl 8021e70 8027844: 7028 strb r0, [r5, #0] 8027846: bd38 pop {r3, r4, r5, pc} 8027848: 2000e954 .word 0x2000e954 802784c: 08036d2e .word 0x08036d2e 08027850 : /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027850: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.VAC_out); 8027852: 4b08 ldr r3, [pc, #32] ; (8027874 ) /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027854: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.VAC_out); 8027856: 6898 ldr r0, [r3, #8] /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8027858: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.VAC_out); 802785a: f7f8 fe5d bl 8020518 <__aeabi_f2d> 802785e: 4602 mov r2, r0 8027860: 460b mov r3, r1 8027862: 4620 mov r0, r4 8027864: 4904 ldr r1, [pc, #16] ; (8027878 ) 8027866: f7ff ff9b bl 80277a0 *len = strlen(str); 802786a: 4620 mov r0, r4 802786c: f7fa fb00 bl 8021e70 8027870: 7028 strb r0, [r5, #0] 8027872: bd38 pop {r3, r4, r5, pc} 8027874: 2000e954 .word 0x2000e954 8027878: 08036d2e .word 0x08036d2e 0802787c : /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 802787c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Load); 802787e: 4b06 ldr r3, [pc, #24] ; (8027898 ) /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 8027880: 4605 mov r5, r0 8027882: 460c mov r4, r1 sprintf(str, "%d", UPS.Load); 8027884: 7c1a ldrb r2, [r3, #16] 8027886: 4905 ldr r1, [pc, #20] ; (802789c ) 8027888: f7ff ff8a bl 80277a0 *len = strlen(str); 802788c: 4628 mov r0, r5 802788e: f7fa faef bl 8021e70 8027892: 7020 strb r0, [r4, #0] 8027894: bd38 pop {r3, r4, r5, pc} 8027896: bf00 nop 8027898: 2000e954 .word 0x2000e954 802789c: 08036d34 .word 0x08036d34 080278a0 : /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 80278a0: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.SOC); 80278a2: 4b06 ldr r3, [pc, #24] ; (80278bc ) /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 80278a4: 4605 mov r5, r0 80278a6: 460c mov r4, r1 sprintf(str, "%0.1f", UPS.SOC); 80278a8: 7c5a ldrb r2, [r3, #17] 80278aa: 4905 ldr r1, [pc, #20] ; (80278c0 ) 80278ac: f7ff ff78 bl 80277a0 *len = strlen(str); 80278b0: 4628 mov r0, r5 80278b2: f7fa fadd bl 8021e70 80278b6: 7020 strb r0, [r4, #0] 80278b8: bd38 pop {r3, r4, r5, pc} 80278ba: bf00 nop 80278bc: 2000e954 .word 0x2000e954 80278c0: 08036d2e .word 0x08036d2e 080278c4 : /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 80278c4: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.work_time); 80278c6: 4b06 ldr r3, [pc, #24] ; (80278e0 ) /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 80278c8: 4605 mov r5, r0 80278ca: 460c mov r4, r1 sprintf(str, "%d", UPS.work_time); 80278cc: 7c9a ldrb r2, [r3, #18] 80278ce: 4905 ldr r1, [pc, #20] ; (80278e4 ) 80278d0: f7ff ff66 bl 80277a0 *len = strlen(str); 80278d4: 4628 mov r0, r5 80278d6: f7fa facb bl 8021e70 80278da: 7020 strb r0, [r4, #0] 80278dc: bd38 pop {r3, r4, r5, pc} 80278de: bf00 nop 80278e0: 2000e954 .word 0x2000e954 80278e4: 08036d34 .word 0x08036d34 080278e8 : /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 80278e8: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", UPS.Temp); 80278ea: 4b08 ldr r3, [pc, #32] ; (802790c ) /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 80278ec: 4604 mov r4, r0 sprintf(str, "%0.1f", UPS.Temp); 80278ee: 68d8 ldr r0, [r3, #12] /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 80278f0: 460d mov r5, r1 sprintf(str, "%0.1f", UPS.Temp); 80278f2: f7f8 fe11 bl 8020518 <__aeabi_f2d> 80278f6: 4602 mov r2, r0 80278f8: 460b mov r3, r1 80278fa: 4620 mov r0, r4 80278fc: 4904 ldr r1, [pc, #16] ; (8027910 ) 80278fe: f7ff ff4f bl 80277a0 *len = strlen(str); 8027902: 4620 mov r0, r4 8027904: f7fa fab4 bl 8021e70 8027908: 7028 strb r0, [r5, #0] 802790a: bd38 pop {r3, r4, r5, pc} 802790c: 2000e954 .word 0x2000e954 8027910: 08036d2e .word 0x08036d2e 08027914 : // 0 - коннект есть, 1 - нет /* if (upsParams.connect) *str = '0'; else *str = '1';*/ *str = '0'; 8027914: 2330 movs r3, #48 ; 0x30 8027916: 7003 strb r3, [r0, #0] *len = 1; 8027918: 2301 movs r3, #1 802791a: 700b strb r3, [r1, #0] 802791c: 4770 bx lr 802791e: 0000 movs r0, r0 08027920 : /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 8027920: b538 push {r3, r4, r5, lr} sprintf(str, "%d", UPS.Status); 8027922: 4b06 ldr r3, [pc, #24] ; (802793c ) /** * @brief Индикация аварийных ситуаций */ void GetAlarmStr(char *str, uint8_t *len) { 8027924: 4605 mov r5, r0 8027926: 460c mov r4, r1 sprintf(str, "%d", UPS.Status); 8027928: 7cda ldrb r2, [r3, #19] 802792a: 4905 ldr r1, [pc, #20] ; (8027940 ) 802792c: f7ff ff38 bl 80277a0 *len = strlen(str); 8027930: 4628 mov r0, r5 8027932: f7fa fa9d bl 8021e70 8027936: 7020 strb r0, [r4, #0] 8027938: bd38 pop {r3, r4, r5, pc} 802793a: bf00 nop 802793c: 2000e954 .word 0x2000e954 8027940: 08036d34 .word 0x08036d34 08027944 : /** * @brief Дата (Ready for PRS!) */ void GetDateStr(char *str, uint8_t *len) { 8027944: b530 push {r4, r5, lr} 8027946: b087 sub sp, #28 8027948: 4604 mov r4, r0 802794a: 460d mov r5, r1 TM_RTC_t data; uint16_t sys_year ; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 802794c: a802 add r0, sp, #8 802794e: 2100 movs r1, #0 8027950: f7fe fd9a bl 8026488 sys_year = 2000 + data.year; sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 8027954: 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; 8027958: f89d 2011 ldrb.w r2, [sp, #17] sprintf(str, "%04i-%02i-%02i", sys_year, data.month, data.date); 802795c: f89d 3010 ldrb.w r3, [sp, #16] 8027960: 9100 str r1, [sp, #0] 8027962: f502 62fa add.w r2, r2, #2000 ; 0x7d0 8027966: 4905 ldr r1, [pc, #20] ; (802797c ) 8027968: 4620 mov r0, r4 802796a: f7ff ff19 bl 80277a0 *len = strlen(str); 802796e: 4620 mov r0, r4 8027970: f7fa fa7e bl 8021e70 8027974: 7028 strb r0, [r5, #0] } 8027976: b007 add sp, #28 8027978: bd30 pop {r4, r5, pc} 802797a: bf00 nop 802797c: 08036d37 .word 0x08036d37 08027980 : /** * @brief Время (Ready for PRS!) */ void GetTimeStr(char *str, uint8_t *len) { 8027980: b530 push {r4, r5, lr} 8027982: b085 sub sp, #20 8027984: 4604 mov r4, r0 8027986: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8027988: 4668 mov r0, sp 802798a: 2100 movs r1, #0 802798c: f7fe fd7c bl 8026488 sprintf(str, "%02i:%02i", data.hours, data.minutes); 8027990: 4906 ldr r1, [pc, #24] ; (80279ac ) 8027992: f89d 2005 ldrb.w r2, [sp, #5] 8027996: f89d 3004 ldrb.w r3, [sp, #4] 802799a: 4620 mov r0, r4 802799c: f7ff ff00 bl 80277a0 *len = strlen(str); 80279a0: 4620 mov r0, r4 80279a2: f7fa fa65 bl 8021e70 80279a6: 7028 strb r0, [r5, #0] } 80279a8: b005 add sp, #20 80279aa: bd30 pop {r4, r5, pc} 80279ac: 08036d7a .word 0x08036d7a 080279b0 : /** * @brief Время (Ready for PRS!) */ void GetUnixTimeStr(char *str, uint8_t *len) { 80279b0: b530 push {r4, r5, lr} 80279b2: b085 sub sp, #20 80279b4: 4604 mov r4, r0 80279b6: 460d mov r5, r1 TM_RTC_t data; TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 80279b8: 4668 mov r0, sp 80279ba: 2100 movs r1, #0 80279bc: f7fe fd64 bl 8026488 sprintf(str, "%d", data.unix); 80279c0: 4905 ldr r1, [pc, #20] ; (80279d8 ) 80279c2: 9a03 ldr r2, [sp, #12] 80279c4: 4620 mov r0, r4 80279c6: f7ff feeb bl 80277a0 *len = strlen(str); 80279ca: 4620 mov r0, r4 80279cc: f7fa fa50 bl 8021e70 80279d0: 7028 strb r0, [r5, #0] } 80279d2: b005 add sp, #20 80279d4: bd30 pop {r4, r5, pc} 80279d6: bf00 nop 80279d8: 08036d34 .word 0x08036d34 080279dc : /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 80279dc: b538 push {r3, r4, r5, lr} if (sSettings.sSNTP.sntpEnable) 80279de: 4b08 ldr r3, [pc, #32] ; (8027a00 ) 80279e0: f893 3344 ldrb.w r3, [r3, #836] ; 0x344 /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { 80279e4: 460c mov r4, r1 80279e6: 4605 mov r5, r0 if (sSettings.sSNTP.sntpEnable) { sprintf(str, "%s", "1"); //авто 80279e8: 4906 ldr r1, [pc, #24] ; (8027a04 ) /** * @brief Состояние SNTP (Ready for PRS!) */ void GetSntpStateStr(char *str, uint8_t *len) { if (sSettings.sSNTP.sntpEnable) 80279ea: b10b cbz r3, 80279f0 { sprintf(str, "%s", "1"); //авто 80279ec: 4a06 ldr r2, [pc, #24] ; (8027a08 ) 80279ee: e000 b.n 80279f2 *len = strlen(str); } else { sprintf(str, "%s", "0"); //ручной 80279f0: 4a06 ldr r2, [pc, #24] ; (8027a0c ) 80279f2: f7ff fed5 bl 80277a0 *len = strlen(str); 80279f6: 4628 mov r0, r5 80279f8: f7fa fa3a bl 8021e70 80279fc: 7020 strb r0, [r4, #0] 80279fe: bd38 pop {r3, r4, r5, pc} 8027a00: 2000e984 .word 0x2000e984 8027a04: 08036d46 .word 0x08036d46 8027a08: 08036e2f .word 0x08036e2f 8027a0c: 08036dd2 .word 0x08036dd2 08027a10 : /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027a10: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.ip); 8027a12: 4a05 ldr r2, [pc, #20] ; (8027a28 ) /** * @brief IP адрес SNTP сервера (Ready for PRS!) */ void GetSntpServerIpStr(char *str, uint8_t *len) { 8027a14: 4605 mov r5, r0 8027a16: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.ip); 8027a18: 4904 ldr r1, [pc, #16] ; (8027a2c ) 8027a1a: f7ff fec1 bl 80277a0 *len = strlen(str); 8027a1e: 4628 mov r0, r5 8027a20: f7fa fa26 bl 8021e70 8027a24: 7020 strb r0, [r4, #0] 8027a26: bd38 pop {r3, r4, r5, pc} 8027a28: 2000ecc9 .word 0x2000ecc9 8027a2c: 08036d46 .word 0x08036d46 08027a30 : /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027a30: b538 push {r3, r4, r5, lr} sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027a32: 4b09 ldr r3, [pc, #36] ; (8027a58 ) /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027a34: 4604 mov r4, r0 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027a36: f8d3 0374 ldr.w r0, [r3, #884] ; 0x374 /** * @brief Часовой пояс контроллера (Ready for PRS!) */ void GetSntpTimeZoneStr(char *str, uint8_t *len) { 8027a3a: 460d mov r5, r1 sprintf(str, "%0.1f", sSettings.sSNTP.timeZone); 8027a3c: f7f8 fd6c bl 8020518 <__aeabi_f2d> 8027a40: 4602 mov r2, r0 8027a42: 460b mov r3, r1 8027a44: 4620 mov r0, r4 8027a46: 4905 ldr r1, [pc, #20] ; (8027a5c ) 8027a48: f7ff feaa bl 80277a0 *len = strlen(str); 8027a4c: 4620 mov r0, r4 8027a4e: f7fa fa0f bl 8021e70 8027a52: 7028 strb r0, [r5, #0] 8027a54: bd38 pop {r3, r4, r5, pc} 8027a56: bf00 nop 8027a58: 2000e984 .word 0x2000e984 8027a5c: 08036d2e .word 0x08036d2e 08027a60 : /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027a60: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSNTP.data); 8027a62: 4a05 ldr r2, [pc, #20] ; (8027a78 ) /** * @brief Дата последней синхронизации SNTP (Ready for PRS!) */ void GetSntpLastDataStr(char *str, uint8_t *len) { 8027a64: 4605 mov r5, r0 8027a66: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSNTP.data); 8027a68: 4904 ldr r1, [pc, #16] ; (8027a7c ) 8027a6a: f7ff fe99 bl 80277a0 *len = strlen(str); 8027a6e: 4628 mov r0, r5 8027a70: f7fa f9fe bl 8021e70 8027a74: 7020 strb r0, [r4, #0] 8027a76: bd38 pop {r3, r4, r5, pc} 8027a78: 2000ecd9 .word 0x2000ecd9 8027a7c: 08036d46 .word 0x08036d46 08027a80 : /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027a80: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027a82: 4b07 ldr r3, [pc, #28] ; (8027aa0 ) 8027a84: 189a adds r2, r3, r2 /** * @brief Тип действий при срабатывание сухих контактов */ void GetDINTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027a86: 4605 mov r5, r0 8027a88: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.din_type_act[num]); 8027a8a: f892 237a ldrb.w r2, [r2, #890] ; 0x37a 8027a8e: 4905 ldr r1, [pc, #20] ; (8027aa4 ) 8027a90: f7ff fe86 bl 80277a0 *len = strlen(str); 8027a94: 4628 mov r0, r5 8027a96: f7fa f9eb bl 8021e70 8027a9a: 7020 strb r0, [r4, #0] 8027a9c: bd38 pop {r3, r4, r5, pc} 8027a9e: bf00 nop 8027aa0: 2000e984 .word 0x2000e984 8027aa4: 08036d34 .word 0x08036d34 08027aa8 : /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027aa8: 3206 adds r2, #6 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027aaa: b538 push {r3, r4, r5, lr} 8027aac: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027aae: b2d0 uxtb r0, r2 /** * @brief Состояние сухого контакта */ void GetDINStatusStr(char *str, uint8_t *len, uint8_t num) { 8027ab0: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1+num)); 8027ab2: f000 ff89 bl 80289c8 8027ab6: 4905 ldr r1, [pc, #20] ; (8027acc ) 8027ab8: 4602 mov r2, r0 8027aba: 4620 mov r0, r4 8027abc: f7ff fe70 bl 80277a0 *len = strlen(str); 8027ac0: 4620 mov r0, r4 8027ac2: f7fa f9d5 bl 8021e70 8027ac6: 7028 strb r0, [r5, #0] 8027ac8: bd38 pop {r3, r4, r5, pc} 8027aca: bf00 nop 8027acc: 08036d34 .word 0x08036d34 08027ad0 : /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027ad0: b538 push {r3, r4, r5, lr} 8027ad2: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027ad4: 2006 movs r0, #6 /** * @brief Состояние сухого контакта */ void GetDIN0StatusStr(char *str, uint8_t *len) { 8027ad6: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DIN1)); 8027ad8: f000 ff76 bl 80289c8 8027adc: 4904 ldr r1, [pc, #16] ; (8027af0 ) 8027ade: 4602 mov r2, r0 8027ae0: 4620 mov r0, r4 8027ae2: f7ff fe5d bl 80277a0 *len = strlen(str); 8027ae6: 4620 mov r0, r4 8027ae8: f7fa f9c2 bl 8021e70 8027aec: 7028 strb r0, [r5, #0] 8027aee: bd38 pop {r3, r4, r5, pc} 8027af0: 08036d34 .word 0x08036d34 08027af4 : /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027af4: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027af6: 4b07 ldr r3, [pc, #28] ; (8027b14 ) 8027af8: 189a adds r2, r3, r2 /** * @brief Источник срабатывания реле */ void GetROTypeActStr(char *str, uint8_t *len, uint8_t num) { 8027afa: 4605 mov r5, r0 8027afc: 460c mov r4, r1 sprintf(str, "%d", sSettings.sInOuts.ro_type_source[num]); 8027afe: f892 2378 ldrb.w r2, [r2, #888] ; 0x378 8027b02: 4905 ldr r1, [pc, #20] ; (8027b18 ) 8027b04: f7ff fe4c bl 80277a0 *len = strlen(str); 8027b08: 4628 mov r0, r5 8027b0a: f7fa f9b1 bl 8021e70 8027b0e: 7020 strb r0, [r4, #0] 8027b10: bd38 pop {r3, r4, r5, pc} 8027b12: bf00 nop 8027b14: 2000e984 .word 0x2000e984 8027b18: 08036d34 .word 0x08036d34 08027b1c : /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027b1c: 3207 adds r2, #7 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027b1e: b538 push {r3, r4, r5, lr} 8027b20: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027b22: b2d0 uxtb r0, r2 /** * @brief Состояние релейного выхода */ void GetDOUTStatusStr(char *str, uint8_t *len, uint8_t num) { 8027b24: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1+num)); 8027b26: f000 ff4f bl 80289c8 8027b2a: 4905 ldr r1, [pc, #20] ; (8027b40 ) 8027b2c: 4602 mov r2, r0 8027b2e: 4620 mov r0, r4 8027b30: f7ff fe36 bl 80277a0 *len = strlen(str); 8027b34: 4620 mov r0, r4 8027b36: f7fa f99b bl 8021e70 8027b3a: 7028 strb r0, [r5, #0] 8027b3c: bd38 pop {r3, r4, r5, pc} 8027b3e: bf00 nop 8027b40: 08036d34 .word 0x08036d34 08027b44 : /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027b44: b538 push {r3, r4, r5, lr} 8027b46: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027b48: 2007 movs r0, #7 /** * @brief Состояние релейного выхода */ void GetDOUT0StatusStr(char *str, uint8_t *len) { 8027b4a: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT1)); 8027b4c: f000 ff3c bl 80289c8 8027b50: 4904 ldr r1, [pc, #16] ; (8027b64 ) 8027b52: 4602 mov r2, r0 8027b54: 4620 mov r0, r4 8027b56: f7ff fe23 bl 80277a0 *len = strlen(str); 8027b5a: 4620 mov r0, r4 8027b5c: f7fa f988 bl 8021e70 8027b60: 7028 strb r0, [r5, #0] 8027b62: bd38 pop {r3, r4, r5, pc} 8027b64: 08036d34 .word 0x08036d34 08027b68 : /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027b68: b538 push {r3, r4, r5, lr} 8027b6a: 4604 mov r4, r0 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027b6c: 2008 movs r0, #8 /** * @brief Состояние релейного выхода */ void GetDOUT1StatusStr(char *str, uint8_t *len) { 8027b6e: 460d mov r5, r1 sprintf(str, "%d", get_state_din_outs(DOUT2)); 8027b70: f000 ff2a bl 80289c8 8027b74: 4904 ldr r1, [pc, #16] ; (8027b88 ) 8027b76: 4602 mov r2, r0 8027b78: 4620 mov r0, r4 8027b7a: f7ff fe11 bl 80277a0 *len = strlen(str); 8027b7e: 4620 mov r0, r4 8027b80: f7fa f976 bl 8021e70 8027b84: 7028 strb r0, [r5, #0] 8027b86: bd38 pop {r3, r4, r5, pc} 8027b88: 08036d34 .word 0x08036d34 08027b8c : /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027b8c: b57f push {r0, r1, r2, r3, r4, r5, r6, lr} 8027b8e: 4604 mov r4, r0 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027b90: a803 add r0, sp, #12 /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8027b92: 460e mov r6, r1 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 8027b94: f00a fa72 bl 803207c day = tick/8640000; 8027b98: 9803 ldr r0, [sp, #12] tick = tick%8640000; 8027b9a: 4b0c ldr r3, [pc, #48] ; (8027bcc ) hour = tick/360000; tick = tick%360000; 8027b9c: 4d0c ldr r5, [pc, #48] ; (8027bd0 ) snmp_get_sysuptime(&tick); day = tick/8640000; tick = tick%8640000; 8027b9e: fbb0 f2f3 udiv r2, r0, r3 8027ba2: fb03 0012 mls r0, r3, r2, r0 hour = tick/360000; tick = tick%360000; 8027ba6: fbb0 f3f5 udiv r3, r0, r5 8027baa: fb05 0013 mls r0, r5, r3, r0 min = tick/6000; 8027bae: f241 7170 movw r1, #6000 ; 0x1770 day = tick/8640000; tick = tick%8640000; hour = tick/360000; tick = tick%360000; 8027bb2: 9003 str r0, [sp, #12] min = tick/6000; 8027bb4: fbb0 f0f1 udiv r0, r0, r1 sprintf(str, "%d дн. %d ч. %d мин.", day, hour, min); 8027bb8: 9000 str r0, [sp, #0] 8027bba: 4906 ldr r1, [pc, #24] ; (8027bd4 ) 8027bbc: 4620 mov r0, r4 8027bbe: f7ff fdef bl 80277a0 *len = strlen(str); 8027bc2: 4620 mov r0, r4 8027bc4: f7fa f954 bl 8021e70 8027bc8: 7030 strb r0, [r6, #0] } 8027bca: bd7f pop {r0, r1, r2, r3, r4, r5, r6, pc} 8027bcc: 0083d600 .word 0x0083d600 8027bd0: 00057e40 .word 0x00057e40 8027bd4: 08036d49 .word 0x08036d49 08027bd8 : /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027bd8: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysName); 8027bda: 4c07 ldr r4, [pc, #28] ; (8027bf8 ) /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027bdc: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysName); 8027bde: 4620 mov r0, r4 /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 8027be0: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysName); 8027be2: f7fa f945 bl 8021e70 8027be6: 4602 mov r2, r0 8027be8: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysName, *len); 8027bea: 4621 mov r1, r4 8027bec: 4628 mov r0, r5 8027bee: b2d2 uxtb r2, r2 } 8027bf0: 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); 8027bf4: f7fa b9f4 b.w 8021fe0 8027bf8: 2000eae2 .word 0x2000eae2 08027bfc : /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027bfc: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.productionData); 8027bfe: 4c07 ldr r4, [pc, #28] ; (8027c1c ) /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027c00: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.productionData); 8027c02: 4620 mov r0, r4 /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8027c04: 460e mov r6, r1 *len = strlen(sSettings.sInfo.productionData); 8027c06: f7fa f933 bl 8021e70 8027c0a: 4602 mov r2, r0 8027c0c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.productionData, *len); 8027c0e: 4621 mov r1, r4 8027c10: 4628 mov r0, r5 8027c12: b2d2 uxtb r2, r2 } 8027c14: 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); 8027c18: f7fa b9e2 b.w 8021fe0 8027c1c: 2000ebc8 .word 0x2000ebc8 08027c20 : /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027c20: b570 push {r4, r5, r6, lr} *len = strlen(VERSION); 8027c22: 4c07 ldr r4, [pc, #28] ; (8027c40 ) /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027c24: 4605 mov r5, r0 *len = strlen(VERSION); 8027c26: 4620 mov r0, r4 /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8027c28: 460e mov r6, r1 *len = strlen(VERSION); 8027c2a: f7fa f921 bl 8021e70 8027c2e: 4602 mov r2, r0 8027c30: 7030 strb r0, [r6, #0] strncpy(str, VERSION, *len); 8027c32: 4621 mov r1, r4 8027c34: 4628 mov r0, r5 8027c36: b2d2 uxtb r2, r2 } 8027c38: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { *len = strlen(VERSION); strncpy(str, VERSION, *len); 8027c3c: f7fa b9d0 b.w 8021fe0 8027c40: 08036d64 .word 0x08036d64 08027c44 : /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027c44: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.mac); 8027c46: 4c07 ldr r4, [pc, #28] ; (8027c64 ) /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027c48: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.mac); 8027c4a: 4620 mov r0, r4 /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8027c4c: 460e mov r6, r1 *len = strlen(sSettings.sInfo.mac); 8027c4e: f7fa f90f bl 8021e70 8027c52: 4602 mov r2, r0 8027c54: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.mac, *len); 8027c56: 4621 mov r1, r4 8027c58: 4628 mov r0, r5 8027c5a: b2d2 uxtb r2, r2 } 8027c5c: 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); 8027c60: f7fa b9be b.w 8021fe0 8027c64: 2000ebf0 .word 0x2000ebf0 08027c68 : /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027c68: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.serialNumber); 8027c6a: 4c07 ldr r4, [pc, #28] ; (8027c88 ) /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027c6c: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.serialNumber); 8027c6e: 4620 mov r0, r4 /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8027c70: 460e mov r6, r1 *len = strlen(sSettings.sInfo.serialNumber); 8027c72: f7fa f8fd bl 8021e70 8027c76: 4602 mov r2, r0 8027c78: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.serialNumber, *len); 8027c7a: 4621 mov r1, r4 8027c7c: 4628 mov r0, r5 8027c7e: b2d2 uxtb r2, r2 } 8027c80: 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); 8027c84: f7fa b9ac b.w 8021fe0 8027c88: 2000ec02 .word 0x2000ec02 08027c8c : /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027c8c: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysContact); 8027c8e: 4c07 ldr r4, [pc, #28] ; (8027cac ) /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027c90: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysContact); 8027c92: 4620 mov r0, r4 /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8027c94: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysContact); 8027c96: f7fa f8eb bl 8021e70 8027c9a: 4602 mov r2, r0 8027c9c: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysContact, *len); 8027c9e: 4621 mov r1, r4 8027ca0: 4628 mov r0, r5 8027ca2: b2d2 uxtb r2, r2 } 8027ca4: 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); 8027ca8: f7fa b99a b.w 8021fe0 8027cac: 2000eab0 .word 0x2000eab0 08027cb0 : /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027cb0: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysLocation); 8027cb2: 4c07 ldr r4, [pc, #28] ; (8027cd0 ) /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027cb4: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysLocation); 8027cb6: 4620 mov r0, r4 /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 8027cb8: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysLocation); 8027cba: f7fa f8d9 bl 8021e70 8027cbe: 4602 mov r2, r0 8027cc0: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysLocation, *len); 8027cc2: 4621 mov r1, r4 8027cc4: 4628 mov r0, r5 8027cc6: b2d2 uxtb r2, r2 } 8027cc8: 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); 8027ccc: f7fa b988 b.w 8021fe0 8027cd0: 2000eaf6 .word 0x2000eaf6 08027cd4 : /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027cd4: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.comments); 8027cd6: 4c07 ldr r4, [pc, #28] ; (8027cf4 ) /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027cd8: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.comments); 8027cda: 4620 mov r0, r4 /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 8027cdc: 460e mov r6, r1 *len = strlen(sSettings.sInfo.comments); 8027cde: f7fa f8c7 bl 8021e70 8027ce2: 4602 mov r2, r0 8027ce4: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.comments, *len); 8027ce6: 4621 mov r1, r4 8027ce8: 4628 mov r0, r5 8027cea: b2d2 uxtb r2, r2 } 8027cec: 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); 8027cf0: f7fa b976 b.w 8021fe0 8027cf4: 2000ec12 .word 0x2000ec12 08027cf8 : /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027cf8: b570 push {r4, r5, r6, lr} *len = strlen(UPS.model); 8027cfa: 4c07 ldr r4, [pc, #28] ; (8027d18 ) /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027cfc: 4605 mov r5, r0 *len = strlen(UPS.model); 8027cfe: 4620 mov r0, r4 /** * @brief Модель UPS */ void GetUPSModelStr(char *str, uint8_t *len) { 8027d00: 460e mov r6, r1 *len = strlen(UPS.model); 8027d02: f7fa f8b5 bl 8021e70 8027d06: 4602 mov r2, r0 8027d08: 7030 strb r0, [r6, #0] strncpy(str, UPS.model, *len); 8027d0a: 4621 mov r1, r4 8027d0c: 4628 mov r0, r5 8027d0e: b2d2 uxtb r2, r2 } 8027d10: 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); 8027d14: f7fa b964 b.w 8021fe0 8027d18: 2000e968 .word 0x2000e968 08027d1c : /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027d1c: b570 push {r4, r5, r6, lr} *len = strlen(UPS.vertion); 8027d1e: 4c07 ldr r4, [pc, #28] ; (8027d3c ) /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027d20: 4605 mov r5, r0 *len = strlen(UPS.vertion); 8027d22: 4620 mov r0, r4 /** * @brief Версия UPS ПО */ void GetUPSVersionStr(char *str, uint8_t *len) // + { 8027d24: 460e mov r6, r1 *len = strlen(UPS.vertion); 8027d26: f7fa f8a3 bl 8021e70 8027d2a: 4602 mov r2, r0 8027d2c: 7030 strb r0, [r6, #0] strncpy(str, UPS.vertion, *len); 8027d2e: 4621 mov r1, r4 8027d30: 4628 mov r0, r5 8027d32: b2d2 uxtb r2, r2 } 8027d34: 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); 8027d38: f7fa b952 b.w 8021fe0 8027d3c: 2000e973 .word 0x2000e973 08027d40 : // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027d40: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027d42: 4b08 ldr r3, [pc, #32] ; (8027d64 ) // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027d44: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027d46: 2217 movs r2, #23 8027d48: fb02 3200 mla r2, r2, r0, r3 // ************************************************************************** // // Настройки аутентификации void GetUserLogin(uint8_t user_id, char *str, uint8_t *len) { 8027d4c: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].login); 8027d4e: 4608 mov r0, r1 8027d50: 3205 adds r2, #5 8027d52: 4905 ldr r1, [pc, #20] ; (8027d68 ) 8027d54: f7ff fd24 bl 80277a0 *len = strlen(str); 8027d58: 4620 mov r0, r4 8027d5a: f7fa f889 bl 8021e70 8027d5e: 7028 strb r0, [r5, #0] 8027d60: bd38 pop {r3, r4, r5, pc} 8027d62: bf00 nop 8027d64: 2000ec94 .word 0x2000ec94 8027d68: 08036d46 .word 0x08036d46 08027d6c : } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8027d6c: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027d6e: 4b08 ldr r3, [pc, #32] ; (8027d90 ) sprintf(str, "%s", sSettings.sAuth[user_id].login); *len = strlen(str); } void GetUserPassword(uint8_t user_id, char *str, uint8_t *len) { 8027d70: 4615 mov r5, r2 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027d72: 2217 movs r2, #23 8027d74: 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) { 8027d78: 460c mov r4, r1 sprintf(str, "%s", sSettings.sAuth[user_id].password); 8027d7a: 4608 mov r0, r1 8027d7c: 3208 adds r2, #8 8027d7e: 4905 ldr r1, [pc, #20] ; (8027d94 ) 8027d80: f7ff fd0e bl 80277a0 *len = strlen(str); 8027d84: 4620 mov r0, r4 8027d86: f7fa f873 bl 8021e70 8027d8a: 7028 strb r0, [r5, #0] 8027d8c: bd38 pop {r3, r4, r5, pc} 8027d8e: bf00 nop 8027d90: 2000ec9c .word 0x2000ec9c 8027d94: 08036d46 .word 0x08036d46 08027d98 : *len = strlen(str); } void GetUserLevelInt(uint8_t user_id, uint8_t *value) { *value = sSettings.sAuth[user_id].level; 8027d98: 4b03 ldr r3, [pc, #12] ; (8027da8 ) 8027d9a: 2217 movs r2, #23 8027d9c: fb02 3000 mla r0, r2, r0, r3 8027da0: f890 3314 ldrb.w r3, [r0, #788] ; 0x314 8027da4: 700b strb r3, [r1, #0] 8027da6: 4770 bx lr 8027da8: 2000e984 .word 0x2000e984 08027dac : * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027dac: 4a08 ldr r2, [pc, #32] ; (8027dd0 ) /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8027dae: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027db0: f892 32fc ldrb.w r3, [r2, #764] ; 0x2fc /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8027db4: 460c mov r4, r1 8027db6: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.ip); 8027db8: 4906 ldr r1, [pc, #24] ; (8027dd4 ) * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027dba: b10b cbz r3, 8027dc0 sprintf(str, "%s", sSettings.sWebTempParams.ip); 8027dbc: 3233 adds r2, #51 ; 0x33 8027dbe: e000 b.n 8027dc2 else sprintf(str, "%s", sSettings.sWebParams.ip); 8027dc0: 3202 adds r2, #2 8027dc2: f7ff fced bl 80277a0 *len = strlen(str); 8027dc6: 4628 mov r0, r5 8027dc8: f7fa f852 bl 8021e70 8027dcc: 7020 strb r0, [r4, #0] 8027dce: bd38 pop {r3, r4, r5, pc} 8027dd0: 2000e984 .word 0x2000e984 8027dd4: 08036d46 .word 0x08036d46 08027dd8 : * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027dd8: 4a08 ldr r2, [pc, #32] ; (8027dfc ) /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8027dda: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027ddc: f892 32fc ldrb.w r3, [r2, #764] ; 0x2fc /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8027de0: 460c mov r4, r1 8027de2: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.gate); 8027de4: 4906 ldr r1, [pc, #24] ; (8027e00 ) * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027de6: b10b cbz r3, 8027dec sprintf(str, "%s", sSettings.sWebTempParams.gate); 8027de8: 3243 adds r2, #67 ; 0x43 8027dea: e000 b.n 8027dee else sprintf(str, "%s", sSettings.sWebParams.gate); 8027dec: 3212 adds r2, #18 8027dee: f7ff fcd7 bl 80277a0 *len = strlen(str); 8027df2: 4628 mov r0, r5 8027df4: f7fa f83c bl 8021e70 8027df8: 7020 strb r0, [r4, #0] 8027dfa: bd38 pop {r3, r4, r5, pc} 8027dfc: 2000e984 .word 0x2000e984 8027e00: 08036d46 .word 0x08036d46 08027e04 : * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e04: 4a08 ldr r2, [pc, #32] ; (8027e28 ) /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8027e06: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e08: f892 32fc ldrb.w r3, [r2, #764] ; 0x2fc /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8027e0c: 460c mov r4, r1 8027e0e: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.mask); 8027e10: 4906 ldr r1, [pc, #24] ; (8027e2c ) * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e12: b10b cbz r3, 8027e18 sprintf(str, "%s", sSettings.sWebTempParams.mask); 8027e14: 3253 adds r2, #83 ; 0x53 8027e16: e000 b.n 8027e1a else sprintf(str, "%s", sSettings.sWebParams.mask); 8027e18: 3222 adds r2, #34 ; 0x22 8027e1a: f7ff fcc1 bl 80277a0 *len = strlen(str); 8027e1e: 4628 mov r0, r5 8027e20: f7fa f826 bl 8021e70 8027e24: 7020 strb r0, [r4, #0] 8027e26: bd38 pop {r3, r4, r5, pc} 8027e28: 2000e984 .word 0x2000e984 8027e2c: 08036d46 .word 0x08036d46 08027e30 : * @brief Настройка DHCP */ void GetDhcpStateStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8027e30: 4b08 ldr r3, [pc, #32] ; (8027e54 ) 8027e32: f893 22fc ldrb.w r2, [r3, #764] ; 0x2fc 8027e36: b112 cbz r2, 8027e3e { if (sSettings.sWebTempParams.dhcpEnable) 8027e38: f893 3063 ldrb.w r3, [r3, #99] ; 0x63 8027e3c: e001 b.n 8027e42 else *str = '0'; } else { if (sSettings.sWebParams.dhcpEnable) 8027e3e: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8027e42: b10b cbz r3, 8027e48 *str = '1'; 8027e44: 2331 movs r3, #49 ; 0x31 8027e46: e000 b.n 8027e4a else *str = '0'; 8027e48: 2330 movs r3, #48 ; 0x30 8027e4a: 7003 strb r3, [r0, #0] } *len = 1; 8027e4c: 2301 movs r3, #1 8027e4e: 700b strb r3, [r1, #0] 8027e50: 4770 bx lr 8027e52: bf00 nop 8027e54: 2000e984 .word 0x2000e984 08027e58 : /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 8027e58: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8027e5a: 4a05 ldr r2, [pc, #20] ; (8027e70 ) /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 8027e5c: 4605 mov r5, r0 8027e5e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.readCommunity); 8027e60: 4904 ldr r1, [pc, #16] ; (8027e74 ) 8027e62: f7ff fc9d bl 80277a0 *len = strlen(str); 8027e66: 4628 mov r0, r5 8027e68: f7fa f802 bl 8021e70 8027e6c: 7020 strb r0, [r4, #0] 8027e6e: bd38 pop {r3, r4, r5, pc} 8027e70: 2000ea88 .word 0x2000ea88 8027e74: 08036d46 .word 0x08036d46 08027e78 : /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 8027e78: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8027e7a: 4a05 ldr r2, [pc, #20] ; (8027e90 ) /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 8027e7c: 4605 mov r5, r0 8027e7e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 8027e80: 4904 ldr r1, [pc, #16] ; (8027e94 ) 8027e82: f7ff fc8d bl 80277a0 *len = strlen(str); 8027e86: 4628 mov r0, r5 8027e88: f7f9 fff2 bl 8021e70 8027e8c: 7020 strb r0, [r4, #0] 8027e8e: bd38 pop {r3, r4, r5, pc} 8027e90: 2000ea9c .word 0x2000ea9c 8027e94: 08036d46 .word 0x08036d46 08027e98 : /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8027e98: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP); 8027e9a: 4a05 ldr r2, [pc, #20] ; (8027eb0 ) /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 8027e9c: 4605 mov r5, r0 8027e9e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP); 8027ea0: 4904 ldr r1, [pc, #16] ; (8027eb4 ) 8027ea2: f7ff fc7d bl 80277a0 *len = strlen(str); 8027ea6: 4628 mov r0, r5 8027ea8: f7f9 ffe2 bl 8021e70 8027eac: 7020 strb r0, [r4, #0] 8027eae: bd38 pop {r3, r4, r5, pc} 8027eb0: 2000eb64 .word 0x2000eb64 8027eb4: 08036d46 .word 0x08036d46 08027eb8 : } void GetManagerIp2(char *str, uint8_t *len) { 8027eb8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8027eba: 4a05 ldr r2, [pc, #20] ; (8027ed0 ) sprintf(str, "%s", sSettings.sSnmp.managerIP); *len = strlen(str); } void GetManagerIp2(char *str, uint8_t *len) { 8027ebc: 4605 mov r5, r0 8027ebe: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8027ec0: 4904 ldr r1, [pc, #16] ; (8027ed4 ) 8027ec2: f7ff fc6d bl 80277a0 *len = strlen(str); 8027ec6: 4628 mov r0, r5 8027ec8: f7f9 ffd2 bl 8021e70 8027ecc: 7020 strb r0, [r4, #0] 8027ece: bd38 pop {r3, r4, r5, pc} 8027ed0: 2000eb78 .word 0x2000eb78 8027ed4: 08036d46 .word 0x08036d46 08027ed8 : } void GetManagerIp3(char *str, uint8_t *len) { 8027ed8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8027eda: 4a05 ldr r2, [pc, #20] ; (8027ef0 ) sprintf(str, "%s", sSettings.sSnmp.managerIP2); *len = strlen(str); } void GetManagerIp3(char *str, uint8_t *len) { 8027edc: 4605 mov r5, r0 8027ede: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8027ee0: 4904 ldr r1, [pc, #16] ; (8027ef4 ) 8027ee2: f7ff fc5d bl 80277a0 *len = strlen(str); 8027ee6: 4628 mov r0, r5 8027ee8: f7f9 ffc2 bl 8021e70 8027eec: 7020 strb r0, [r4, #0] 8027eee: bd38 pop {r3, r4, r5, pc} 8027ef0: 2000eb8c .word 0x2000eb8c 8027ef4: 08036d46 .word 0x08036d46 08027ef8 : } void GetManagerIp4(char *str, uint8_t *len) { 8027ef8: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8027efa: 4a05 ldr r2, [pc, #20] ; (8027f10 ) sprintf(str, "%s", sSettings.sSnmp.managerIP3); *len = strlen(str); } void GetManagerIp4(char *str, uint8_t *len) { 8027efc: 4605 mov r5, r0 8027efe: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP4); 8027f00: 4904 ldr r1, [pc, #16] ; (8027f14 ) 8027f02: f7ff fc4d bl 80277a0 *len = strlen(str); 8027f06: 4628 mov r0, r5 8027f08: f7f9 ffb2 bl 8021e70 8027f0c: 7020 strb r0, [r4, #0] 8027f0e: bd38 pop {r3, r4, r5, pc} 8027f10: 2000eba0 .word 0x2000eba0 8027f14: 08036d46 .word 0x08036d46 08027f18 : } void GetManagerIp5(char *str, uint8_t *len) { 8027f18: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP5); 8027f1a: 4a05 ldr r2, [pc, #20] ; (8027f30 ) sprintf(str, "%s", sSettings.sSnmp.managerIP4); *len = strlen(str); } void GetManagerIp5(char *str, uint8_t *len) { 8027f1c: 4605 mov r5, r0 8027f1e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP5); 8027f20: 4904 ldr r1, [pc, #16] ; (8027f34 ) 8027f22: f7ff fc3d bl 80277a0 *len = strlen(str); 8027f26: 4628 mov r0, r5 8027f28: f7f9 ffa2 bl 8021e70 8027f2c: 7020 strb r0, [r4, #0] 8027f2e: bd38 pop {r3, r4, r5, pc} 8027f30: 2000ebb4 .word 0x2000ebb4 8027f34: 08036d46 .word 0x08036d46 08027f38 : /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 8027f38: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 8027f3a: 4a05 ldr r2, [pc, #20] ; (8027f50 ) /** * @brief Текущий IP адрес */ void GetRDSIpStr(char *str, uint8_t *len) { 8027f3c: 4605 mov r5, r0 8027f3e: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.ServerIP); 8027f40: 4904 ldr r1, [pc, #16] ; (8027f54 ) 8027f42: f7ff fc2d bl 80277a0 *len = strlen(str); 8027f46: 4628 mov r0, r5 8027f48: f7f9 ff92 bl 8021e70 8027f4c: 7020 strb r0, [r4, #0] 8027f4e: bd38 pop {r3, r4, r5, pc} 8027f50: 2000ed00 .word 0x2000ed00 8027f54: 08036d46 .word 0x08036d46 08027f58 : /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 8027f58: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.port); 8027f5a: 4b06 ldr r3, [pc, #24] ; (8027f74 ) /** * @brief Текущий Порт */ void GetRDSPortStr(char *str, uint8_t *len) { 8027f5c: 4605 mov r5, r0 8027f5e: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.port); 8027f60: f8d3 23a0 ldr.w r2, [r3, #928] ; 0x3a0 8027f64: 4904 ldr r1, [pc, #16] ; (8027f78 ) 8027f66: f7ff fc1b bl 80277a0 *len = strlen(str); 8027f6a: 4628 mov r0, r5 8027f6c: f7f9 ff80 bl 8021e70 8027f70: 7020 strb r0, [r4, #0] 8027f72: bd38 pop {r3, r4, r5, pc} 8027f74: 2000e984 .word 0x2000e984 8027f78: 08036d34 .word 0x08036d34 08027f7c : /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 8027f7c: b538 push {r3, r4, r5, lr} sprintf(str, "%d", sSettings.sRADIUS.key_access); 8027f7e: 4b06 ldr r3, [pc, #24] ; (8027f98 ) /** * @brief Текущий Код access */ void GetRDSKeyAccesstStr(char *str, uint8_t *len) { 8027f80: 4605 mov r5, r0 8027f82: 460c mov r4, r1 sprintf(str, "%d", sSettings.sRADIUS.key_access); 8027f84: f8d3 23a4 ldr.w r2, [r3, #932] ; 0x3a4 8027f88: 4904 ldr r1, [pc, #16] ; (8027f9c ) 8027f8a: f7ff fc09 bl 80277a0 *len = strlen(str); 8027f8e: 4628 mov r0, r5 8027f90: f7f9 ff6e bl 8021e70 8027f94: 7020 strb r0, [r4, #0] 8027f96: bd38 pop {r3, r4, r5, pc} 8027f98: 2000e984 .word 0x2000e984 8027f9c: 08036d34 .word 0x08036d34 08027fa0 : /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8027fa0: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8027fa2: 4a05 ldr r2, [pc, #20] ; (8027fb8 ) /** * @brief Текущая пароль RADIUS */ void GetRDSPasswordkStr(char *str, uint8_t *len) { 8027fa4: 4605 mov r5, r0 8027fa6: 460c mov r4, r1 sprintf(str, "%s", sSettings.sRADIUS.rds_password); 8027fa8: 4904 ldr r1, [pc, #16] ; (8027fbc ) 8027faa: f7ff fbf9 bl 80277a0 *len = strlen(str); 8027fae: 4628 mov r0, r5 8027fb0: f7f9 ff5e bl 8021e70 8027fb4: 7020 strb r0, [r4, #0] 8027fb6: bd38 pop {r3, r4, r5, pc} 8027fb8: 2000ed10 .word 0x2000ed10 8027fbc: 08036d46 .word 0x08036d46 08027fc0 : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void GetRDSEnableStateStr(char *str, uint8_t *len) { if (sSettings.sRADIUS.RDSEnable) 8027fc0: 4b05 ldr r3, [pc, #20] ; (8027fd8 ) 8027fc2: f893 339d ldrb.w r3, [r3, #925] ; 0x39d 8027fc6: b10b cbz r3, 8027fcc *str = '1'; 8027fc8: 2331 movs r3, #49 ; 0x31 8027fca: e000 b.n 8027fce else *str = '0'; 8027fcc: 2330 movs r3, #48 ; 0x30 8027fce: 7003 strb r3, [r0, #0] *len = 1; 8027fd0: 2301 movs r3, #1 8027fd2: 700b strb r3, [r1, #0] 8027fd4: 4770 bx lr 8027fd6: bf00 nop 8027fd8: 2000e984 .word 0x2000e984 08027fdc : /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 8027fdc: b538 push {r3, r4, r5, lr} if (sSettings.sFlags.netsettingsChanged) 8027fde: 4b08 ldr r3, [pc, #32] ; (8028000 ) 8027fe0: f893 32fc ldrb.w r3, [r3, #764] ; 0x2fc /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 8027fe4: 460c mov r4, r1 8027fe6: 4605 mov r5, r0 if (sSettings.sFlags.netsettingsChanged) { sprintf(str, "%s", "true"); 8027fe8: 4906 ldr r1, [pc, #24] ; (8028004 ) /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { if (sSettings.sFlags.netsettingsChanged) 8027fea: b10b cbz r3, 8027ff0 { sprintf(str, "%s", "true"); 8027fec: 4a06 ldr r2, [pc, #24] ; (8028008 ) 8027fee: e000 b.n 8027ff2 *len = strlen(str); } else { sprintf(str, "%s", "false"); 8027ff0: 4a06 ldr r2, [pc, #24] ; (802800c ) 8027ff2: f7ff fbd5 bl 80277a0 *len = strlen(str); 8027ff6: 4628 mov r0, r5 8027ff8: f7f9 ff3a bl 8021e70 8027ffc: 7020 strb r0, [r4, #0] 8027ffe: bd38 pop {r3, r4, r5, pc} 8028000: 2000e984 .word 0x2000e984 8028004: 08036d46 .word 0x08036d46 8028008: 08036d68 .word 0x08036d68 802800c: 08036d6d .word 0x08036d6d 08028010 : * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 8028010: 2001 movs r0, #1 /** * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { 8028012: b508 push {r3, lr} /* Set loadMode = 1 */ RTC_WriteBackupRegister(RTC_BKP_DR1, 1); 8028014: 4601 mov r1, r0 8028016: f7fd fd6b bl 8025af0 /* Set bootTry = 0 */ RTC_WriteBackupRegister(RTC_BKP_DR2, 0); 802801a: 2002 movs r0, #2 802801c: 2100 movs r1, #0 } 802801e: 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); 8028022: f7fd bd65 b.w 8025af0 8028026: 0000 movs r0, r0 08028028 : /** * @brief Установить признак изменения сетевых параметров */ void SetWebReinitFlag(bool value) { sSettings.sFlags.netsettingsChanged = value; 8028028: 4b01 ldr r3, [pc, #4] ; (8028030 ) 802802a: f883 02fc strb.w r0, [r3, #764] ; 0x2fc 802802e: 4770 bx lr 8028030: 2000e984 .word 0x2000e984 08028034 : /** * @brief Установить флаг подтверждения сетевых настроек пользователем */ void SetConfirmWebParamsFlag(void) { fConfirmWebParams = true; 8028034: 4b01 ldr r3, [pc, #4] ; (802803c ) 8028036: 2201 movs r2, #1 8028038: 701a strb r2, [r3, #0] 802803a: 4770 bx lr 802803c: 20002934 .word 0x20002934 08028040 : // Сетевые параметры /** * @brief IP адрес */ void SetIPStr(char *str) { 8028040: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.ip, str); strcpy(sSettings.sWebTempParams.ip, str); 8028042: 4801 ldr r0, [pc, #4] ; (8028048 ) 8028044: f7f9 beb6 b.w 8021db4 8028048: 2000e9b7 .word 0x2000e9b7 0802804c : /** * @brief Шлюз */ void SetGatewayStr(char *str) { 802804c: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.gate, str); strcpy(sSettings.sWebTempParams.gate, str); 802804e: 4801 ldr r0, [pc, #4] ; (8028054 ) 8028050: f7f9 beb0 b.w 8021db4 8028054: 2000e9c7 .word 0x2000e9c7 08028058 : /** * @brief Текущая маска подсети */ void SetMaskStr(char *str) { 8028058: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.mask, str); strcpy(sSettings.sWebTempParams.mask, str); 802805a: 4801 ldr r0, [pc, #4] ; (8028060 ) 802805c: f7f9 beaa b.w 8021db4 8028060: 2000e9d7 .word 0x2000e9d7 08028064 : /** * @brief Настройка DHCP */ void SetDhcpStateStr(char *str) { 8028064: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 8028066: 4906 ldr r1, [pc, #24] ; (8028080 ) 8028068: 2202 movs r2, #2 802806a: f7f9 ff63 bl 8021f34 802806e: 4b05 ldr r3, [pc, #20] ; (8028084 ) 8028070: b908 cbnz r0, 8028076 //sSettings.sWebParams.dhcpEnable = 1; sSettings.sWebTempParams.dhcpEnable = 1; 8028072: 2201 movs r2, #1 8028074: e000 b.n 8028078 else //sSettings.sWebParams.dhcpEnable = 0; sSettings.sWebTempParams.dhcpEnable = 0; 8028076: 2200 movs r2, #0 8028078: f883 2063 strb.w r2, [r3, #99] ; 0x63 802807c: bd08 pop {r3, pc} 802807e: bf00 nop 8028080: 08036d73 .word 0x08036d73 8028084: 2000e984 .word 0x2000e984 08028088 : /** * @brief Community для чтения */ void SetReadCommunity(char *str) { 8028088: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, str); 802808a: 4801 ldr r0, [pc, #4] ; (8028090 ) 802808c: f7f9 be92 b.w 8021db4 8028090: 2000ea88 .word 0x2000ea88 08028094 : /** * @brief Community для записи */ void SetWriteCommunity(char *str) { 8028094: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, str); 8028096: 4801 ldr r0, [pc, #4] ; (802809c ) 8028098: f7f9 be8c b.w 8021db4 802809c: 2000ea9c .word 0x2000ea9c 080280a0 : /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 80280a0: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP, str); 80280a2: 4c05 ldr r4, [pc, #20] ; (80280b8 ) /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 80280a4: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP, str); 80280a6: 4620 mov r0, r4 80280a8: f7f9 fe84 bl 8021db4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80280ac: 4620 mov r0, r4 } 80280ae: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 80280b2: f00d bced b.w 8035a90 80280b6: bf00 nop 80280b8: 2000eb64 .word 0x2000eb64 080280bc : } void SetManagerIp2(char *str) { 80280bc: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP2, str); 80280be: 4c05 ldr r4, [pc, #20] ; (80280d4 ) strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); } void SetManagerIp2(char *str) { 80280c0: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP2, str); 80280c2: 4620 mov r0, r4 80280c4: f7f9 fe76 bl 8021db4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 80280c8: 4620 mov r0, r4 } 80280ca: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp2(char *str) { strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 80280ce: f00d bcdf b.w 8035a90 80280d2: bf00 nop 80280d4: 2000eb78 .word 0x2000eb78 080280d8 : } void SetManagerIp3(char *str) { 80280d8: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP3, str); 80280da: 4c05 ldr r4, [pc, #20] ; (80280f0 ) strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); } void SetManagerIp3(char *str) { 80280dc: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP3, str); 80280de: 4620 mov r0, r4 80280e0: f7f9 fe68 bl 8021db4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80280e4: 4620 mov r0, r4 } 80280e6: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp3(char *str) { strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 80280ea: f00d bcd1 b.w 8035a90 80280ee: bf00 nop 80280f0: 2000eb8c .word 0x2000eb8c 080280f4 : } void SetManagerIp4(char *str) { 80280f4: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP4, str); 80280f6: 4c05 ldr r4, [pc, #20] ; (802810c ) strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); } void SetManagerIp4(char *str) { 80280f8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP4, str); 80280fa: 4620 mov r0, r4 80280fc: f7f9 fe5a bl 8021db4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8028100: 4620 mov r0, r4 } 8028102: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp4(char *str) { strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); 8028106: f00d bcc3 b.w 8035a90 802810a: bf00 nop 802810c: 2000eba0 .word 0x2000eba0 08028110 : } void SetManagerIp5(char *str) { 8028110: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP5, str); 8028112: 4c05 ldr r4, [pc, #20] ; (8028128 ) strcpy(sSettings.sSnmp.managerIP4, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP4); } void SetManagerIp5(char *str) { 8028114: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP5, str); 8028116: 4620 mov r0, r4 8028118: f7f9 fe4c bl 8021db4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 802811c: 4620 mov r0, r4 } 802811e: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp5(char *str) { strcpy(sSettings.sSnmp.managerIP5, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP5); 8028122: f00d bcb5 b.w 8035a90 8028126: bf00 nop 8028128: 2000ebb4 .word 0x2000ebb4 0802812c : /** * @brief Установить владельца */ void SetOwner(char *str) { 802812c: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysContact, str); 802812e: 4c06 ldr r4, [pc, #24] ; (8028148 ) /** * @brief Установить владельца */ void SetOwner(char *str) { 8028130: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysContact, str); 8028132: 4620 mov r0, r4 8028134: f7f9 fe3e bl 8021db4 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 8028138: 4620 mov r0, r4 802813a: f00d fc7f bl 8035a3c SNMP_SetObjDescr(); } 802813e: e8bd 4010 ldmia.w sp!, {r4, lr} */ void SetOwner(char *str) { strcpy(sSettings.sSnmp.sysContact, str); SNMP_SetSysContact(sSettings.sSnmp.sysContact); SNMP_SetObjDescr(); 8028142: f00d bc39 b.w 80359b8 8028146: bf00 nop 8028148: 2000eab0 .word 0x2000eab0 0802814c : /** * @brief Установить местоположение */ void SetLocation(char *str) { 802814c: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysLocation, str); 802814e: 4c05 ldr r4, [pc, #20] ; (8028164 ) /** * @brief Установить местоположение */ void SetLocation(char *str) { 8028150: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysLocation, str); 8028152: 4620 mov r0, r4 8028154: f7f9 fe2e bl 8021db4 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 8028158: 4620 mov r0, r4 } 802815a: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief Установить местоположение */ void SetLocation(char *str) { strcpy(sSettings.sSnmp.sysLocation, str); SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 802815e: f00d bc89 b.w 8035a74 8028162: bf00 nop 8028164: 2000eaf6 .word 0x2000eaf6 08028168 : /** * @brief Установить комментарий */ void SetComment(char *str) { 8028168: 4601 mov r1, r0 strcpy(sSettings.sInfo.comments, str); 802816a: 4801 ldr r0, [pc, #4] ; (8028170 ) 802816c: f7f9 be22 b.w 8021db4 8028170: 2000ec12 .word 0x2000ec12 08028174 : // Сетевые параметры RADIUS сервера /** * @brief IP адрес */ void SetRDSIpStr(char *str) { 8028174: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.ServerIP, str); 8028176: 4801 ldr r0, [pc, #4] ; (802817c ) 8028178: f7f9 be1c b.w 8021db4 802817c: 2000ed00 .word 0x2000ed00 08028180 : /** * @brief Порт */ void SetRDSPortStr(char *str) { 8028180: b508 push {r3, lr} sSettings.sRADIUS.port = atoi(str); 8028182: f7f9 fb7d bl 8021880 8028186: 4b02 ldr r3, [pc, #8] ; (8028190 ) 8028188: f8c3 03a0 str.w r0, [r3, #928] ; 0x3a0 802818c: bd08 pop {r3, pc} 802818e: bf00 nop 8028190: 2000e984 .word 0x2000e984 08028194 : /** * @brief Код access */ void SetRDSKeyAccesstStr(char *str) { 8028194: b508 push {r3, lr} sSettings.sRADIUS.key_access = atoi(str); 8028196: f7f9 fb73 bl 8021880 802819a: 4b02 ldr r3, [pc, #8] ; (80281a4 ) 802819c: f8c3 03a4 str.w r0, [r3, #932] ; 0x3a4 80281a0: bd08 pop {r3, pc} 80281a2: bf00 nop 80281a4: 2000e984 .word 0x2000e984 080281a8 : /** * @brief пароль RADIUS */ void SetRDSPasswordkStr(char *str) { 80281a8: 4601 mov r1, r0 strcpy(sSettings.sRADIUS.rds_password, str); 80281aa: 4801 ldr r0, [pc, #4] ; (80281b0 ) 80281ac: f7f9 be02 b.w 8021db4 80281b0: 2000ed10 .word 0x2000ed10 080281b4 : /** * @brief Настройка вкл/ выкл RADIUS сервера */ void SetRDSEnableStateStr(char *str) { 80281b4: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 80281b6: 4906 ldr r1, [pc, #24] ; (80281d0 ) 80281b8: 2202 movs r2, #2 80281ba: f7f9 febb bl 8021f34 80281be: 4b05 ldr r3, [pc, #20] ; (80281d4 ) 80281c0: b908 cbnz r0, 80281c6 sSettings.sRADIUS.RDSEnable = 1; 80281c2: 2201 movs r2, #1 80281c4: e000 b.n 80281c8 else sSettings.sRADIUS.RDSEnable = 0; 80281c6: 2200 movs r2, #0 80281c8: f883 239d strb.w r2, [r3, #925] ; 0x39d 80281cc: bd08 pop {r3, pc} 80281ce: bf00 nop 80281d0: 08036d73 .word 0x08036d73 80281d4: 2000e984 .word 0x2000e984 080281d8 : /** * @brief Дата */ void SetDateStr(char *str) { 80281d8: b510 push {r4, lr} 80281da: b08c sub sp, #48 ; 0x30 80281dc: 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); 80281de: 2100 movs r1, #0 80281e0: 2212 movs r2, #18 80281e2: a807 add r0, sp, #28 80281e4: f7f9 fc6c bl 8021ac0 memset(str_time, 0, 9); 80281e8: 2100 movs r1, #0 80281ea: 2209 movs r2, #9 80281ec: 4668 mov r0, sp 80281ee: f7f9 fc67 bl 8021ac0 str += 2; strncpy(str_data, (str + 6), 2); 80281f2: f104 0108 add.w r1, r4, #8 80281f6: 2202 movs r2, #2 80281f8: a807 add r0, sp, #28 80281fa: f7f9 fef1 bl 8021fe0 strncat(str_data, (str + 2), 4); 80281fe: 1d21 adds r1, r4, #4 8028200: 2204 movs r2, #4 8028202: a807 add r0, sp, #28 8028204: f7f9 fe64 bl 8021ed0 strncat(str_data, str, 2); 8028208: 2202 movs r2, #2 802820a: 1ca1 adds r1, r4, #2 802820c: a807 add r0, sp, #28 802820e: f7f9 fe5f bl 8021ed0 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 8028212: a803 add r0, sp, #12 8028214: 2100 movs r1, #0 8028216: f7fe f937 bl 8026488 sprintf(str_time, "-01-%02i:%02i", tmp_data.hours, tmp_data.minutes); 802821a: f89d 2011 ldrb.w r2, [sp, #17] 802821e: f89d 3010 ldrb.w r3, [sp, #16] 8028222: 4908 ldr r1, [pc, #32] ; (8028244 ) 8028224: 4668 mov r0, sp 8028226: f7ff fabb bl 80277a0 len = strlen(str_time); 802822a: 4668 mov r0, sp 802822c: f7f9 fe20 bl 8021e70 strncat(str_data, str_time, len); 8028230: 4669 mov r1, sp 8028232: b2c2 uxtb r2, r0 8028234: a807 add r0, sp, #28 8028236: f7f9 fe4b bl 8021ed0 TM_RTC_SetDateTimeString(&str_data); 802823a: a807 add r0, sp, #28 802823c: f7fe f80a bl 8026254 } 8028240: b00c add sp, #48 ; 0x30 8028242: bd10 pop {r4, pc} 8028244: 08036d76 .word 0x08036d76 08028248 : /** * @brief Время */ void SetTimeStr(char *str) { 8028248: b510 push {r4, lr} 802824a: b090 sub sp, #64 ; 0x40 802824c: 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); 802824e: 2100 movs r1, #0 8028250: 2212 movs r2, #18 8028252: a80b add r0, sp, #44 ; 0x2c 8028254: f7f9 fc34 bl 8021ac0 memset(str_date, 0, 14); 8028258: 220e movs r2, #14 802825a: 2100 movs r1, #0 802825c: a803 add r0, sp, #12 802825e: f7f9 fc2f bl 8021ac0 TM_RTC_GetDateTime(&tmp_data, TM_RTC_Format_BIN); 8028262: a807 add r0, sp, #28 8028264: 2100 movs r1, #0 8028266: f7fe f90f bl 8026488 sprintf(str_date, "%02i-%02i-%02i-01-", tmp_data.date, tmp_data.month, tmp_data.year); 802826a: f89d 1025 ldrb.w r1, [sp, #37] ; 0x25 802826e: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 8028272: f89d 2023 ldrb.w r2, [sp, #35] ; 0x23 8028276: 9100 str r1, [sp, #0] 8028278: a803 add r0, sp, #12 802827a: 490a ldr r1, [pc, #40] ; (80282a4 ) 802827c: f7ff fa90 bl 80277a0 len = strlen(str_date); 8028280: a803 add r0, sp, #12 8028282: f7f9 fdf5 bl 8021e70 strncat(str_data, str_date, len); 8028286: a903 add r1, sp, #12 8028288: b2c2 uxtb r2, r0 802828a: a80b add r0, sp, #44 ; 0x2c 802828c: f7f9 fe20 bl 8021ed0 strncat(str_data, str, 5); 8028290: a80b add r0, sp, #44 ; 0x2c 8028292: 4621 mov r1, r4 8028294: 2205 movs r2, #5 8028296: f7f9 fe1b bl 8021ed0 TM_RTC_SetDateTimeString(&str_data); 802829a: a80b add r0, sp, #44 ; 0x2c 802829c: f7fd ffda bl 8026254 } 80282a0: b010 add sp, #64 ; 0x40 80282a2: bd10 pop {r4, pc} 80282a4: 08036d84 .word 0x08036d84 080282a8 : /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { 80282a8: b538 push {r3, r4, r5, lr} bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 80282aa: 4c0d ldr r4, [pc, #52] ; (80282e0 ) if (strncmp(str, "1", 1) == 0){ 80282ac: 490d ldr r1, [pc, #52] ; (80282e4 ) /** * @brief Состояние SNTP */ void SetSntpStateStr(char *str) { bool old_sntpEnable = sSettings.sSNTP.sntpEnable; 80282ae: f894 5344 ldrb.w r5, [r4, #836] ; 0x344 if (strncmp(str, "1", 1) == 0){ 80282b2: 2201 movs r2, #1 80282b4: f7f9 fe3e bl 8021f34 80282b8: b948 cbnz r0, 80282ce sSettings.sSNTP.sntpEnable = true; 80282ba: 2001 movs r0, #1 80282bc: f884 0344 strb.w r0, [r4, #836] ; 0x344 if(old_sntpEnable != sSettings.sSNTP.sntpEnable){ 80282c0: b965 cbnz r5, 80282dc SNTP_Enable(sSettings.sSNTP.sntpEnable); 80282c2: f00d fccd bl 8035c60 } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 80282c6: 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(); 80282ca: f00d bd0b b.w 8035ce4 } } else{ sSettings.sSNTP.sntpEnable = false; 80282ce: 2000 movs r0, #0 80282d0: f884 0344 strb.w r0, [r4, #836] ; 0x344 SNTP_Enable(sSettings.sSNTP.sntpEnable); } } 80282d4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} SNTP_Poll(); } } else{ sSettings.sSNTP.sntpEnable = false; SNTP_Enable(sSettings.sSNTP.sntpEnable); 80282d8: f00d bcc2 b.w 8035c60 80282dc: bd38 pop {r3, r4, r5, pc} 80282de: bf00 nop 80282e0: 2000e984 .word 0x2000e984 80282e4: 08036e2f .word 0x08036e2f 080282e8 : /** * @brief IP адрес SNTP сервера */ void SetSntpServerIpStr(char *str) { 80282e8: 4601 mov r1, r0 strcpy(sSettings.sSNTP.ip, str); 80282ea: 4801 ldr r0, [pc, #4] ; (80282f0 ) 80282ec: f7f9 bd62 b.w 8021db4 80282f0: 2000ecc9 .word 0x2000ecc9 080282f4 : /** * @brief Часовой пояс контроллера */ void SetSntpTimeZoneStr(char *str) { 80282f4: b570 push {r4, r5, r6, lr} float newUtc; newUtc = atof(str); 80282f6: f7f9 fabf bl 8021878 80282fa: f7f8 fc23 bl 8020b44 <__aeabi_d2f> if (sSettings.sSNTP.timeZone > 0) 80282fe: 4b27 ldr r3, [pc, #156] ; (802839c ) 8028300: f8d3 4374 ldr.w r4, [r3, #884] ; 0x374 */ void SetSntpTimeZoneStr(char *str) { float newUtc; newUtc = atof(str); 8028304: 4606 mov r6, r0 if (sSettings.sSNTP.timeZone > 0) 8028306: 2100 movs r1, #0 8028308: 4620 mov r0, r4 802830a: f7f8 fde5 bl 8020ed8 <__aeabi_fcmpgt> 802830e: b100 cbz r0, 8028312 8028310: e033 b.n 802837a { TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); } } else if (sSettings.sSNTP.timeZone < 0) 8028312: 4620 mov r0, r4 8028314: 2100 movs r1, #0 8028316: f7f8 fdc1 bl 8020e9c <__aeabi_fcmplt> 802831a: 2800 cmp r0, #0 802831c: d032 beq.n 8028384 { if (newUtc >= 0) 802831e: 4630 mov r0, r6 8028320: 2100 movs r1, #0 8028322: f7f8 fdcf bl 8020ec4 <__aeabi_fcmpge> 8028326: b170 cbz r0, 8028346 { TM_RTC_Correction(newUtc + fabs(sSettings.sSNTP.timeZone)); 8028328: 4620 mov r0, r4 802832a: f7f8 f8f5 bl 8020518 <__aeabi_f2d> 802832e: f7fc ffa9 bl 8025284 8028332: 4604 mov r4, r0 8028334: 460d mov r5, r1 8028336: 4630 mov r0, r6 8028338: f7f8 f8ee bl 8020518 <__aeabi_f2d> 802833c: 4622 mov r2, r4 802833e: 462b mov r3, r5 8028340: f7f7 ff8c bl 802025c <__adddf3> 8028344: e016 b.n 8028374 } else { if (newUtc >= sSettings.sSNTP.timeZone) 8028346: 4630 mov r0, r6 8028348: 4621 mov r1, r4 802834a: f7f8 fdbb bl 8020ec4 <__aeabi_fcmpge> 802834e: b1a0 cbz r0, 802837a TM_RTC_Correction(fabs(sSettings.sSNTP.timeZone) - fabs(newUtc)); 8028350: 4620 mov r0, r4 8028352: f7f8 f8e1 bl 8020518 <__aeabi_f2d> 8028356: f7fc ff95 bl 8025284 802835a: 4604 mov r4, r0 802835c: 4630 mov r0, r6 802835e: 460d mov r5, r1 8028360: f7f8 f8da bl 8020518 <__aeabi_f2d> 8028364: f7fc ff8e bl 8025284 8028368: 4602 mov r2, r0 802836a: 460b mov r3, r1 802836c: 4620 mov r0, r4 802836e: 4629 mov r1, r5 8028370: f7f7 ff72 bl 8020258 <__aeabi_dsub> 8028374: f7f8 fbe6 bl 8020b44 <__aeabi_d2f> 8028378: e00a b.n 8028390 else TM_RTC_Correction(newUtc - sSettings.sSNTP.timeZone); 802837a: 4630 mov r0, r6 802837c: 4621 mov r1, r4 802837e: f7f8 fc35 bl 8020bec <__aeabi_fsub> 8028382: e005 b.n 8028390 } } else if (sSettings.sSNTP.timeZone == 0) 8028384: 4620 mov r0, r4 8028386: 2100 movs r1, #0 8028388: f7f8 fd7e bl 8020e88 <__aeabi_fcmpeq> 802838c: b110 cbz r0, 8028394 { TM_RTC_Correction(newUtc); 802838e: 4630 mov r0, r6 8028390: f7fe f976 bl 8026680 } sSettings.sSNTP.timeZone = newUtc; // atof(str); 8028394: 4b01 ldr r3, [pc, #4] ; (802839c ) 8028396: f8c3 6374 str.w r6, [r3, #884] ; 0x374 802839a: bd70 pop {r4, r5, r6, pc} 802839c: 2000e984 .word 0x2000e984 080283a0 : /** * @brief Тип действий при срабатывание сухих контактов */ void SetDINTypeActStr(char *str, uint8_t num) { 80283a0: b510 push {r4, lr} 80283a2: 460c mov r4, r1 sSettings.sInOuts.din_type_act[num] = atoi(str); 80283a4: f7f9 fa6c bl 8021880 80283a8: 4902 ldr r1, [pc, #8] ; (80283b4 ) 80283aa: 1909 adds r1, r1, r4 80283ac: f881 037a strb.w r0, [r1, #890] ; 0x37a 80283b0: bd10 pop {r4, pc} 80283b2: bf00 nop 80283b4: 2000e984 .word 0x2000e984 080283b8 : /** * @brief */ void SetROStr(char *str, uint8_t num) { 80283b8: b510 push {r4, lr} 80283ba: 460c mov r4, r1 set_state_douts((DOUT1+num), atoi(str)); 80283bc: f7f9 fa60 bl 8021880 80283c0: 1de3 adds r3, r4, #7 80283c2: b2c1 uxtb r1, r0 80283c4: b2d8 uxtb r0, r3 } 80283c6: e8bd 4010 ldmia.w sp!, {r4, lr} /** * @brief */ void SetROStr(char *str, uint8_t num) { set_state_douts((DOUT1+num), atoi(str)); 80283ca: f000 baff b.w 80289cc 080283ce : /** * @brief */ void SetROInt(uint8_t val, uint8_t num) { 80283ce: 4603 mov r3, r0 set_state_douts((DOUT1+num), val); 80283d0: 3107 adds r1, #7 80283d2: b2c8 uxtb r0, r1 80283d4: 4619 mov r1, r3 80283d6: f000 baf9 b.w 80289cc 80283da: 0000 movs r0, r0 080283dc : /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { 80283dc: b510 push {r4, lr} 80283de: 460c mov r4, r1 sSettings.sInOuts.ro_type_source[num] = atoi(str); 80283e0: f7f9 fa4e bl 8021880 80283e4: 4b04 ldr r3, [pc, #16] ; (80283f8 ) 80283e6: 191b adds r3, r3, r4 SetROInt(0, num); 80283e8: 4621 mov r1, r4 /** * @brief Источник срабатывания реле */ void SetROTypeActStr(char *str, uint8_t num) { sSettings.sInOuts.ro_type_source[num] = atoi(str); 80283ea: f883 0378 strb.w r0, [r3, #888] ; 0x378 SetROInt(0, num); 80283ee: 2000 movs r0, #0 } 80283f0: 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); 80283f4: f7ff bfeb b.w 80283ce 80283f8: 2000e984 .word 0x2000e984 080283fc : /** * @brief Установить параметры обновления ПО по умолчанию */ void SETTINGS_SetBootParamsDef(void) { sSettings.bootParams.loadMode = 1; 80283fc: 4b02 ldr r3, [pc, #8] ; (8028408 ) 80283fe: 2201 movs r2, #1 8028400: 701a strb r2, [r3, #0] sSettings.bootParams.bootTry = 0; 8028402: 2200 movs r2, #0 8028404: 705a strb r2, [r3, #1] 8028406: 4770 bx lr 8028408: 2000e984 .word 0x2000e984 0802840c : /** * @brief Установить параметры сетевого подключения по умолчанию */ void SETTINGS_SetWebParamsDef(void) { 802840c: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 802840e: 4c09 ldr r4, [pc, #36] ; (8028434 ) 8028410: 4909 ldr r1, [pc, #36] ; (8028438 ) 8028412: 4620 mov r0, r4 8028414: f7f9 fcce bl 8021db4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 8028418: 4908 ldr r1, [pc, #32] ; (802843c ) 802841a: f104 0010 add.w r0, r4, #16 802841e: f7f9 fcc9 bl 8021db4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 8028422: f104 0020 add.w r0, r4, #32 8028426: 4906 ldr r1, [pc, #24] ; (8028440 ) 8028428: f7f9 fcc4 bl 8021db4 sSettings.sWebParams.dhcpEnable = 1; 802842c: 2201 movs r2, #1 802842e: f884 2030 strb.w r2, [r4, #48] ; 0x30 8028432: bd10 pop {r4, pc} 8028434: 2000e986 .word 0x2000e986 8028438: 08036d97 .word 0x08036d97 802843c: 08036da3 .word 0x08036da3 8028440: 08036daf .word 0x08036daf 08028444 : /** * @brief Установить временные параметры сетевого подключения по умолчанию */ void SETTINGS_SetTempWebParamsDef(void) { 8028444: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 8028446: 4c09 ldr r4, [pc, #36] ; (802846c ) 8028448: 4909 ldr r1, [pc, #36] ; (8028470 ) 802844a: 4620 mov r0, r4 802844c: f7f9 fcb2 bl 8021db4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 8028450: 4908 ldr r1, [pc, #32] ; (8028474 ) 8028452: f104 0010 add.w r0, r4, #16 8028456: f7f9 fcad bl 8021db4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 802845a: f104 0020 add.w r0, r4, #32 802845e: 4906 ldr r1, [pc, #24] ; (8028478 ) 8028460: f7f9 fca8 bl 8021db4 sSettings.sWebParams.dhcpEnable = 1; 8028464: 2201 movs r2, #1 8028466: f884 2030 strb.w r2, [r4, #48] ; 0x30 802846a: bd10 pop {r4, pc} 802846c: 2000e986 .word 0x2000e986 8028470: 08036d97 .word 0x08036d97 8028474: 08036da3 .word 0x08036da3 8028478: 08036daf .word 0x08036daf 0802847c : /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { 802847c: b570 push {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysDescr, ""); 802847e: 4c1e ldr r4, [pc, #120] ; (80284f8 ) 8028480: 4d1e ldr r5, [pc, #120] ; (80284fc ) strcpy(sSettings.sSnmp.readCommunity, "public"); 8028482: 4e1f ldr r6, [pc, #124] ; (8028500 ) /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { strcpy(sSettings.sSnmp.sysDescr, ""); 8028484: 4629 mov r1, r5 8028486: 4620 mov r0, r4 8028488: f7f9 fc94 bl 8021db4 strcpy(sSettings.sSnmp.readCommunity, "public"); 802848c: 4631 mov r1, r6 802848e: f104 00a0 add.w r0, r4, #160 ; 0xa0 8028492: f7f9 fc8f bl 8021db4 strcpy(sSettings.sSnmp.writeCommunity, "public"); 8028496: 4631 mov r1, r6 8028498: f104 00b4 add.w r0, r4, #180 ; 0xb4 802849c: f7f9 fc8a bl 8021db4 strcpy(sSettings.sSnmp.sysContact, ""); 80284a0: 4629 mov r1, r5 80284a2: f104 00c8 add.w r0, r4, #200 ; 0xc8 80284a6: f7f9 fc85 bl 8021db4 strcpy(sSettings.sSnmp.sysName, "BT-6701"); 80284aa: f104 00fa add.w r0, r4, #250 ; 0xfa 80284ae: 4915 ldr r1, [pc, #84] ; (8028504 ) 80284b0: f7f9 fc80 bl 8021db4 strcpy(sSettings.sSnmp.sysLocation, ""); 80284b4: 4629 mov r1, r5 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 80284b6: 4d14 ldr r5, [pc, #80] ; (8028508 ) strcpy(sSettings.sSnmp.sysDescr, ""); strcpy(sSettings.sSnmp.readCommunity, "public"); strcpy(sSettings.sSnmp.writeCommunity, "public"); strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, "BT-6701"); strcpy(sSettings.sSnmp.sysLocation, ""); 80284b8: f504 7087 add.w r0, r4, #270 ; 0x10e 80284bc: f7f9 fc7a bl 8021db4 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 80284c0: 4629 mov r1, r5 80284c2: f504 70be add.w r0, r4, #380 ; 0x17c 80284c6: f7f9 fc75 bl 8021db4 strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); 80284ca: 4629 mov r1, r5 80284cc: f504 70c8 add.w r0, r4, #400 ; 0x190 80284d0: f7f9 fc70 bl 8021db4 strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 80284d4: 4629 mov r1, r5 80284d6: f504 70d2 add.w r0, r4, #420 ; 0x1a4 80284da: f7f9 fc6b bl 8021db4 strcpy(sSettings.sSnmp.managerIP4, "0.0.0.0"); 80284de: 4629 mov r1, r5 80284e0: f504 70dc add.w r0, r4, #440 ; 0x1b8 80284e4: f7f9 fc66 bl 8021db4 strcpy(sSettings.sSnmp.managerIP5, "0.0.0.0"); 80284e8: f504 70e6 add.w r0, r4, #460 ; 0x1cc 80284ec: 4629 mov r1, r5 } 80284ee: 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"); 80284f2: f7f9 bc5f b.w 8021db4 80284f6: bf00 nop 80284f8: 2000e9e8 .word 0x2000e9e8 80284fc: 0803b6a9 .word 0x0803b6a9 8028500: 08036dbd .word 0x08036dbd 8028504: 08036dc4 .word 0x08036dc4 8028508: 08036dcc .word 0x08036dcc 0802850c : /** * @brief Установить Информацию об устройстве по умолчанию */ void SETTINGS_SetInfoDef(void) { 802850c: b510 push {r4, lr} strcpy(sSettings.sInfo.productionData, "08.07.2016"); 802850e: 4c0b ldr r4, [pc, #44] ; (802853c ) 8028510: 490b ldr r1, [pc, #44] ; (8028540 ) 8028512: 4620 mov r0, r4 8028514: f7f9 fc4e bl 8021db4 //strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-90-01"); strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-00-0A"); 8028518: f104 0028 add.w r0, r4, #40 ; 0x28 802851c: 4909 ldr r1, [pc, #36] ; (8028544 ) 802851e: f7f9 fc49 bl 8021db4 strcpy(sSettings.sInfo.serialNumber, "KN-03-00001"); 8028522: f104 003a add.w r0, r4, #58 ; 0x3a 8028526: 4908 ldr r1, [pc, #32] ; (8028548 ) 8028528: f7f9 fc44 bl 8021db4 strcpy(sSettings.sInfo.comments, ""); 802852c: 4907 ldr r1, [pc, #28] ; (802854c ) 802852e: f104 004a add.w r0, r4, #74 ; 0x4a } 8028532: e8bd 4010 ldmia.w sp!, {r4, lr} { strcpy(sSettings.sInfo.productionData, "08.07.2016"); //strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-90-01"); strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-00-0A"); strcpy(sSettings.sInfo.serialNumber, "KN-03-00001"); strcpy(sSettings.sInfo.comments, ""); 8028536: f7f9 bc3d b.w 8021db4 802853a: bf00 nop 802853c: 2000ebc8 .word 0x2000ebc8 8028540: 08036dd4 .word 0x08036dd4 8028544: 08036ddf .word 0x08036ddf 8028548: 08036df1 .word 0x08036df1 802854c: 0803b6a9 .word 0x0803b6a9 08028550 : /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) { 8028550: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8028554: 4d13 ldr r5, [pc, #76] ; (80285a4 ) 8028556: 2400 movs r4, #0 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 8028558: 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; 802855a: f04f 0801 mov.w r8, #1 { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { switch (user_id) { 802855e: f014 03ff ands.w r3, r4, #255 ; 0xff 8028562: d108 bne.n 8028576 /* 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"); 8028564: 4910 ldr r1, [pc, #64] ; (80285a8 ) 8028566: 4811 ldr r0, [pc, #68] ; (80285ac ) 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; 8028568: f885 3314 strb.w r3, [r5, #788] ; 0x314 strcpy(sSettings.sAuth[user_id].login, "admin"); 802856c: f7f9 fc22 bl 8021db4 strcpy(sSettings.sAuth[user_id].password, "12345"); 8028570: 480f ldr r0, [pc, #60] ; (80285b0 ) 8028572: 4910 ldr r1, [pc, #64] ; (80285b4 ) 8028574: e00f b.n 8028596 } /** * @brief Установить значение сервисных настроек по умолчанию */ void SETTINGS_SetServiceDef(void) 8028576: fb07 f604 mul.w r6, r7, r4 802857a: 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"); 802857c: f506 7044 add.w r0, r6, #784 ; 0x310 8028580: 1828 adds r0, r5, r0 8028582: 490d ldr r1, [pc, #52] ; (80285b8 ) strcpy(sSettings.sAuth[user_id].login, "admin"); strcpy(sSettings.sAuth[user_id].password, "12345"); break; case 1: default: sSettings.sAuth[user_id].level = USER; 8028584: f883 8314 strb.w r8, [r3, #788] ; 0x314 strcpy(sSettings.sAuth[user_id].login, "user"); 8028588: 3005 adds r0, #5 802858a: f7f9 fc13 bl 8021db4 strcpy(sSettings.sAuth[user_id].password, "1234"); 802858e: 19a8 adds r0, r5, r6 8028590: 490a ldr r1, [pc, #40] ; (80285bc ) 8028592: f500 7048 add.w r0, r0, #800 ; 0x320 8028596: 3401 adds r4, #1 8028598: f7f9 fc0c bl 8021db4 void SETTINGS_SetServiceDef(void) { uint8_t user_id; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802859c: 2c02 cmp r4, #2 802859e: d1de bne.n 802855e strcpy(sSettings.sAuth[user_id].login, "user"); strcpy(sSettings.sAuth[user_id].password, "1234"); break; } } } 80285a0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80285a4: 2000e984 .word 0x2000e984 80285a8: 08036dfd .word 0x08036dfd 80285ac: 2000ec99 .word 0x2000ec99 80285b0: 2000eca4 .word 0x2000eca4 80285b4: 08036e03 .word 0x08036e03 80285b8: 08036e09 .word 0x08036e09 80285bc: 08036e0e .word 0x08036e0e 080285c0 : /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { 80285c0: b510 push {r4, lr} sSettings.sSNTP.sntpEnable = true; 80285c2: 4c08 ldr r4, [pc, #32] ; (80285e4 ) strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 80285c4: 4908 ldr r1, [pc, #32] ; (80285e8 ) 80285c6: 4809 ldr r0, [pc, #36] ; (80285ec ) /** * @brief Установить параметры SNTP по умолчанию */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; 80285c8: 2301 movs r3, #1 80285ca: f884 3344 strb.w r3, [r4, #836] ; 0x344 strcpy(sSettings.sSNTP.ip, "88.147.254.235"); 80285ce: f7f9 fbf1 bl 8021db4 sSettings.sSNTP.timeZone = 3.0; 80285d2: 4b07 ldr r3, [pc, #28] ; (80285f0 ) strcpy(sSettings.sSNTP.data, "none"); 80285d4: 4807 ldr r0, [pc, #28] ; (80285f4 ) 80285d6: 4908 ldr r1, [pc, #32] ; (80285f8 ) */ void SETTINGS_SetSntpDef(void) { sSettings.sSNTP.sntpEnable = true; strcpy(sSettings.sSNTP.ip, "88.147.254.235"); sSettings.sSNTP.timeZone = 3.0; 80285d8: f8c4 3374 str.w r3, [r4, #884] ; 0x374 strcpy(sSettings.sSNTP.data, "none"); } 80285dc: 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"); 80285e0: f7f9 bbe8 b.w 8021db4 80285e4: 2000e984 .word 0x2000e984 80285e8: 08036e13 .word 0x08036e13 80285ec: 2000ecc9 .word 0x2000ecc9 80285f0: 40400000 .word 0x40400000 80285f4: 2000ecd9 .word 0x2000ecd9 80285f8: 08036e22 .word 0x08036e22 080285fc : /** * @brief Установить параметры настроек сухих контактов / реле по умолчанию */ void SETTINGS_SetINOUTSDef(void) { sSettings.sInOuts.ro_type_source[0] = CRITICAL; 80285fc: 4b05 ldr r3, [pc, #20] ; (8028614 ) 80285fe: 2201 movs r2, #1 8028600: f883 2378 strb.w r2, [r3, #888] ; 0x378 sSettings.sInOuts.ro_type_source[1] = SNMP_SET; 8028604: 2203 movs r2, #3 8028606: f883 2379 strb.w r2, [r3, #889] ; 0x379 sSettings.sInOuts.din_type_act[0] = SNMP_TRAP; 802860a: 2202 movs r2, #2 802860c: f883 237a strb.w r2, [r3, #890] ; 0x37a 8028610: 4770 bx lr 8028612: bf00 nop 8028614: 2000e984 .word 0x2000e984 08028618 : /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { 8028618: b510 push {r4, lr} sSettings.sRADIUS.RDSEnable = true; 802861a: 4c0b ldr r4, [pc, #44] ; (8028648 ) strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 802861c: 490b ldr r1, [pc, #44] ; (802864c ) /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.RDSEnable = true; 802861e: 2301 movs r3, #1 strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028620: f504 705f add.w r0, r4, #892 ; 0x37c /** * @brief Установить параметры RADIUS по умолчанию */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.RDSEnable = true; 8028624: f884 339d strb.w r3, [r4, #925] ; 0x39d strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); 8028628: f7f9 fbc4 bl 8021db4 sSettings.sRADIUS.port = 1227; 802862c: f240 43cb movw r3, #1227 ; 0x4cb sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 8028630: 4907 ldr r1, [pc, #28] ; (8028650 ) */ void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); sSettings.sRADIUS.port = 1227; 8028632: f8c4 33a0 str.w r3, [r4, #928] ; 0x3a0 sSettings.sRADIUS.key_access = 123; strcpy(sSettings.sRADIUS.rds_password, "12345"); 8028636: f504 7063 add.w r0, r4, #908 ; 0x38c void SETTINGS_SetRADIUSDef(void) { sSettings.sRADIUS.RDSEnable = true; strcpy(sSettings.sRADIUS.ServerIP, "127.0.0.1"); sSettings.sRADIUS.port = 1227; sSettings.sRADIUS.key_access = 123; 802863a: 237b movs r3, #123 ; 0x7b 802863c: f8c4 33a4 str.w r3, [r4, #932] ; 0x3a4 strcpy(sSettings.sRADIUS.rds_password, "12345"); } 8028640: e8bd 4010 ldmia.w sp!, {r4, lr} { 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"); 8028644: f7f9 bbb6 b.w 8021db4 8028648: 2000e984 .word 0x2000e984 802864c: 08036e27 .word 0x08036e27 8028650: 08036e03 .word 0x08036e03 08028654 : */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 8028654: 2300 movs r3, #0 8028656: e006 b.n 8028666 *data++ = (*(uint32_t*)baseAddress++);; 8028658: f103 6200 add.w r2, r3, #134217728 ; 0x8000000 802865c: f502 4280 add.w r2, r2, #16384 ; 0x4000 8028660: 6812 ldr r2, [r2, #0] 8028662: 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++) 8028664: 3301 adds r3, #1 8028666: 428b cmp r3, r1 8028668: d1f6 bne.n 8028658 *data++ = (*(uint32_t*)baseAddress++);; } 802866a: 4770 bx lr 0802866c : */ void SETTINGS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_1, VoltageRange_3)) != FLASH_COMPLETE) { 802866c: 2008 movs r0, #8 802866e: 2102 movs r1, #2 8028670: f7fc beea b.w 8025448 08028674 : /** * @brief * @retval */ uint32_t SETTINGS_GetCRC(void) { 8028674: b508 push {r3, lr} CRC_ResetDR(); 8028676: f7fc fe51 bl 802531c return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4); 802867a: 4803 ldr r0, [pc, #12] ; (8028688 ) 802867c: 21ea movs r1, #234 ; 0xea } 802867e: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval */ uint32_t SETTINGS_GetCRC(void) { CRC_ResetDR(); return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4); 8028682: f7fc be51 b.w 8025328 8028686: bf00 nop 8028688: 2000e984 .word 0x2000e984 0802868c : /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { 802868c: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8028690: 4606 mov r6, r0 8028692: 468a mov sl, r1 uint32_t baseAddress = SETTINGS_SECTOR; uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8028694: f7ff ffee bl 8028674 /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; 8028698: 4c17 ldr r4, [pc, #92] ; (80286f8 ) uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 802869a: 4680 mov r8, r0 802869c: 2703 movs r7, #3 FLASH_Status status; for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 802869e: f7fc fe53 bl 8025348 80286a2: 4635 mov r5, r6 SETTINGS_EraseFlashSector(); 80286a4: f7ff ffe2 bl 802866c } /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) 80286a8: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 80286ac: e00a b.n 80286c4 if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { 80286ae: f815 1b01 ldrb.w r1, [r5], #1 80286b2: 4620 mov r0, r4 80286b4: f7fc fe8e bl 80253d4 80286b8: f104 0901 add.w r9, r4, #1 80286bc: 2808 cmp r0, #8 80286be: 462e mov r6, r5 80286c0: 464c mov r4, r9 80286c2: d102 bne.n 80286ca fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 80286c4: 455c cmp r4, fp 80286c6: 462e mov r6, r5 80286c8: d1f1 bne.n 80286ae 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) { 80286ca: 4641 mov r1, r8 80286cc: 480b ldr r0, [pc, #44] ; (80286fc ) 80286ce: f7fc fe9d bl 802540c DBG printf("FLASH_ProgramWord error: status = %d\r\n", status); } FLASH_Lock(); 80286d2: f7fc fe47 bl 8025364 /* Считываем что записали */ SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 80286d6: 480a ldr r0, [pc, #40] ; (8028700 ) 80286d8: f44f 716a mov.w r1, #936 ; 0x3a8 80286dc: f7ff ffba bl 8028654 checkCrc = SETTINGS_GetCRC(); 80286e0: f7ff ffc8 bl 8028674 /* Проверяем CRC того что было записано */ if (checkCrc == crc) 80286e4: 4540 cmp r0, r8 80286e6: d004 beq.n 80286f2 80286e8: 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++) 80286ea: f017 07ff ands.w r7, r7, #255 ; 0xff 80286ee: d1d6 bne.n 802869e 80286f0: e7fe b.n 80286f0 80286f2: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 80286f6: bf00 nop 80286f8: 08004000 .word 0x08004000 80286fc: 08007f9c .word 0x08007f9c 8028700: 2000e984 .word 0x2000e984 08028704 : /** * @brief * @retval */ uint32_t SETTINGS_GetCritSecCRC(void) { 8028704: b508 push {r3, lr} CRC_ResetDR(); 8028706: f7fc fe09 bl 802531c uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 802870a: 4803 ldr r0, [pc, #12] ; (8028718 ) 802870c: 21c4 movs r1, #196 ; 0xc4 } 802870e: 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); 8028712: f7fc be09 b.w 8025328 8028716: bf00 nop 8028718: 2000e984 .word 0x2000e984 0802871c : /** * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { 802871c: b508 push {r3, lr} /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 802871e: f7ff fff1 bl 8028704 8028722: 4b05 ldr r3, [pc, #20] ; (8028738 ) SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8028724: 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(); 8028728: f8c3 0310 str.w r0, [r3, #784] ; 0x310 SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 802872c: 4618 mov r0, r3 } 802872e: 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)); 8028732: f7ff bfab b.w 802868c 8028736: bf00 nop 8028738: 2000e984 .word 0x2000e984 0802873c : /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { 802873c: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 802873e: 4c0c ldr r4, [pc, #48] ; (8028770 ) /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { SETTINGS_SetWebParamsDef(); 8028740: f7ff fe64 bl 802840c SETTINGS_SetTempWebParamsDef(); 8028744: f7ff fe7e bl 8028444 SETTINGS_SetSnmpDef(); 8028748: f7ff fe98 bl 802847c SETTINGS_SetBootParamsDef(); 802874c: f7ff fe56 bl 80283fc /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028750: 2300 movs r3, #0 8028752: f884 32fc strb.w r3, [r4, #764] ; 0x2fc SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetBootParamsDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 8028756: f7ff fefb bl 8028550 SETTINGS_SetSntpDef(); 802875a: f7ff ff31 bl 80285c0 SETTINGS_SetINOUTSDef(); 802875e: f7ff ff4d bl 80285fc SETTINGS_SetRADIUSDef(); 8028762: f7ff ff59 bl 8028618 //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8028766: f7ff ffcd bl 8028704 802876a: f8c4 0310 str.w r0, [r4, #784] ; 0x310 802876e: bd10 pop {r4, pc} 8028770: 2000e984 .word 0x2000e984 08028774 : /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { 8028774: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8028776: 4c0d ldr r4, [pc, #52] ; (80287ac ) /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { SETTINGS_SetBootParamsDef(); 8028778: f7ff fe40 bl 80283fc SETTINGS_SetWebParamsDef(); 802877c: f7ff fe46 bl 802840c SETTINGS_SetTempWebParamsDef(); 8028780: f7ff fe60 bl 8028444 SETTINGS_SetSnmpDef(); 8028784: f7ff fe7a bl 802847c SETTINGS_SetInfoDef(); 8028788: f7ff fec0 bl 802850c /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 802878c: 2300 movs r3, #0 802878e: f884 32fc strb.w r3, [r4, #764] ; 0x2fc SETTINGS_SetWebParamsDef(); SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetInfoDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 8028792: f7ff fedd bl 8028550 SETTINGS_SetSntpDef(); 8028796: f7ff ff13 bl 80285c0 SETTINGS_SetINOUTSDef(); 802879a: f7ff ff2f bl 80285fc SETTINGS_SetRADIUSDef(); 802879e: f7ff ff3b bl 8028618 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 80287a2: f7ff ffaf bl 8028704 80287a6: f8c4 0310 str.w r0, [r4, #784] ; 0x310 80287aa: bd10 pop {r4, pc} 80287ac: 2000e984 .word 0x2000e984 080287b0 : /** * @brief Загрузка структуры настроек из flesh */ void SETTINGS_Load(void) { 80287b0: b510 push {r4, lr} SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 80287b2: 4c09 ldr r4, [pc, #36] ; (80287d8 ) 80287b4: f44f 716a mov.w r1, #936 ; 0x3a8 80287b8: 4620 mov r0, r4 80287ba: f7ff ff4b bl 8028654 /* Проверка CRC критической секции сектора настроек. * Если CRC не совпадает, скорее всего настройки отсутствуют, * прошиваем значения по умолчанию */ uint32_t crc = SETTINGS_GetCritSecCRC(); 80287be: f7ff ffa1 bl 8028704 if (sSettings.CritSecCRC != crc) { 80287c2: f8d4 3310 ldr.w r3, [r4, #784] ; 0x310 80287c6: 4283 cmp r3, r0 80287c8: d005 beq.n 80287d6 SETTINGS_SetAllDefault(); 80287ca: f7ff ffd3 bl 8028774 SETTINGS_Save(); } } 80287ce: e8bd 4010 ldmia.w sp!, {r4, lr} * прошиваем значения по умолчанию */ uint32_t crc = SETTINGS_GetCritSecCRC(); if (sSettings.CritSecCRC != crc) { SETTINGS_SetAllDefault(); SETTINGS_Save(); 80287d2: f7ff bfa3 b.w 802871c 80287d6: bd10 pop {r4, pc} 80287d8: 2000e984 .word 0x2000e984 080287dc : /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { 80287dc: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80287de: 4c0a ldr r4, [pc, #40] ; (8028808 ) /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); 80287e0: f7ff fe0c bl 80283fc SETTINGS_SetSnmpDef(); 80287e4: f7ff fe4a bl 802847c /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 80287e8: 2300 movs r3, #0 80287ea: f884 32fc strb.w r3, [r4, #764] ; 0x2fc void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetFlagsDef(); SETTINGS_SetServiceDef(); 80287ee: f7ff feaf bl 8028550 SETTINGS_SetSntpDef(); 80287f2: f7ff fee5 bl 80285c0 SETTINGS_SetINOUTSDef(); 80287f6: f7ff ff01 bl 80285fc SETTINGS_SetRADIUSDef(); 80287fa: f7ff ff0d bl 8028618 sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 80287fe: f7ff ff81 bl 8028704 8028802: f8c4 0310 str.w r0, [r4, #784] ; 0x310 8028806: bd10 pop {r4, pc} 8028808: 2000e984 .word 0x2000e984 0802880c : /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) { 802880c: b573 push {r0, r1, r4, r5, r6, lr} char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 802880e: 4e0a ldr r6, [pc, #40] ; (8028838 ) /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) 8028810: 1e45 subs r5, r0, #1 8028812: 2400 movs r4, #0 char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8028814: 1931 adds r1, r6, r4 8028816: 2202 movs r2, #2 8028818: f501 711b add.w r1, r1, #620 ; 0x26c 802881c: a801 add r0, sp, #4 802881e: f7f9 fbdf bl 8021fe0 mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8028822: 2100 movs r1, #0 8028824: 2210 movs r2, #16 8028826: a801 add r0, sp, #4 8028828: f7fa ff10 bl 802364c 802882c: 3403 adds r4, #3 void SETTINGS_GetMac(uint8_t *mac) { char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) 802882e: 2c12 cmp r4, #18 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8028830: f805 0f01 strb.w r0, [r5, #1]! void SETTINGS_GetMac(uint8_t *mac) { char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) 8028834: d1ee bne.n 8028814 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); } } 8028836: bd7c pop {r2, r3, r4, r5, r6, pc} 8028838: 2000e984 .word 0x2000e984 0802883c : /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 802883c: b570 push {r4, r5, r6, lr} memset(sSettings.sInfo.productionData, 0, 40); 802883e: 4c07 ldr r4, [pc, #28] ; (802885c ) /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8028840: 4606 mov r6, r0 8028842: 460d mov r5, r1 memset(sSettings.sInfo.productionData, 0, 40); 8028844: 2228 movs r2, #40 ; 0x28 8028846: 2100 movs r1, #0 8028848: 4620 mov r0, r4 802884a: f7f9 f939 bl 8021ac0 memcpy(sSettings.sInfo.productionData, proDate, len); 802884e: 4620 mov r0, r4 8028850: 4631 mov r1, r6 8028852: 462a mov r2, r5 } 8028854: 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); 8028858: f7f9 b878 b.w 802194c 802885c: 2000ebc8 .word 0x2000ebc8 08028860 : /** * @brief */ void LED_On(gpio_t pin) { gpio_set(pin, 1); 8028860: 2101 movs r1, #1 8028862: f7fd bb65 b.w 8025f30 08028866 : /** * @brief */ void LED_Off(gpio_t pin) { gpio_set(pin, 0); 8028866: 2100 movs r1, #0 8028868: f7fd bb62 b.w 8025f30 0802886c : /** * @brief * @retval */ void LED_Init(void) { 802886c: b508 push {r3, lr} LED_Off(LED_INIT_R); 802886e: 2009 movs r0, #9 8028870: f7ff fff9 bl 8028866 LED_Off(LED_INIT_G); 8028874: 200a movs r0, #10 8028876: f7ff fff6 bl 8028866 LED_Off(LED_MAJOR_R); 802887a: 200b movs r0, #11 802887c: f7ff fff3 bl 8028866 LED_Off(LED_MINOR_G); 8028880: 200c movs r0, #12 8028882: f7ff fff0 bl 8028866 LED_Off(LED_MINOR_R); 8028886: 200d movs r0, #13 } 8028888: 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); 802888c: f7ff bfeb b.w 8028866 08028890 : /** * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { 8028890: 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; 8028892: 4e0e ldr r6, [pc, #56] ; (80288cc ) LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 8028894: 4d0e ldr r5, [pc, #56] ; (80288d0 ) * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { uint8_t start_status = 0; uint8_t start_status_old = 0; 8028896: 2300 movs r3, #0 start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 8028898: 7cf4 ldrb r4, [r6, #19] /* Просто отражает состояние контроллера - "живой" */ if((UPS.Status >> 7) & 0x01){ 802889a: 09e4 lsrs r4, r4, #7 802889c: d009 beq.n 80288b2 if(start_status_old != start_status) 802889e: 42a3 cmp r3, r4 80288a0: d002 beq.n 80288a8 LED_Off(LED_INIT_G); 80288a2: 200a movs r0, #10 80288a4: f7ff ffdf bl 8028866 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 80288a8: 200a movs r0, #10 80288aa: f7fd fbd5 bl 8026058 80288ae: 2009 movs r0, #9 80288b0: e005 b.n 80288be LED_Off(LED_INIT_G); LED_Toggle(LED_INIT_G); LED_Toggle(LED_INIT_R); } else{ if(start_status_old != start_status) 80288b2: 42a3 cmp r3, r4 80288b4: d002 beq.n 80288bc LED_Off(LED_INIT_R); 80288b6: 2009 movs r0, #9 80288b8: f7ff ffd5 bl 8028866 /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 80288bc: 200a movs r0, #10 80288be: f7fd fbcb bl 8026058 LED_Off(LED_INIT_R); LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); 80288c2: 8828 ldrh r0, [r5, #0] 80288c4: f001 faee bl 8029ea4 uint8_t start_status = 0; uint8_t start_status_old = 0; start_status = (UPS.Status >> 7) & 0x01; for (;;) { start_status = (UPS.Status >> 7) & 0x01; 80288c8: 4623 mov r3, r4 LED_Toggle(LED_INIT_G); } start_status_old = start_status; vTaskDelay(statusLedFreq); } 80288ca: e7e5 b.n 8028898 80288cc: 2000e954 .word 0x2000e954 80288d0: 200015aa .word 0x200015aa 080288d4 : /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 80288d4: f7fd bbc0 b.w 8026058 080288d8 : /** * @brief */ void LED_SetStatusLedFreq(uint16_t freq) { statusLedFreq = freq; 80288d8: 4b01 ldr r3, [pc, #4] ; (80288e0 ) 80288da: 8018 strh r0, [r3, #0] 80288dc: 4770 bx lr 80288de: bf00 nop 80288e0: 200015aa .word 0x200015aa 080288e4 : /** * @brief Заглушка */ void BUTTON_VoidHandler(void) { 80288e4: 4770 bx lr 80288e6: 0000 movs r0, r0 080288e8 : /** * @brief Хендлер кнопки DEFAULT. Сброс всех настроек, сохранение и перезагрузка */ void BUTTON_DEF_DownHandler(void) { 80288e8: b508 push {r3, lr} //taskENTER_CRITICAL(); SETTINGS_SetDefaultDebug(); 80288ea: f7ff ff27 bl 802873c SETTINGS_Save(); 80288ee: f7ff ff15 bl 802871c vTaskDelay(1010); 80288f2: f240 30f2 movw r0, #1010 ; 0x3f2 80288f6: f001 fad5 bl 8029ea4 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"); 80288fa: 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) | 80288fe: 4a05 ldr r2, [pc, #20] ; (8028914 ) 8028900: 4b05 ldr r3, [pc, #20] ; (8028918 ) 8028902: 68d1 ldr r1, [r2, #12] 8028904: f401 61e0 and.w r1, r1, #1792 ; 0x700 8028908: 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) | 802890a: 60d3 str r3, [r2, #12] 802890c: f3bf 8f4f dsb sy 8028910: e7fe b.n 8028910 8028912: bf00 nop 8028914: e000ed00 .word 0xe000ed00 8028918: 05fa0004 .word 0x05fa0004 0802891c : /** * @brief Возвращает сотояние ключа */ BUTTON_STATE_t BUTTON_GetState(BUTTON_NO_FIX_t *button) { return (BUTTON_STATE_t)gpio_get(button->id_pin); 802891c: 7800 ldrb r0, [r0, #0] 802891e: f7fd bbab b.w 8026078 8028922: 0000 movs r0, r0 08028924 : /** * @brief * @retval */ void BUTTON_Init(void) { 8028924: b510 push {r4, lr} defButton.id_pin = KEY_DEF; 8028926: 4c09 ldr r4, [pc, #36] ; (802894c ) 8028928: 230f movs r3, #15 802892a: 7023 strb r3, [r4, #0] defButton.timeDelay = 5; 802892c: 2305 movs r3, #5 802892e: 8063 strh r3, [r4, #2] defButton.pressHandler = BUTTON_VoidHandler; 8028930: 4b07 ldr r3, [pc, #28] ; (8028950 ) 8028932: 60a3 str r3, [r4, #8] defButton.unpressHandler = BUTTON_DEF_DownHandler; 8028934: 4b07 ldr r3, [pc, #28] ; (8028954 ) defButton.counterActivation = 0; defButton.timeActivation = 40; 8028936: 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; 8028938: 60e3 str r3, [r4, #12] defButton.counterActivation = 0; defButton.timeActivation = 40; defButton.fActivation = false; defButton.stateOld = BUTTON_GetState(&defButton); 802893a: 4620 mov r0, r4 { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; defButton.counterActivation = 0; 802893c: 2300 movs r3, #0 802893e: 6163 str r3, [r4, #20] defButton.timeActivation = 40; 8028940: 8322 strh r2, [r4, #24] defButton.fActivation = false; 8028942: 76a3 strb r3, [r4, #26] defButton.stateOld = BUTTON_GetState(&defButton); 8028944: f7ff ffea bl 802891c 8028948: 71a0 strb r0, [r4, #6] 802894a: bd10 pop {r4, pc} 802894c: 2000ed2c .word 0x2000ed2c 8028950: 080288e5 .word 0x080288e5 8028954: 080288e9 .word 0x080288e9 08028958 : время нажатия. * @param *button: указатель на структуру типа BUTTON_NO_FIX * @retval нет */ void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { 8028958: b510 push {r4, lr} 802895a: 4604 mov r4, r0 /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки 802895c: 7800 ldrb r0, [r0, #0] 802895e: f7fd fb8b bl 8026078 8028962: 6963 ldr r3, [r4, #20] 8028964: b950 cbnz r0, 802897c { button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028966: 8b22 ldrh r2, [r4, #24] { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; button->fActivation = false; 8028968: 76a0 strb r0, [r4, #26] void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 802896a: 3301 adds r3, #1 button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 802896c: 4293 cmp r3, r2 void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 802896e: 6163 str r3, [r4, #20] button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8028970: d914 bls.n 802899c LED_SetStatusLedFreq(100); 8028972: 2064 movs r0, #100 ; 0x64 } else button->counterActivation = 0; } } 8028974: e8bd 4010 ldmia.w sp!, {r4, lr} button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) LED_SetStatusLedFreq(100); 8028978: f7ff bfae b.w 80288d8 } /* Кнопку отжата. Если до этого она была нажата нужное время - вызываем хендлер */ else { if ((button->counterActivation > button->timeActivation) 802897c: 8b22 ldrh r2, [r4, #24] 802897e: 4293 cmp r3, r2 8028980: d90a bls.n 8028998 && button->fActivation == false) 8028982: 7ea3 ldrb r3, [r4, #26] 8028984: b943 cbnz r3, 8028998 { button->fActivation = true; 8028986: 2301 movs r3, #1 8028988: 76a3 strb r3, [r4, #26] LED_SetStatusLedFreq(1000); 802898a: f44f 707a mov.w r0, #1000 ; 0x3e8 802898e: f7ff ffa3 bl 80288d8 button->unpressHandler(); 8028992: 68e3 ldr r3, [r4, #12] 8028994: 4798 blx r3 8028996: bd10 pop {r4, pc} } else button->counterActivation = 0; 8028998: 2300 movs r3, #0 802899a: 6163 str r3, [r4, #20] 802899c: bd10 pop {r4, pc} 802899e: 0000 movs r0, r0 080289a0 : /** * @brief Опрос кнопок */ void vTaskButtons(void *pvParameters) { 80289a0: b508 push {r3, lr} for (;;) { BUTTON_DellayHandler(&defButton); 80289a2: 4803 ldr r0, [pc, #12] ; (80289b0 ) 80289a4: f7ff ffd8 bl 8028958 vTaskDelay(100); //20 80289a8: 2064 movs r0, #100 ; 0x64 80289aa: f001 fa7b bl 8029ea4 80289ae: e7f8 b.n 80289a2 80289b0: 2000ed2c .word 0x2000ed2c 080289b4 : #include "gpio.h" bool value_jumper; void set_mode_jumper(void) { 80289b4: b508 push {r3, lr} value_jumper = gpio_get(MODE_JUMPER); 80289b6: 200e movs r0, #14 80289b8: f7fd fb5e bl 8026078 80289bc: 4b01 ldr r3, [pc, #4] ; (80289c4 ) 80289be: 7018 strb r0, [r3, #0] 80289c0: bd08 pop {r3, pc} 80289c2: bf00 nop 80289c4: 2000ed48 .word 0x2000ed48 080289c8 : /* 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); 80289c8: f7fd bb56 b.w 8026078 080289cc : return res; } void set_state_douts(gpio_t pin, uint8_t value) { gpio_set(pin, value); 80289cc: 3100 adds r1, #0 80289ce: bf18 it ne 80289d0: 2101 movne r1, #1 80289d2: f7fd baad b.w 8025f30 80289d6: 0000 movs r0, r0 080289d8 : "F\r" }; void init_UPS_value(void) { 80289d8: b538 push {r3, r4, r5, lr} UPS.Freq_in = 0; 80289da: 4c0d ldr r4, [pc, #52] ; (8028a10 ) UPS.VAC_in = 0; UPS.VAC_out = 0; UPS.Temp = 0; UPS.Load = 0; 80289dc: 2500 movs r5, #0 }; void init_UPS_value(void) { UPS.Freq_in = 0; 80289de: 2300 movs r3, #0 UPS.SOC = 0; UPS.work_time = 0; UPS.Status = 0; UPS.Present = false; memset(UPS.model, 0, 11); 80289e0: 4629 mov r1, r5 80289e2: 220b movs r2, #11 80289e4: f104 0014 add.w r0, r4, #20 }; void init_UPS_value(void) { UPS.Freq_in = 0; 80289e8: 6023 str r3, [r4, #0] UPS.VAC_in = 0; 80289ea: 6063 str r3, [r4, #4] UPS.VAC_out = 0; 80289ec: 60a3 str r3, [r4, #8] UPS.Temp = 0; 80289ee: 60e3 str r3, [r4, #12] UPS.Load = 0; 80289f0: 7425 strb r5, [r4, #16] UPS.SOC = 0; 80289f2: 7465 strb r5, [r4, #17] UPS.work_time = 0; 80289f4: 74a5 strb r5, [r4, #18] UPS.Status = 0; 80289f6: 74e5 strb r5, [r4, #19] UPS.Present = false; 80289f8: f884 502a strb.w r5, [r4, #42] ; 0x2a memset(UPS.model, 0, 11); 80289fc: f7f9 f860 bl 8021ac0 memset(UPS.vertion, 0, 11); 8028a00: f104 001f add.w r0, r4, #31 8028a04: 4629 mov r1, r5 8028a06: 220b movs r2, #11 } 8028a08: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} UPS.work_time = 0; UPS.Status = 0; UPS.Present = false; memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); 8028a0c: f7f9 b858 b.w 8021ac0 8028a10: 2000e954 .word 0x2000e954 08028a14 : } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028a14: b510 push {r4, lr} if(command == ups_test_time){ 8028a16: 2803 cmp r0, #3 memset(UPS.model, 0, 11); memset(UPS.vertion, 0, 11); } void send_MegaTec_cmd(cmdMegaTecEnums_t command) { 8028a18: b086 sub sp, #24 if(command == ups_test_time){ 8028a1a: d10d bne.n 8028a38 uint8_t req[10]; memset(req, 0, 10); 8028a1c: 2100 movs r1, #0 8028a1e: 220a movs r2, #10 8028a20: a803 add r0, sp, #12 8028a22: f7f9 f84d bl 8021ac0 sprintf(req, "%s%d\r", MegaTecCMD[command], TimeParam); 8028a26: 4b18 ldr r3, [pc, #96] ; (8028a88 ) 8028a28: 4918 ldr r1, [pc, #96] ; (8028a8c ) 8028a2a: 68da ldr r2, [r3, #12] 8028a2c: 4b18 ldr r3, [pc, #96] ; (8028a90 ) 8028a2e: a803 add r0, sp, #12 8028a30: 881b ldrh r3, [r3, #0] 8028a32: f7fe feb5 bl 80277a0 8028a36: e015 b.n 8028a64 ups_send_block(req, strlen(req)); } else if(command == ups_shutdown){ 8028a38: 2805 cmp r0, #5 8028a3a: d022 beq.n 8028a82 } else if(command == ups_shutdown_restore){ 8028a3c: 2806 cmp r0, #6 8028a3e: 4c12 ldr r4, [pc, #72] ; (8028a88 ) 8028a40: d116 bne.n 8028a70 uint8_t req[10]; memset(req, 0, 10); 8028a42: 2100 movs r1, #0 8028a44: 220a movs r2, #10 8028a46: a803 add r0, sp, #12 8028a48: f7f9 f83a bl 8021ac0 sprintf(req, "%s.%d%s%d\r", MegaTecCMD[command-1], TimeParam, MegaTecCMD[command], TimeParam2); 8028a4c: 69a2 ldr r2, [r4, #24] 8028a4e: 4b10 ldr r3, [pc, #64] ; (8028a90 ) 8028a50: 4910 ldr r1, [pc, #64] ; (8028a94 ) 8028a52: 881b ldrh r3, [r3, #0] 8028a54: 9200 str r2, [sp, #0] 8028a56: 4a10 ldr r2, [pc, #64] ; (8028a98 ) 8028a58: 8812 ldrh r2, [r2, #0] 8028a5a: 9201 str r2, [sp, #4] 8028a5c: a803 add r0, sp, #12 8028a5e: 6962 ldr r2, [r4, #20] 8028a60: f7fe fe9e bl 80277a0 ups_send_block(req, strlen(req)); 8028a64: a803 add r0, sp, #12 8028a66: f7f9 fa03 bl 8021e70 8028a6a: b2c1 uxtb r1, r0 8028a6c: a803 add r0, sp, #12 8028a6e: e006 b.n 8028a7e } else{ ups_send_block(MegaTecCMD[command], strlen(MegaTecCMD[command])); 8028a70: f854 4020 ldr.w r4, [r4, r0, lsl #2] 8028a74: 4620 mov r0, r4 8028a76: f7f9 f9fb bl 8021e70 8028a7a: b2c1 uxtb r1, r0 8028a7c: 4620 mov r0, r4 8028a7e: f7fe f8fd bl 8026c7c } } 8028a82: b006 add sp, #24 8028a84: bd10 pop {r4, pc} 8028a86: bf00 nop 8028a88: 200015b0 .word 0x200015b0 8028a8c: 08036e3b .word 0x08036e3b 8028a90: 2000296c .word 0x2000296c 8028a94: 08036e36 .word 0x08036e36 8028a98: 20002936 .word 0x20002936 08028a9c : bool ups_megatec_rx_pdu(void) { 8028a9c: b510 push {r4, lr} int c = 0; ups_pdu.len = 0; 8028a9e: 4c0e ldr r4, [pc, #56] ; (8028ad8 ) 8028aa0: 2000 movs r0, #0 8028aa2: 8660 strh r0, [r4, #50] ; 0x32 while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8028aa4: e00d b.n 8028ac2 c = ups_getchar(500);//portMAX_DELAY 8028aa6: f44f 70fa mov.w r0, #500 ; 0x1f4 8028aaa: f7fe f90b bl 8026cc4 if(c < 0) 8028aae: 2800 cmp r0, #0 8028ab0: da03 bge.n 8028aba { ups_pdu.len = 0; 8028ab2: 4b09 ldr r3, [pc, #36] ; (8028ad8 ) 8028ab4: 2200 movs r2, #0 8028ab6: 865a strh r2, [r3, #50] ; 0x32 break; 8028ab8: e008 b.n 8028acc } ups_pdu.data[ups_pdu.len++] = c; 8028aba: 8e63 ldrh r3, [r4, #50] ; 0x32 8028abc: 54e0 strb r0, [r4, r3] 8028abe: 3301 adds r3, #1 8028ac0: 8663 strh r3, [r4, #50] ; 0x32 { int c = 0; ups_pdu.len = 0; while ((ups_pdu.len < UPS_PDU_MAX_LEN) && (c != 0x0d)) { 8028ac2: 8e63 ldrh r3, [r4, #50] ; 0x32 8028ac4: 2b31 cmp r3, #49 ; 0x31 8028ac6: d801 bhi.n 8028acc 8028ac8: 280d cmp r0, #13 8028aca: d1ec bne.n 8028aa6 break; } ups_pdu.data[ups_pdu.len++] = c; } if (ups_pdu.len == 0) 8028acc: 4b02 ldr r3, [pc, #8] ; (8028ad8 ) 8028ace: 8e58 ldrh r0, [r3, #50] ; 0x32 return false; return true; } 8028ad0: 3000 adds r0, #0 8028ad2: bf18 it ne 8028ad4: 2001 movne r0, #1 8028ad6: bd10 pop {r4, pc} 8028ad8: 20002938 .word 0x20002938 08028adc : void ups_status_response(char *data) { 8028adc: 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] != '(') 8028ae0: 7803 ldrb r3, [r0, #0] 8028ae2: 2b28 cmp r3, #40 ; 0x28 8028ae4: f040 80c1 bne.w 8028c6a return; data++; 8028ae8: 1c44 adds r4, r0, #1 memset(value, 0, 10); 8028aea: 220a movs r2, #10 8028aec: 2100 movs r1, #0 8028aee: a801 add r0, sp, #4 8028af0: f7f8 ffe6 bl 8021ac0 endValue = strpbrk(data," "); 8028af4: 4620 mov r0, r4 8028af6: 495e ldr r1, [pc, #376] ; (8028c70 ) 8028af8: f7f9 faa4 bl 8022044 len = endValue - data; 8028afc: 1b00 subs r0, r0, r4 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028afe: b2c6 uxtb r6, r0 data++; memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028b00: 4632 mov r2, r6 8028b02: 4621 mov r1, r4 8028b04: a801 add r0, sp, #4 8028b06: f7f9 fa6b bl 8021fe0 data += (len + 1); UPS.VAC_in = atof(value); 8028b0a: a801 add r0, sp, #4 8028b0c: f7f8 feb4 bl 8021878 8028b10: f7f8 f818 bl 8020b44 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028b14: 3601 adds r6, #1 8028b16: 19a6 adds r6, r4, r6 UPS.VAC_in = atof(value); 8028b18: 4c56 ldr r4, [pc, #344] ; (8028c74 ) //TODO memset(value, 0, 10); 8028b1a: 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); 8028b1c: 6060 str r0, [r4, #4] //TODO memset(value, 0, 10); 8028b1e: 2100 movs r1, #0 8028b20: a801 add r0, sp, #4 8028b22: f7f8 ffcd bl 8021ac0 endValue = strpbrk(data," "); 8028b26: 4630 mov r0, r6 8028b28: 4951 ldr r1, [pc, #324] ; (8028c70 ) 8028b2a: f7f9 fa8b bl 8022044 len = endValue - data; 8028b2e: 1b80 subs r0, r0, r6 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028b30: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028b32: 4631 mov r1, r6 8028b34: 462a mov r2, r5 8028b36: a801 add r0, sp, #4 data += (len + 1); 8028b38: 3501 adds r5, #1 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028b3a: f7f9 fa51 bl 8021fe0 data += (len + 1); 8028b3e: 1975 adds r5, r6, r5 memset(value, 0, 10); 8028b40: 220a movs r2, #10 8028b42: 2100 movs r1, #0 8028b44: a801 add r0, sp, #4 8028b46: f7f8 ffbb bl 8021ac0 endValue = strpbrk(data," "); 8028b4a: 4628 mov r0, r5 8028b4c: 4948 ldr r1, [pc, #288] ; (8028c70 ) 8028b4e: f7f9 fa79 bl 8022044 len = endValue - data; 8028b52: 1b40 subs r0, r0, r5 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028b54: fa5f f880 uxtb.w r8, r0 data += (len + 1); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028b58: 4642 mov r2, r8 8028b5a: 4629 mov r1, r5 8028b5c: a801 add r0, sp, #4 8028b5e: f7f9 fa3f bl 8021fe0 data += (len + 1); UPS.VAC_out = atof(value); 8028b62: a801 add r0, sp, #4 8028b64: f7f8 fe88 bl 8021878 8028b68: f7f7 ffec bl 8020b44 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028b6c: f108 0801 add.w r8, r8, #1 8028b70: 44a8 add r8, r5 UPS.VAC_out = atof(value); memset(value, 0, 10); 8028b72: 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); 8028b74: 60a0 str r0, [r4, #8] memset(value, 0, 10); 8028b76: 2100 movs r1, #0 8028b78: a801 add r0, sp, #4 8028b7a: f7f8 ffa1 bl 8021ac0 endValue = strpbrk(data," "); 8028b7e: 493c ldr r1, [pc, #240] ; (8028c70 ) 8028b80: 4640 mov r0, r8 8028b82: f7f9 fa5f bl 8022044 len = endValue - data; 8028b86: ebc8 0000 rsb r0, r8, r0 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028b8a: b2c7 uxtb r7, r0 UPS.VAC_out = atof(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028b8c: 463a mov r2, r7 8028b8e: 4641 mov r1, r8 8028b90: a801 add r0, sp, #4 8028b92: f7f9 fa25 bl 8021fe0 data += (len + 1); UPS.Load = atoi(value); 8028b96: a801 add r0, sp, #4 8028b98: f7f8 fe72 bl 8021880 memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028b9c: 3701 adds r7, #1 8028b9e: 4447 add r7, r8 UPS.Load = atoi(value); memset(value, 0, 10); 8028ba0: 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); 8028ba2: 7420 strb r0, [r4, #16] memset(value, 0, 10); 8028ba4: 2100 movs r1, #0 8028ba6: a801 add r0, sp, #4 8028ba8: f7f8 ff8a bl 8021ac0 endValue = strpbrk(data," "); 8028bac: 4930 ldr r1, [pc, #192] ; (8028c70 ) 8028bae: 4638 mov r0, r7 8028bb0: f7f9 fa48 bl 8022044 len = endValue - data; 8028bb4: 1bc0 subs r0, r0, r7 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028bb6: b2c6 uxtb r6, r0 UPS.Load = atoi(value); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028bb8: 4632 mov r2, r6 8028bba: 4639 mov r1, r7 8028bbc: a801 add r0, sp, #4 8028bbe: f7f9 fa0f bl 8021fe0 data += (len + 1); UPS.Freq_in = atof(value); 8028bc2: a801 add r0, sp, #4 8028bc4: f7f8 fe58 bl 8021878 8028bc8: f7f7 ffbc bl 8020b44 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028bcc: 3601 adds r6, #1 8028bce: 19be adds r6, r7, r6 UPS.Freq_in = atof(value); 8028bd0: 6020 str r0, [r4, #0] //TODO memset(value, 0, 10); 8028bd2: 220a movs r2, #10 8028bd4: 2100 movs r1, #0 8028bd6: a801 add r0, sp, #4 8028bd8: f7f8 ff72 bl 8021ac0 endValue = strpbrk(data," "); 8028bdc: 4630 mov r0, r6 8028bde: 4924 ldr r1, [pc, #144] ; (8028c70 ) 8028be0: f7f9 fa30 bl 8022044 len = endValue - data; 8028be4: 1b80 subs r0, r0, r6 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028be6: b2c5 uxtb r5, r0 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028be8: 4631 mov r1, r6 8028bea: 462a mov r2, r5 8028bec: a801 add r0, sp, #4 data += (len + 1); 8028bee: 3501 adds r5, #1 //TODO memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028bf0: f7f9 f9f6 bl 8021fe0 data += (len + 1); 8028bf4: 1975 adds r5, r6, r5 memset(value, 0, 10); 8028bf6: 220a movs r2, #10 8028bf8: 2100 movs r1, #0 8028bfa: a801 add r0, sp, #4 8028bfc: f7f8 ff60 bl 8021ac0 endValue = strpbrk(data," "); 8028c00: 4628 mov r0, r5 8028c02: 491b ldr r1, [pc, #108] ; (8028c70 ) 8028c04: f7f9 fa1e bl 8022044 len = endValue - data; 8028c08: 1b40 subs r0, r0, r5 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028c0a: b2c6 uxtb r6, r0 data += (len + 1); memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); 8028c0c: 4632 mov r2, r6 8028c0e: 4629 mov r1, r5 8028c10: a801 add r0, sp, #4 8028c12: f7f9 f9e5 bl 8021fe0 data += (len + 1); UPS.Temp = atof(value); 8028c16: a801 add r0, sp, #4 8028c18: f7f8 fe2e bl 8021878 8028c1c: f7f7 ff92 bl 8020b44 <__aeabi_d2f> memset(value, 0, 10); endValue = strpbrk(data," "); len = endValue - data; strncpy(value, data, len); data += (len + 1); 8028c20: 3601 adds r6, #1 8028c22: 19ad adds r5, r5, r6 UPS.Temp = atof(value); 8028c24: 60e0 str r0, [r4, #12] memset(value, 0, 10); 8028c26: 220a movs r2, #10 8028c28: 2100 movs r1, #0 8028c2a: a801 add r0, sp, #4 8028c2c: f7f8 ff48 bl 8021ac0 endValue = strpbrk(data,"\r"); 8028c30: 4911 ldr r1, [pc, #68] ; (8028c78 ) 8028c32: 4628 mov r0, r5 8028c34: f7f9 fa06 bl 8022044 len = endValue - data; 8028c38: 1b40 subs r0, r0, r5 8028c3a: b2c4 uxtb r4, r0 strncpy(value, data, len); 8028c3c: 4629 mov r1, r5 8028c3e: a801 add r0, sp, #4 8028c40: 4622 mov r2, r4 8028c42: f7f9 f9cd bl 8021fe0 uint8_t stat = 0; for(i = 0; i < len; i ++) 8028c46: 2300 movs r3, #0 memset(value, 0, 10); endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(value, data, len); uint8_t stat = 0; 8028c48: 4619 mov r1, r3 for(i = 0; i < len; i ++) 8028c4a: e009 b.n 8028c60 { stat |= (value[i] - 0x30) << (7-i); 8028c4c: aa01 add r2, sp, #4 return false; return true; } void ups_status_response(char *data) 8028c4e: 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); 8028c52: 5c9a ldrb r2, [r3, r2] 8028c54: 3a30 subs r2, #48 ; 0x30 8028c56: fa02 f200 lsl.w r2, r2, r0 8028c5a: 4311 orrs r1, r2 8028c5c: b2c9 uxtb r1, r1 8028c5e: 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 ++) 8028c60: b2da uxtb r2, r3 8028c62: 42a2 cmp r2, r4 8028c64: d3f2 bcc.n 8028c4c { stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; 8028c66: 4b03 ldr r3, [pc, #12] ; (8028c74 ) 8028c68: 74d9 strb r1, [r3, #19] } 8028c6a: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 8028c6e: bf00 nop 8028c70: 08036e41 .word 0x08036e41 8028c74: 2000e954 .word 0x2000e954 8028c78: 08041ec1 .word 0x08041ec1 08028c7c : void ups_info_response(char *data) { 8028c7c: b538 push {r3, r4, r5, lr} uint8_t i = 0; char *endValue; uint8_t len = 0; if(data[0] != '#') 8028c7e: 7803 ldrb r3, [r0, #0] 8028c80: 2b23 cmp r3, #35 ; 0x23 8028c82: d123 bne.n 8028ccc return; data++; data += 16; 8028c84: 3011 adds r0, #17 while(data[0] == ' '){ 8028c86: 4603 mov r3, r0 8028c88: 461c mov r4, r3 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8028c8a: 1a1a subs r2, r3, r0 data++; data += 16; while(data[0] == ' '){ 8028c8c: 7821 ldrb r1, [r4, #0] 8028c8e: 3301 adds r3, #1 8028c90: 2920 cmp r1, #32 stat |= (value[i] - 0x30) << (7-i); } UPS.Status = stat; } void ups_info_response(char *data) 8028c92: b2d2 uxtb r2, r2 data++; data += 16; while(data[0] == ' '){ 8028c94: d0f8 beq.n 8028c88 data ++; i ++; } if(i < 11){ 8028c96: 2a0a cmp r2, #10 8028c98: d80c bhi.n 8028cb4 endValue = strpbrk(data," "); 8028c9a: 4620 mov r0, r4 8028c9c: 490c ldr r1, [pc, #48] ; (8028cd0 ) 8028c9e: f7f9 f9d1 bl 8022044 len = endValue - data; 8028ca2: 1b00 subs r0, r0, r4 void ups_megatec_init(void) { init_UPS_value(); xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); } 8028ca4: b2c5 uxtb r5, r0 i ++; } if(i < 11){ endValue = strpbrk(data," "); len = endValue - data; strncpy(UPS.model, data, len); 8028ca6: 4621 mov r1, r4 8028ca8: 462a mov r2, r5 8028caa: 480a ldr r0, [pc, #40] ; (8028cd4 ) 8028cac: f7f9 f998 bl 8021fe0 data += (len + 1); 8028cb0: 3501 adds r5, #1 8028cb2: 1964 adds r4, r4, r5 } endValue = strpbrk(data,"\r"); 8028cb4: 4620 mov r0, r4 8028cb6: 4908 ldr r1, [pc, #32] ; (8028cd8 ) 8028cb8: f7f9 f9c4 bl 8022044 len = endValue - data; 8028cbc: 1b02 subs r2, r0, r4 strncpy(UPS.vertion, data, len); 8028cbe: 4807 ldr r0, [pc, #28] ; (8028cdc ) 8028cc0: 4621 mov r1, r4 8028cc2: b2d2 uxtb r2, r2 } 8028cc4: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} data += (len + 1); } endValue = strpbrk(data,"\r"); len = endValue - data; strncpy(UPS.vertion, data, len); 8028cc8: f7f9 b98a b.w 8021fe0 8028ccc: bd38 pop {r3, r4, r5, pc} 8028cce: bf00 nop 8028cd0: 08036e41 .word 0x08036e41 8028cd4: 2000e968 .word 0x2000e968 8028cd8: 08041ec1 .word 0x08041ec1 8028cdc: 2000e973 .word 0x2000e973 08028ce0 : } return -1; } void request_task(void) { 8028ce0: b570 push {r4, r5, r6, lr} for(;;) { if(megatec_send){ 8028ce2: 4c11 ldr r4, [pc, #68] ; (8028d28 ) megatec_send= false; 8028ce4: 2500 movs r5, #0 send_MegaTec_cmd(ups_status_req); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_status_req); megatec_send=true; 8028ce6: 2601 movs r6, #1 void request_task(void) { for(;;) { if(megatec_send){ 8028ce8: 7823 ldrb r3, [r4, #0] 8028cea: b153 cbz r3, 8028d02 megatec_send= false; send_MegaTec_cmd(ups_status_req); 8028cec: 2000 movs r0, #0 { for(;;) { if(megatec_send){ megatec_send= false; 8028cee: 7025 strb r5, [r4, #0] send_MegaTec_cmd(ups_status_req); 8028cf0: f7ff fe90 bl 8028a14 if (ups_megatec_rx_pdu()) 8028cf4: f7ff fed2 bl 8028a9c 8028cf8: b110 cbz r0, 8028d00 void ups_megatec_process_pdu(cmdMegaTecEnums_t command) { switch(command) { case ups_status_req: ups_status_response(ups_pdu.data); 8028cfa: 480c ldr r0, [pc, #48] ; (8028d2c ) 8028cfc: f7ff feee bl 8028adc megatec_send= false; send_MegaTec_cmd(ups_status_req); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_status_req); megatec_send=true; 8028d00: 7026 strb r6, [r4, #0] } //vTaskDelay(100); if(megatec_send){ 8028d02: 7823 ldrb r3, [r4, #0] 8028d04: b153 cbz r3, 8028d1c megatec_send = false; send_MegaTec_cmd(ups_info); 8028d06: 2009 movs r0, #9 megatec_send=true; } //vTaskDelay(100); if(megatec_send){ megatec_send = false; 8028d08: 7025 strb r5, [r4, #0] send_MegaTec_cmd(ups_info); 8028d0a: f7ff fe83 bl 8028a14 if (ups_megatec_rx_pdu()) 8028d0e: f7ff fec5 bl 8028a9c 8028d12: b110 cbz r0, 8028d1a { case ups_status_req: ups_status_response(ups_pdu.data); break; case ups_info: ups_info_response(ups_pdu.data); 8028d14: 4805 ldr r0, [pc, #20] ; (8028d2c ) 8028d16: f7ff ffb1 bl 8028c7c if(megatec_send){ megatec_send = false; send_MegaTec_cmd(ups_info); if (ups_megatec_rx_pdu()) ups_megatec_process_pdu(ups_info); megatec_send = true; 8028d1a: 7026 strb r6, [r4, #0] } vTaskDelay(1000); 8028d1c: f44f 707a mov.w r0, #1000 ; 0x3e8 8028d20: f001 f8c0 bl 8029ea4 } 8028d24: e7e0 b.n 8028ce8 8028d26: bf00 nop 8028d28: 200015ac .word 0x200015ac 8028d2c: 20002938 .word 0x20002938 08028d30 : break; } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { 8028d30: b570 push {r4, r5, r6, lr} 8028d32: 4606 mov r6, r0 while(!megatec_send) 8028d34: 4c14 ldr r4, [pc, #80] ; (8028d88 ) 8028d36: e002 b.n 8028d3e { vTaskDelay(50); 8028d38: 2032 movs r0, #50 ; 0x32 8028d3a: f001 f8b3 bl 8029ea4 } } int ups_metac_service_pdu(cmdMegaTecEnums_t command) { while(!megatec_send) 8028d3e: 7823 ldrb r3, [r4, #0] 8028d40: 4d11 ldr r5, [pc, #68] ; (8028d88 ) 8028d42: 2b00 cmp r3, #0 8028d44: d0f8 beq.n 8028d38 { vTaskDelay(50); } megatec_send = false; 8028d46: 2300 movs r3, #0 send_MegaTec_cmd(command); 8028d48: 4630 mov r0, r6 { while(!megatec_send) { vTaskDelay(50); } megatec_send = false; 8028d4a: 702b strb r3, [r5, #0] send_MegaTec_cmd(command); 8028d4c: f7ff fe62 bl 8028a14 if (ups_megatec_rx_pdu()) 8028d50: f7ff fea4 bl 8028a9c 8028d54: b190 cbz r0, 8028d7c { megatec_send = true; 8028d56: 2401 movs r4, #1 if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8028d58: 480c ldr r0, [pc, #48] ; (8028d8c ) 8028d5a: 490d ldr r1, [pc, #52] ; (8028d90 ) } megatec_send = false; send_MegaTec_cmd(command); if (ups_megatec_rx_pdu()) { megatec_send = true; 8028d5c: 702c strb r4, [r5, #0] if(strncmp(ups_pdu.data, "ACK", 3) == 0) 8028d5e: 2203 movs r2, #3 8028d60: f7f9 f8e8 bl 8021f34 8028d64: b168 cbz r0, 8028d82 return 1; else if(strncmp(ups_pdu.data, "NCK", 3) == 0) 8028d66: 490b ldr r1, [pc, #44] ; (8028d94 ) 8028d68: 4808 ldr r0, [pc, #32] ; (8028d8c ) 8028d6a: 2203 movs r2, #3 8028d6c: f7f9 f8e2 bl 8021f34 return 0; 8028d70: 2800 cmp r0, #0 8028d72: bf14 ite ne 8028d74: f04f 30ff movne.w r0, #4294967295 8028d78: 2000 moveq r0, #0 8028d7a: bd70 pop {r4, r5, r6, pc} } return -1; 8028d7c: f04f 30ff mov.w r0, #4294967295 8028d80: 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; 8028d82: 4620 mov r0, r4 else if(strncmp(ups_pdu.data, "NCK", 3) == 0) return 0; } return -1; } 8028d84: bd70 pop {r4, r5, r6, pc} 8028d86: bf00 nop 8028d88: 200015ac .word 0x200015ac 8028d8c: 20002938 .word 0x20002938 8028d90: 08036e43 .word 0x08036e43 8028d94: 08036e47 .word 0x08036e47 08028d98 : vTaskDelay(1000); } } void ups_megatec_init(void) { 8028d98: b51f push {r0, r1, r2, r3, r4, lr} init_UPS_value(); 8028d9a: f7ff fe1d bl 80289d8 xTaskCreate(request_task, ( char * ) "request_task", configMINIMAL_STACK_SIZE * 2, NULL, tskIDLE_PRIORITY, NULL); 8028d9e: 2300 movs r3, #0 8028da0: 9300 str r3, [sp, #0] 8028da2: 9301 str r3, [sp, #4] 8028da4: 9302 str r3, [sp, #8] 8028da6: 9303 str r3, [sp, #12] 8028da8: 4903 ldr r1, [pc, #12] ; (8028db8 ) 8028daa: 4804 ldr r0, [pc, #16] ; (8028dbc ) 8028dac: f44f 7280 mov.w r2, #256 ; 0x100 8028db0: f000 fdde bl 8029970 } 8028db4: b005 add sp, #20 8028db6: bd00 pop {pc} 8028db8: 08036e4b .word 0x08036e4b 8028dbc: 08028ce1 .word 0x08028ce1 08028dc0 : #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; 8028dc0: 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; 8028dc2: e880 0006 stmia.w r0, {r1, r2} rbuf32->read_index = 0; 8028dc6: 6083 str r3, [r0, #8] rbuf32->write_index = 0; 8028dc8: 60c3 str r3, [r0, #12] 8028dca: 4770 bx lr 08028dcc : return full_space; } bool rbuf_isfull(rbuf_t *rbuf) { int r_tmp; if (rbuf->write_index == (rbuf->size - 1)) { 8028dcc: 6842 ldr r2, [r0, #4] 8028dce: 68c3 ldr r3, [r0, #12] 8028dd0: 6880 ldr r0, [r0, #8] 8028dd2: 1e51 subs r1, r2, #1 8028dd4: 428b cmp r3, r1 r_tmp = rbuf->read_index + rbuf->size; 8028dd6: bf08 it eq 8028dd8: 1810 addeq r0, r2, r0 } else r_tmp = rbuf->read_index; if (r_tmp - rbuf->write_index == 1) 8028dda: 1ac0 subs r0, r0, r3 return true; else return false; } 8028ddc: 1e42 subs r2, r0, #1 8028dde: 4250 negs r0, r2 8028de0: 4150 adcs r0, r2 8028de2: 4770 bx lr 08028de4 : rbuf64->read_index = 0; rbuf64->write_index = 0; } bool rbuf_isempty(rbuf_t *rbuf) { if (rbuf->read_index == rbuf->write_index) 8028de4: 6883 ldr r3, [r0, #8] 8028de6: 68c2 ldr r2, [r0, #12] 8028de8: 4293 cmp r3, r2 8028dea: d105 bne.n 8028df8 8028dec: e002 b.n 8028df4 /* 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; 8028dee: 2300 movs r3, #0 8028df0: 6083 str r3, [r0, #8] 8028df2: e00a b.n 8028e0a return true; } else return false; 8028df4: 2000 movs r0, #0 8028df6: 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++]; 8028df8: 6802 ldr r2, [r0, #0] 8028dfa: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8028dfe: 600a str r2, [r1, #0] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8028e00: 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++]; 8028e02: 3301 adds r3, #1 /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8028e04: 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++]; 8028e06: 6083 str r3, [r0, #8] /* swap the read pointer */ if (rbuf32->read_index == (rbuf32->size)) 8028e08: d0f1 beq.n 8028dee rbuf32->read_index = 0; return true; 8028e0a: 2001 movs r0, #1 } else return false; } 8028e0c: 4770 bx lr 08028e0e : /* * 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) { 8028e0e: b538 push {r3, r4, r5, lr} 8028e10: 4604 mov r4, r0 8028e12: 460d mov r5, r1 if(!rbuf_isfull(rbuf32)) 8028e14: f7ff ffda bl 8028dcc 8028e18: b950 cbnz r0, 8028e30 { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8028e1a: 68e3 ldr r3, [r4, #12] 8028e1c: 6822 ldr r2, [r4, #0] 8028e1e: f842 5023 str.w r5, [r2, r3, lsl #2] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8028e22: 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; 8028e24: 3301 adds r3, #1 /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8028e26: 4293 cmp r3, r2 */ bool rbuf32_put(rbuf_t *rbuf32, uint32_t data) { if(!rbuf_isfull(rbuf32)) { rbuf32->buf_ptr[rbuf32->write_index++] = data; 8028e28: 60e3 str r3, [r4, #12] /* swap the write pointer */ if (rbuf32->write_index == (rbuf32->size)) 8028e2a: d103 bne.n 8028e34 rbuf32->write_index = 0; 8028e2c: 60e0 str r0, [r4, #12] 8028e2e: e001 b.n 8028e34 return true; } else return false; 8028e30: 2000 movs r0, #0 8028e32: 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)) 8028e34: 2001 movs r0, #1 rbuf32->write_index = 0; return true; } else return false; } 8028e36: bd38 pop {r3, r4, r5, pc} 08028e38 : #include #include /* Converts a hex character to its integer value */ char from_hex(char ch) { return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10; 8028e38: 4b08 ldr r3, [pc, #32] ; (8028e5c ) 8028e3a: 681b ldr r3, [r3, #0] 8028e3c: 181b adds r3, r3, r0 8028e3e: 785b ldrb r3, [r3, #1] 8028e40: f003 0204 and.w r2, r3, #4 8028e44: b2d2 uxtb r2, r2 8028e46: b10a cbz r2, 8028e4c 8028e48: 3830 subs r0, #48 ; 0x30 8028e4a: e005 b.n 8028e58 8028e4c: f003 0303 and.w r3, r3, #3 8028e50: 2b01 cmp r3, #1 8028e52: bf08 it eq 8028e54: 3020 addeq r0, #32 8028e56: 3857 subs r0, #87 ; 0x57 8028e58: b2c0 uxtb r0, r0 } 8028e5a: 4770 bx lr 8028e5c: 20000000 .word 0x20000000 08028e60 : 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) { 8028e60: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8028e64: 4607 mov r7, r0 8028e66: 460e mov r6, r1 char *pstr = inbuf, *buf = outbuf, *pbuf = buf; 8028e68: 4604 mov r4, r0 8028e6a: 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++ = ' '; 8028e6c: 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) { 8028e70: e01e b.n 8028eb0 if (*pstr == '%') { 8028e72: 2b25 cmp r3, #37 ; 0x25 8028e74: d112 bne.n 8028e9c if (pstr[1] && pstr[2]) { 8028e76: 7868 ldrb r0, [r5, #1] 8028e78: b1c0 cbz r0, 8028eac 8028e7a: f895 8002 ldrb.w r8, [r5, #2] 8028e7e: f1b8 0f00 cmp.w r8, #0 8028e82: d013 beq.n 8028eac *pbuf++ = from_hex(pstr[1]) << 4 | from_hex(pstr[2]); 8028e84: f7ff ffd8 bl 8028e38 8028e88: 4682 mov sl, r0 8028e8a: 4640 mov r0, r8 8028e8c: f7ff ffd4 bl 8028e38 8028e90: ea40 100a orr.w r0, r0, sl, lsl #4 8028e94: f804 0b01 strb.w r0, [r4], #1 pstr += 2; 8028e98: 3502 adds r5, #2 8028e9a: e007 b.n 8028eac } } else if (*pstr == '+') { 8028e9c: 2b2b cmp r3, #43 ; 0x2b 8028e9e: f104 0201 add.w r2, r4, #1 *pbuf++ = ' '; 8028ea2: bf0c ite eq 8028ea4: f884 9000 strbeq.w r9, [r4] } else { *pbuf++ = *pstr; 8028ea8: 7023 strbne r3, [r4, #0] 8028eaa: 4614 mov r4, r2 } pstr++; 8028eac: 3501 adds r5, #1 outlen--; 8028eae: 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) { 8028eb0: 782b ldrb r3, [r5, #0] 8028eb2: b10b cbz r3, 8028eb8 8028eb4: 2e01 cmp r6, #1 8028eb6: d8dc bhi.n 8028e72 *pbuf++ = *pstr; } pstr++; outlen--; } *pbuf = '\0'; 8028eb8: 2300 movs r3, #0 8028eba: 7023 strb r3, [r4, #0] return buf; } 8028ebc: 4638 mov r0, r7 8028ebe: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8028ec2: 0000 movs r0, r0 08028ec4 : /** * @brief Мониторинг бита DI0 state */ void UPS_DI0Monitor(void) { 8028ec4: b510 push {r4, lr} static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 8028ec6: 2006 movs r0, #6 8028ec8: f7ff fd7e bl 80289c8 if (!isValueRecv) { 8028ecc: 4a0e ldr r2, [pc, #56] ; (8028f08 ) 8028ece: 4b0f ldr r3, [pc, #60] ; (8028f0c ) 8028ed0: 7811 ldrb r1, [r2, #0] { static bool isValueRecv = false; static uint8_t DI0OldState = 0; uint8_t DI0StateCurrent; DI0StateCurrent = get_state_din_outs(DIN1); 8028ed2: 4604 mov r4, r0 if (!isValueRecv) { 8028ed4: b911 cbnz r1, 8028edc isValueRecv = true; 8028ed6: 2101 movs r1, #1 8028ed8: 7011 strb r1, [r2, #0] 8028eda: e012 b.n 8028f02 DI0OldState = DI0StateCurrent; return; } if (DI0StateCurrent) 8028edc: b110 cbz r0, 8028ee4 flCriticalAlarm = true; 8028ede: 4a0c ldr r2, [pc, #48] ; (8028f10 ) 8028ee0: 2101 movs r1, #1 8028ee2: 7011 strb r1, [r2, #0] // Значение параметра изменилось if (DI0StateCurrent != DI0OldState) 8028ee4: 781b ldrb r3, [r3, #0] 8028ee6: 42a3 cmp r3, r4 8028ee8: d00a beq.n 8028f00 { if(sSettings.sInOuts.din_type_act[0] == SNMP_TRAP) 8028eea: 4b0a ldr r3, [pc, #40] ; (8028f14 ) 8028eec: f893 337a ldrb.w r3, [r3, #890] ; 0x37a 8028ef0: 2b02 cmp r3, #2 8028ef2: d105 bne.n 8028f00 { if (DI0StateCurrent) 8028ef4: b10c cbz r4, 8028efa SNMP_SendUserTrap(DI0_NORM); 8028ef6: 2005 movs r0, #5 8028ef8: e000 b.n 8028efc else SNMP_SendUserTrap(DI0_ALARM); 8028efa: 2006 movs r0, #6 8028efc: f00c fd3c bl 8035978 } } DI0OldState = DI0StateCurrent; 8028f00: 4b02 ldr r3, [pc, #8] ; (8028f0c ) 8028f02: 701c strb r4, [r3, #0] 8028f04: bd10 pop {r4, pc} 8028f06: bf00 nop 8028f08: 20002977 .word 0x20002977 8028f0c: 20002974 .word 0x20002974 8028f10: 20002975 .word 0x20002975 8028f14: 2000e984 .word 0x2000e984 08028f18 : static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8028f18: 4b24 ldr r3, [pc, #144] ; (8028fac ) /** * @brief Мониторинг бита CriticalAlarm */ void UPS_CriticalAlarmMonitor(void) { 8028f1a: b570 push {r4, r5, r6, lr} static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8028f1c: f893 6378 ldrb.w r6, [r3, #888] ; 0x378 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8028f20: f893 5379 ldrb.w r5, [r3, #889] ; 0x379 CriticalAlarmCurrent = flCriticalAlarm; 8028f24: 4b22 ldr r3, [pc, #136] ; (8028fb0 ) 8028f26: 781c ldrb r4, [r3, #0] if (!isValueRecv) { 8028f28: 4b22 ldr r3, [pc, #136] ; (8028fb4 ) 8028f2a: 781a ldrb r2, [r3, #0] 8028f2c: b942 cbnz r2, 8028f40 isValueRecv = true; 8028f2e: 2201 movs r2, #1 8028f30: 701a strb r2, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8028f32: 4b21 ldr r3, [pc, #132] ; (8028fb8 ) 8028f34: 701c strb r4, [r3, #0] OldRO0type_Sourse = CurrRO1type_Sourse; 8028f36: 4b21 ldr r3, [pc, #132] ; (8028fbc ) 8028f38: 701e strb r6, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8028f3a: 4b21 ldr r3, [pc, #132] ; (8028fc0 ) 8028f3c: 701d strb r5, [r3, #0] return; 8028f3e: bd70 pop {r4, r5, r6, pc} } if(CriticalAlarmCurrent){ 8028f40: b154 cbz r4, 8028f58 if (UPS.Present) 8028f42: 4b20 ldr r3, [pc, #128] ; (8028fc4 ) 8028f44: f893 302a ldrb.w r3, [r3, #42] ; 0x2a LED_Toggle(LED_MAJOR_R); 8028f48: 200b movs r0, #11 OldRO2type_Sourse = CurrRO2type_Sourse; return; } if(CriticalAlarmCurrent){ if (UPS.Present) 8028f4a: b113 cbz r3, 8028f52 LED_Toggle(LED_MAJOR_R); 8028f4c: f7ff fcc2 bl 80288d4 8028f50: e005 b.n 8028f5e else LED_On(LED_MAJOR_R); 8028f52: f7ff fc85 bl 8028860 8028f56: e002 b.n 8028f5e } else{ LED_Off(LED_MAJOR_R); 8028f58: 200b movs r0, #11 8028f5a: f7ff fc84 bl 8028866 } // Значение параметра изменилось if (CriticalAlarmCurrent != CriticalAlarmOldState) 8028f5e: 4b16 ldr r3, [pc, #88] ; (8028fb8 ) 8028f60: 781b ldrb r3, [r3, #0] 8028f62: 42a3 cmp r3, r4 8028f64: d01a beq.n 8028f9c { if(OldRO0type_Sourse == CRITICAL){ 8028f66: 4b15 ldr r3, [pc, #84] ; (8028fbc ) 8028f68: 7818 ldrb r0, [r3, #0] 8028f6a: 2801 cmp r0, #1 8028f6c: d109 bne.n 8028f82 if(CriticalAlarmCurrent) 8028f6e: b10c cbz r4, 8028f74 SetROInt(1, 0); 8028f70: 2100 movs r1, #0 8028f72: e001 b.n 8028f78 else SetROInt(0, 0); 8028f74: 4620 mov r0, r4 8028f76: 4621 mov r1, r4 8028f78: f7ff fa29 bl 80283ce SNMP_SendUserTrap(DO0_TOGGLED); 8028f7c: 2007 movs r0, #7 8028f7e: f00c fcfb bl 8035978 } if(OldRO2type_Sourse == CRITICAL){ 8028f82: 4b0f ldr r3, [pc, #60] ; (8028fc0 ) 8028f84: 7819 ldrb r1, [r3, #0] 8028f86: 2901 cmp r1, #1 8028f88: d108 bne.n 8028f9c if(CriticalAlarmCurrent) 8028f8a: b10c cbz r4, 8028f90 SetROInt(1, 1); 8028f8c: 4608 mov r0, r1 8028f8e: e000 b.n 8028f92 else SetROInt(0, 1); 8028f90: 4620 mov r0, r4 8028f92: f7ff fa1c bl 80283ce SNMP_SendUserTrap(DO1_TOGGLED); 8028f96: 2008 movs r0, #8 8028f98: f00c fcee bl 8035978 SetROInt(0, 1); SNMP_SendUserTrap(DO1_TOGGLED); } } OldRO0type_Sourse = CurrRO1type_Sourse; 8028f9c: 4b07 ldr r3, [pc, #28] ; (8028fbc ) 8028f9e: 701e strb r6, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8028fa0: 4b07 ldr r3, [pc, #28] ; (8028fc0 ) 8028fa2: 701d strb r5, [r3, #0] CriticalAlarmOldState = CriticalAlarmCurrent; 8028fa4: 4b04 ldr r3, [pc, #16] ; (8028fb8 ) 8028fa6: 701c strb r4, [r3, #0] 8028fa8: bd70 pop {r4, r5, r6, pc} 8028faa: bf00 nop 8028fac: 2000e984 .word 0x2000e984 8028fb0: 20002975 .word 0x20002975 8028fb4: 2000297d .word 0x2000297d 8028fb8: 2000297e .word 0x2000297e 8028fbc: 20002976 .word 0x20002976 8028fc0: 20002979 .word 0x20002979 8028fc4: 2000e954 .word 0x2000e954 08028fc8 : static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8028fc8: 4b1b ldr r3, [pc, #108] ; (8029038 ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { 8028fca: 491c ldr r1, [pc, #112] ; (802903c ) 8028fcc: 4a1c ldr r2, [pc, #112] ; (8029040 ) 8028fce: 7808 ldrb r0, [r1, #0] /** * @brief Мониторинг бита NonCriticalAlarm */ void UPS_NonCriticalAlarmMonitor(void) { 8028fd0: b570 push {r4, r5, r6, lr} static uint8_t OldRO0type_Sourse = 0; static uint8_t OldRO2type_Sourse = 0; uint8_t CurrRO2type_Sourse = 0; uint8_t CurrRO1type_Sourse = 0; CurrRO1type_Sourse = sSettings.sInOuts.ro_type_source[0]; 8028fd2: f893 6378 ldrb.w r6, [r3, #888] ; 0x378 CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; 8028fd6: f893 5379 ldrb.w r5, [r3, #889] ; 0x379 NonCriticalAlarmCurrent = flNonCriticalAlarm; 8028fda: 4b1a ldr r3, [pc, #104] ; (8029044 ) 8028fdc: 781c ldrb r4, [r3, #0] 8028fde: 4b1a ldr r3, [pc, #104] ; (8029048 ) if (!isValueRecv) { 8028fe0: b930 cbnz r0, 8028ff0 isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; 8028fe2: 701e strb r6, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 8028fe4: 4b19 ldr r3, [pc, #100] ; (802904c ) CurrRO2type_Sourse = sSettings.sInOuts.ro_type_source[1]; NonCriticalAlarmCurrent = flNonCriticalAlarm; if (!isValueRecv) { isValueRecv = true; NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8028fe6: 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; 8028fe8: 2001 movs r0, #1 8028fea: 7008 strb r0, [r1, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; OldRO0type_Sourse = CurrRO1type_Sourse; OldRO2type_Sourse = CurrRO2type_Sourse; 8028fec: 701d strb r5, [r3, #0] return; 8028fee: bd70 pop {r4, r5, r6, pc} } // Значение параметра изменилось if (NonCriticalAlarmCurrent != NonCriticalAlarmOldState) 8028ff0: 7812 ldrb r2, [r2, #0] 8028ff2: 42a2 cmp r2, r4 8028ff4: d019 beq.n 802902a { if(OldRO0type_Sourse == CRITICAL){ 8028ff6: 7818 ldrb r0, [r3, #0] 8028ff8: 2801 cmp r0, #1 8028ffa: d109 bne.n 8029010 if(NonCriticalAlarmCurrent) 8028ffc: b10c cbz r4, 8029002 SetROInt(1, 0); 8028ffe: 2100 movs r1, #0 8029000: e001 b.n 8029006 else SetROInt(0, 0); 8029002: 4620 mov r0, r4 8029004: 4621 mov r1, r4 8029006: f7ff f9e2 bl 80283ce SNMP_SendUserTrap(DO0_TOGGLED); 802900a: 2007 movs r0, #7 802900c: f00c fcb4 bl 8035978 } if(OldRO2type_Sourse == CRITICAL){ 8029010: 4b0e ldr r3, [pc, #56] ; (802904c ) 8029012: 7819 ldrb r1, [r3, #0] 8029014: 2901 cmp r1, #1 8029016: d108 bne.n 802902a if(NonCriticalAlarmCurrent) 8029018: b10c cbz r4, 802901e SetROInt(1, 1); 802901a: 4608 mov r0, r1 802901c: e000 b.n 8029020 else SetROInt(0, 1); 802901e: 4620 mov r0, r4 8029020: f7ff f9d5 bl 80283ce SNMP_SendUserTrap(DO1_TOGGLED); 8029024: 2008 movs r0, #8 8029026: f00c fca7 bl 8035978 SetROInt(0, 1); SNMP_SendUserTrap(DO1_TOGGLED); } } OldRO0type_Sourse = CurrRO1type_Sourse; 802902a: 4b07 ldr r3, [pc, #28] ; (8029048 ) 802902c: 701e strb r6, [r3, #0] OldRO2type_Sourse = CurrRO2type_Sourse; 802902e: 4b07 ldr r3, [pc, #28] ; (802904c ) 8029030: 701d strb r5, [r3, #0] NonCriticalAlarmOldState = NonCriticalAlarmCurrent; 8029032: 4b03 ldr r3, [pc, #12] ; (8029040 ) 8029034: 701c strb r4, [r3, #0] 8029036: bd70 pop {r4, r5, r6, pc} 8029038: 2000e984 .word 0x2000e984 802903c: 20002980 .word 0x20002980 8029040: 2000297f .word 0x2000297f 8029044: 2000297a .word 0x2000297a 8029048: 20002981 .word 0x20002981 802904c: 20002970 .word 0x20002970 08029050 : /** * @brief Мониторинг бита LainFail */ void UPS_LineFailMonitor(void) { 8029050: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 8029052: 4b0c ldr r3, [pc, #48] ; (8029084 ) 8029054: 4d0c ldr r5, [pc, #48] ; (8029088 ) 8029056: 7cdc ldrb r4, [r3, #19] if (!isValueRecv) { 8029058: 4b0c ldr r3, [pc, #48] ; (802908c ) 802905a: 781a ldrb r2, [r3, #0] { static bool isValueRecv = false; static uint8_t lineFailOldState = 0; uint8_t lineFailCurrent; lineFailCurrent = (UPS.Status >> 7) & 0x01; 802905c: 09e4 lsrs r4, r4, #7 if (!isValueRecv) { 802905e: b912 cbnz r2, 8029066 isValueRecv = true; 8029060: 2201 movs r2, #1 8029062: 701a strb r2, [r3, #0] 8029064: e00c b.n 8029080 lineFailOldState = lineFailCurrent; return; } if (lineFailCurrent) 8029066: b114 cbz r4, 802906e flCriticalAlarm = true; 8029068: 4b09 ldr r3, [pc, #36] ; (8029090 ) 802906a: 2201 movs r2, #1 802906c: 701a strb r2, [r3, #0] // Значение параметра изменилось if (lineFailCurrent != lineFailOldState) 802906e: 782b ldrb r3, [r5, #0] 8029070: 42a3 cmp r3, r4 8029072: d005 beq.n 8029080 { if (lineFailCurrent) 8029074: b10c cbz r4, 802907a SNMP_SendUserTrap(LINE_ALARM); 8029076: 200b movs r0, #11 8029078: e000 b.n 802907c else SNMP_SendUserTrap(LINE_NORM); 802907a: 200c movs r0, #12 802907c: f00c fc7c bl 8035978 } lineFailOldState = lineFailCurrent; 8029080: 702c strb r4, [r5, #0] 8029082: bd38 pop {r3, r4, r5, pc} 8029084: 2000e954 .word 0x2000e954 8029088: 2000297c .word 0x2000297c 802908c: 2000296f .word 0x2000296f 8029090: 20002975 .word 0x20002975 08029094 : /** * @brief Мониторинг бита LowBat */ void UPS_LowBatMonitor(void) { 8029094: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t lowBatOldState = 0; uint8_t lowBatCurrent; if((UPS.Status >> 7) & 0x01) 8029096: 4b0e ldr r3, [pc, #56] ; (80290d0 ) 8029098: 4d0e ldr r5, [pc, #56] ; (80290d4 ) 802909a: 7cdb ldrb r3, [r3, #19] 802909c: 09dc lsrs r4, r3, #7 lowBatCurrent = (UPS.Status >> 6) & 0x01; 802909e: bf18 it ne 80290a0: f3c3 1480 ubfxne r4, r3, #6, #1 else lowBatCurrent = 0; if (!isValueRecv) { 80290a4: 4b0c ldr r3, [pc, #48] ; (80290d8 ) 80290a6: 781a ldrb r2, [r3, #0] 80290a8: b912 cbnz r2, 80290b0 isValueRecv = true; 80290aa: 2201 movs r2, #1 80290ac: 701a strb r2, [r3, #0] 80290ae: e00c b.n 80290ca lowBatOldState = lowBatCurrent; return; } if (lowBatCurrent) 80290b0: b114 cbz r4, 80290b8 flNonCriticalAlarm = true; 80290b2: 4b0a ldr r3, [pc, #40] ; (80290dc ) 80290b4: 2201 movs r2, #1 80290b6: 701a strb r2, [r3, #0] // Значение параметра изменилось if (lowBatCurrent != lowBatOldState) 80290b8: 782b ldrb r3, [r5, #0] 80290ba: 42a3 cmp r3, r4 80290bc: d005 beq.n 80290ca { if (lowBatCurrent) 80290be: b10c cbz r4, 80290c4 SNMP_SendUserTrap(LOW_BAT_ALARM); 80290c0: 200d movs r0, #13 80290c2: e000 b.n 80290c6 else SNMP_SendUserTrap(LOW_BAT_NORM); 80290c4: 200e movs r0, #14 80290c6: f00c fc57 bl 8035978 } lowBatOldState = lowBatCurrent; 80290ca: 702c strb r4, [r5, #0] 80290cc: bd38 pop {r3, r4, r5, pc} 80290ce: bf00 nop 80290d0: 2000e954 .word 0x2000e954 80290d4: 2000296e .word 0x2000296e 80290d8: 20002971 .word 0x20002971 80290dc: 2000297a .word 0x2000297a 080290e0 : /** * @brief Мониторинг нагрузки */ void UPS_PowerMonitor(void) { 80290e0: b538 push {r3, r4, r5, lr} float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 80290e2: 4b17 ldr r3, [pc, #92] ; (8029140 ) 80290e4: 7c18 ldrb r0, [r3, #16] 80290e6: f7f7 fe33 bl 8020d50 <__aeabi_ui2f> /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 80290ea: 4916 ldr r1, [pc, #88] ; (8029144 ) void UPS_PowerMonitor(void) { float load; static uint8_t stateCurrent = HYST_IDLE; load = UPS.Load; 80290ec: 4604 mov r4, r0 /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) 80290ee: f7f7 fef3 bl 8020ed8 <__aeabi_fcmpgt> 80290f2: b170 cbz r0, 8029112 { flCriticalAlarm = true; 80290f4: 4b14 ldr r3, [pc, #80] ; (8029148 ) if (stateCurrent == HYST_IDLE) 80290f6: 4c15 ldr r4, [pc, #84] ; (802914c ) load = UPS.Load; /* Отслеживается переход через верхнюю границу */ if (load > UPS_LOAD) { flCriticalAlarm = true; 80290f8: 2501 movs r5, #1 80290fa: 701d strb r5, [r3, #0] if (stateCurrent == HYST_IDLE) 80290fc: 7823 ldrb r3, [r4, #0] 80290fe: b9f3 cbnz r3, 802913e { LED_On(LED_MINOR_R); 8029100: 200d movs r0, #13 8029102: f7ff fbad bl 8028860 LED_On(LED_MINOR_G); 8029106: 200c movs r0, #12 8029108: f7ff fbaa bl 8028860 stateCurrent = HYST_UP; 802910c: 7025 strb r5, [r4, #0] // Отправка трапа о завышении SNMP_SendUserTrap(POWER_ALARM); 802910e: 200f movs r0, #15 8029110: e011 b.n 8029136 } } /* Отслеживается нормализация */ else if (load < (UPS_LOAD - UPS_LOAD_HIST)) 8029112: 4620 mov r0, r4 8029114: 490e ldr r1, [pc, #56] ; (8029150 ) 8029116: f7f7 fec1 bl 8020e9c <__aeabi_fcmplt> 802911a: b180 cbz r0, 802913e { if (stateCurrent == HYST_UP) 802911c: 4c0b ldr r4, [pc, #44] ; (802914c ) 802911e: 7823 ldrb r3, [r4, #0] 8029120: 2b01 cmp r3, #1 8029122: d10c bne.n 802913e { LED_Off(LED_MINOR_R); 8029124: 200d movs r0, #13 8029126: f7ff fb9e bl 8028866 LED_Off(LED_MINOR_G); 802912a: 200c movs r0, #12 802912c: f7ff fb9b bl 8028866 stateCurrent = HYST_IDLE; 8029130: 2300 movs r3, #0 8029132: 7023 strb r3, [r4, #0] // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 8029134: 2010 movs r0, #16 } } } 8029136: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} LED_Off(LED_MINOR_R); LED_Off(LED_MINOR_G); stateCurrent = HYST_IDLE; // Отправка трапа о нормализации SNMP_SendUserTrap(POWER_NORM); 802913a: f00c bc1d b.w 8035978 802913e: bd38 pop {r3, r4, r5, pc} 8029140: 2000e954 .word 0x2000e954 8029144: 41200000 .word 0x41200000 8029148: 20002975 .word 0x20002975 802914c: 20002983 .word 0x20002983 8029150: 41100000 .word 0x41100000 08029154 : void UPS_TemperatureMonitor(void) { float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 8029154: 4b10 ldr r3, [pc, #64] ; (8029198 ) /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 8029156: 4911 ldr r1, [pc, #68] ; (802919c ) /** * @brief Мониторинг температуры */ void UPS_TemperatureMonitor(void) { 8029158: b510 push {r4, lr} float temperature; static uint8_t stateCurrent = HYST_IDLE; temperature = UPS.Temp; 802915a: 68dc ldr r4, [r3, #12] /* Отслеживается переход через верхнюю границу */ if (temperature > UPS_TEMPERATURE) 802915c: 4620 mov r0, r4 802915e: f7f7 febb bl 8020ed8 <__aeabi_fcmpgt> 8029162: b140 cbz r0, 8029176 { flCriticalAlarm = true; 8029164: 4b0e ldr r3, [pc, #56] ; (80291a0 ) 8029166: 2201 movs r2, #1 8029168: 701a strb r2, [r3, #0] if (stateCurrent == HYST_IDLE) 802916a: 4b0e ldr r3, [pc, #56] ; (80291a4 ) 802916c: 7819 ldrb r1, [r3, #0] 802916e: b991 cbnz r1, 8029196 { stateCurrent = HYST_UP; 8029170: 701a strb r2, [r3, #0] // Отправка трапа о завышении SNMP_SendUserTrap(BATTERY_TEMPERATURE_ALARM); 8029172: 200a movs r0, #10 8029174: e00b b.n 802918e } } /* Отслеживается нормализация */ else if (temperature < (UPS_TEMPERATURE - UPS_TEMPERATURE_HIST)) 8029176: 4620 mov r0, r4 8029178: 490b ldr r1, [pc, #44] ; (80291a8 ) 802917a: f7f7 fe8f bl 8020e9c <__aeabi_fcmplt> 802917e: b150 cbz r0, 8029196 { if (stateCurrent == HYST_UP) 8029180: 4b08 ldr r3, [pc, #32] ; (80291a4 ) 8029182: 781a ldrb r2, [r3, #0] 8029184: 2a01 cmp r2, #1 8029186: d106 bne.n 8029196 { stateCurrent = HYST_IDLE; 8029188: 2200 movs r2, #0 802918a: 701a strb r2, [r3, #0] // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 802918c: 2009 movs r0, #9 } } } 802918e: e8bd 4010 ldmia.w sp!, {r4, lr} if (stateCurrent == HYST_UP) { stateCurrent = HYST_IDLE; // Отправка трапа о нормализации SNMP_SendUserTrap(BATTERY_TEMPERATURE_NORM); 8029192: f00c bbf1 b.w 8035978 8029196: bd10 pop {r4, pc} 8029198: 2000e954 .word 0x2000e954 802919c: 41a00000 .word 0x41a00000 80291a0: 20002975 .word 0x20002975 80291a4: 2000297b .word 0x2000297b 80291a8: 41980000 .word 0x41980000 080291ac : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_ConnectMonitor(void) { 80291ac: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t connectOldState = 0; uint8_t connectCurrent; connectCurrent = UPS.Present; 80291ae: 4b0c ldr r3, [pc, #48] ; (80291e0 ) 80291b0: 4d0c ldr r5, [pc, #48] ; (80291e4 ) 80291b2: f893 402a ldrb.w r4, [r3, #42] ; 0x2a if (!isValueRecv) { 80291b6: 4b0c ldr r3, [pc, #48] ; (80291e8 ) 80291b8: 781a ldrb r2, [r3, #0] 80291ba: b912 cbnz r2, 80291c2 isValueRecv = true; 80291bc: 2201 movs r2, #1 80291be: 701a strb r2, [r3, #0] 80291c0: e00c b.n 80291dc connectOldState = connectCurrent; return; } if (connectCurrent) 80291c2: b114 cbz r4, 80291ca flCriticalAlarm = true; 80291c4: 4b09 ldr r3, [pc, #36] ; (80291ec ) 80291c6: 2201 movs r2, #1 80291c8: 701a strb r2, [r3, #0] // Значение параметра изменилось if (connectCurrent != connectOldState) 80291ca: 782b ldrb r3, [r5, #0] 80291cc: 42a3 cmp r3, r4 80291ce: d005 beq.n 80291dc { if (connectCurrent) 80291d0: b10c cbz r4, 80291d6 SNMP_SendUserTrap(CONNECT_MONITOR_NORM); 80291d2: 2012 movs r0, #18 80291d4: e000 b.n 80291d8 else SNMP_SendUserTrap(CONNECT_MONITOR_ALARM); 80291d6: 2011 movs r0, #17 80291d8: f00c fbce bl 8035978 } connectOldState = connectCurrent; 80291dc: 702c strb r4, [r5, #0] 80291de: bd38 pop {r3, r4, r5, pc} 80291e0: 2000e954 .word 0x2000e954 80291e4: 20002982 .word 0x20002982 80291e8: 20002978 .word 0x20002978 80291ec: 20002975 .word 0x20002975 080291f0 : /** * @brief Мониторинг параметра upsParams.connect */ void UPS_BatteryConnectMonitor(void) { 80291f0: b538 push {r3, r4, r5, lr} static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) 80291f2: 4b0e ldr r3, [pc, #56] ; (802922c ) 80291f4: 4d0e ldr r5, [pc, #56] ; (8029230 ) 80291f6: 7cdc ldrb r4, [r3, #19] 80291f8: 09e3 lsrs r3, r4, #7 AKBconnectCurrent = (UPS.Status >> 6) & 0x01; else{ AKBconnectCurrent = 0; } if (!isValueRecv) { 80291fa: 4b0e ldr r3, [pc, #56] ; (8029234 ) 80291fc: 781a ldrb r2, [r3, #0] static bool isValueRecv = false; static uint8_t AKBconnectOldState = 0; uint8_t AKBconnectCurrent; if(((UPS.Status >> 7) & 0x01) == 0) AKBconnectCurrent = (UPS.Status >> 6) & 0x01; 80291fe: bf0c ite eq 8029200: f3c4 1480 ubfxeq r4, r4, #6, #1 else{ AKBconnectCurrent = 0; 8029204: 2400 movne r4, #0 } if (!isValueRecv) { 8029206: b912 cbnz r2, 802920e isValueRecv = true; 8029208: 2201 movs r2, #1 802920a: 701a strb r2, [r3, #0] 802920c: e00c b.n 8029228 AKBconnectOldState = AKBconnectCurrent; return; } if (AKBconnectCurrent) 802920e: b114 cbz r4, 8029216 flCriticalAlarm = true; 8029210: 4b09 ldr r3, [pc, #36] ; (8029238 ) 8029212: 2201 movs r2, #1 8029214: 701a strb r2, [r3, #0] // Значение параметра изменилось if (AKBconnectCurrent != AKBconnectOldState) 8029216: 782b ldrb r3, [r5, #0] 8029218: 42a3 cmp r3, r4 802921a: d005 beq.n 8029228 { if (AKBconnectCurrent) 802921c: b10c cbz r4, 8029222 SNMP_SendUserTrap(BATTERY_CONNECT_NORM); 802921e: 2014 movs r0, #20 8029220: e000 b.n 8029224 else SNMP_SendUserTrap(BATTERY_CONNECT_ALARM); 8029222: 2013 movs r0, #19 8029224: f00c fba8 bl 8035978 } AKBconnectOldState = AKBconnectCurrent; 8029228: 702c strb r4, [r5, #0] 802922a: bd38 pop {r3, r4, r5, pc} 802922c: 2000e954 .word 0x2000e954 8029230: 20002972 .word 0x20002972 8029234: 20002973 .word 0x20002973 8029238: 20002975 .word 0x20002975 0802923c : /** * @brief Задача мониторинга параметров UPS */ void UPS_Monitor(void *params) { 802923c: b508 push {r3, lr} for (;;) { flCriticalAlarm = false; 802923e: 4e0e ldr r6, [pc, #56] ; (8029278 ) flNonCriticalAlarm = false; 8029240: 4d0e ldr r5, [pc, #56] ; (802927c ) */ void UPS_Monitor(void *params) { for (;;) { flCriticalAlarm = false; 8029242: 2400 movs r4, #0 8029244: 7034 strb r4, [r6, #0] flNonCriticalAlarm = false; 8029246: 702c strb r4, [r5, #0] // Проверяем флаг подключения UPS //if (UPS.Present) { UPS_LineFailMonitor(); 8029248: f7ff ff02 bl 8029050 UPS_LowBatMonitor(); 802924c: f7ff ff22 bl 8029094 UPS_PowerMonitor(); 8029250: f7ff ff46 bl 80290e0 UPS_TemperatureMonitor(); 8029254: f7ff ff7e bl 8029154 UPS_BatteryConnectMonitor(); 8029258: f7ff ffca bl 80291f0 } UPS_ConnectMonitor(); 802925c: f7ff ffa6 bl 80291ac UPS_DI0Monitor(); 8029260: f7ff fe30 bl 8028ec4 UPS_CriticalAlarmMonitor(); 8029264: f7ff fe58 bl 8028f18 UPS_NonCriticalAlarmMonitor(); 8029268: f7ff feae bl 8028fc8 vTaskDelay(1000); 802926c: f44f 707a mov.w r0, #1000 ; 0x3e8 8029270: f000 fe18 bl 8029ea4 8029274: e7e6 b.n 8029244 8029276: bf00 nop 8029278: 20002975 .word 0x20002975 802927c: 2000297a .word 0x2000297a 08029280 : 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. */ 8029280: f100 0308 add.w r3, r0, #8 8029284: 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; 8029286: 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. */ 802928a: 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. */ 802928c: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 802928e: 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; 8029290: 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; 8029292: 6003 str r3, [r0, #0] 8029294: 4770 bx lr 08029296 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pvContainer = NULL; 8029296: 2300 movs r3, #0 8029298: 6103 str r3, [r0, #16] 802929a: 4770 bx lr 0802929c : } /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 802929c: 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; 802929e: 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; 80292a0: 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; 80292a2: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 80292a4: 608a str r2, [r1, #8] pxIndex->pxPrevious->pxNext = pxNewListItem; 80292a6: 689a ldr r2, [r3, #8] pxIndex->pxPrevious = pxNewListItem; 80292a8: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 80292aa: 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; 80292ac: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 80292ae: 3301 adds r3, #1 80292b0: 6003 str r3, [r0, #0] 80292b2: 4770 bx lr 080292b4 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 80292b4: 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 ) 80292b6: 1c53 adds r3, r2, #1 ( pxList->uxNumberOfItems )++; } /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 80292b8: 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 ) 80292ba: d101 bne.n 80292c0 { pxIterator = pxList->xListEnd.pxPrevious; 80292bc: 6903 ldr r3, [r0, #16] 80292be: e007 b.n 80292d0 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. */ 80292c0: f100 0308 add.w r3, r0, #8 80292c4: e000 b.n 80292c8 80292c6: 4623 mov r3, r4 80292c8: 685c ldr r4, [r3, #4] 80292ca: 6825 ldr r5, [r4, #0] 80292cc: 4295 cmp r5, r2 80292ce: d9fa bls.n 80292c6 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 80292d0: 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; 80292d2: 6108 str r0, [r1, #16] /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 80292d4: 604a str r2, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 80292d6: 6091 str r1, [r2, #8] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; 80292d8: 6059 str r1, [r3, #4] } } pxNewListItem->pxNext = pxIterator->pxNext; pxNewListItem->pxNext->pxPrevious = pxNewListItem; pxNewListItem->pxPrevious = pxIterator; 80292da: 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 )++; 80292dc: 6803 ldr r3, [r0, #0] 80292de: 3301 adds r3, #1 80292e0: 6003 str r3, [r0, #0] 80292e2: bd30 pop {r4, r5, pc} 080292e4 : { /* 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; 80292e4: 6841 ldr r1, [r0, #4] 80292e6: 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; 80292e8: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 80292ea: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 80292ec: 6882 ldr r2, [r0, #8] 80292ee: 6051 str r1, [r2, #4] /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 80292f0: 6859 ldr r1, [r3, #4] 80292f2: 4281 cmp r1, r0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 80292f4: bf08 it eq 80292f6: 605a streq r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pvContainer = NULL; 80292f8: 2200 movs r2, #0 80292fa: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 80292fc: 6818 ldr r0, [r3, #0] 80292fe: 3801 subs r0, #1 8029300: 6018 str r0, [r3, #0] return pxList->uxNumberOfItems; } 8029302: 4770 bx lr 08029304 : } } /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 8029304: b538 push {r3, r4, r5, lr} 8029306: 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 ) 8029308: 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(); 802930c: f001 f9e0 bl 802a6d0 { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 8029310: e00a b.n 8029328 } #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 ) 8029312: 6a63 ldr r3, [r4, #36] ; 0x24 8029314: b15b cbz r3, 802932e { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8029316: 4628 mov r0, r5 8029318: f000 fece bl 802a0b8 802931c: b108 cbz r0, 8029322 { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 802931e: f000 ff45 bl 802a1ac break; } } #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); 8029322: 6ca3 ldr r3, [r4, #72] ; 0x48 8029324: 3b01 subs r3, #1 8029326: 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 ) 8029328: 6ca3 ldr r3, [r4, #72] ; 0x48 802932a: 2b00 cmp r3, #0 802932c: dcf1 bgt.n 8029312 #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); } pxQueue->xTxLock = queueUNLOCKED; 802932e: f04f 33ff mov.w r3, #4294967295 8029332: 64a3 str r3, [r4, #72] ; 0x48 } taskEXIT_CRITICAL(); 8029334: f001 f9f8 bl 802a728 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8029338: f104 0510 add.w r5, r4, #16 pxQueue->xTxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 802933c: f001 f9c8 bl 802a6d0 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 8029340: e00a b.n 8029358 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8029342: 6923 ldr r3, [r4, #16] 8029344: b15b cbz r3, 802935e { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8029346: 4628 mov r0, r5 8029348: f000 feb6 bl 802a0b8 802934c: b108 cbz r0, 8029352 { vTaskMissedYield(); 802934e: f000 ff2d bl 802a1ac else { mtCOVERAGE_TEST_MARKER(); } --( pxQueue->xRxLock ); 8029352: 6c63 ldr r3, [r4, #68] ; 0x44 8029354: 3b01 subs r3, #1 8029356: 6463 str r3, [r4, #68] ; 0x44 taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 8029358: 6c63 ldr r3, [r4, #68] ; 0x44 802935a: 2b00 cmp r3, #0 802935c: dcf1 bgt.n 8029342 { break; } } pxQueue->xRxLock = queueUNLOCKED; 802935e: f04f 33ff mov.w r3, #4294967295 8029362: 6463 str r3, [r4, #68] ; 0x44 } taskEXIT_CRITICAL(); } 8029364: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } } pxQueue->xRxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); 8029368: f001 b9de b.w 802a728 0802936c : } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 802936c: 6c02 ldr r2, [r0, #64] ; 0x40 return xReturn; } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 802936e: b530 push {r4, r5, lr} 8029370: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 8029372: b16a cbz r2, 8029390 { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 8029374: 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. */ 8029376: 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; 8029378: 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. */ 802937a: 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; 802937c: 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; 802937e: bf24 itt cs 8029380: 6804 ldrcs r4, [r0, #0] 8029382: 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. */ 8029384: 4608 mov r0, r1 8029386: 68d9 ldr r1, [r3, #12] } } 8029388: 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. */ 802938c: f7f8 bade b.w 802194c 8029390: bd30 pop {r4, r5, pc} 08029392 : #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 8029392: b538 push {r3, r4, r5, lr} 8029394: 4615 mov r5, r2 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8029396: 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 ) { 8029398: 4604 mov r4, r0 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 802939a: b93a cbnz r2, 80293ac { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802939c: 6805 ldr r5, [r0, #0] 802939e: b105 cbz r5, 80293a2 80293a0: e028 b.n 80293f4 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder ); 80293a2: 6840 ldr r0, [r0, #4] 80293a4: f000 ff64 bl 802a270 pxQueue->pxMutexHolder = NULL; 80293a8: 6065 str r5, [r4, #4] 80293aa: e024 b.n 80293f6 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 80293ac: b96d cbnz r5, 80293ca { ( 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. */ 80293ae: 6880 ldr r0, [r0, #8] 80293b0: f7f8 facc bl 802194c pxQueue->pcWriteTo += pxQueue->uxItemSize; 80293b4: 68a2 ldr r2, [r4, #8] 80293b6: 6c23 ldr r3, [r4, #64] ; 0x40 80293b8: 18d3 adds r3, r2, r3 if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 80293ba: 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; 80293bc: 60a3 str r3, [r4, #8] if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 80293be: 4293 cmp r3, r2 80293c0: d318 bcc.n 80293f4 { pxQueue->pcWriteTo = pxQueue->pcHead; 80293c2: 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; 80293c4: 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; 80293c6: 60a3 str r3, [r4, #8] 80293c8: e015 b.n 80293f6 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. */ 80293ca: 68c0 ldr r0, [r0, #12] 80293cc: f7f8 fabe bl 802194c pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 80293d0: 6c23 ldr r3, [r4, #64] ; 0x40 80293d2: 68e2 ldr r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 80293d4: 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; 80293d6: 425b negs r3, r3 80293d8: 18d2 adds r2, r2, r3 if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 80293da: 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; 80293dc: 60e2 str r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 80293de: d202 bcs.n 80293e6 { pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize ); 80293e0: 6862 ldr r2, [r4, #4] 80293e2: 18d3 adds r3, r2, r3 80293e4: 60e3 str r3, [r4, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 80293e6: 2d02 cmp r5, #2 80293e8: d104 bne.n 80293f4 { if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 80293ea: 6ba3 ldr r3, [r4, #56] ; 0x38 80293ec: b113 cbz r3, 80293f4 { /* 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 ); 80293ee: 6ba3 ldr r3, [r4, #56] ; 0x38 80293f0: 3b01 subs r3, #1 80293f2: 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; 80293f4: 2000 movs r0, #0 { mtCOVERAGE_TEST_MARKER(); } } ++( pxQueue->uxMessagesWaiting ); 80293f6: 6ba3 ldr r3, [r4, #56] ; 0x38 80293f8: 3301 adds r3, #1 80293fa: 63a3 str r3, [r4, #56] ; 0x38 return xReturn; } 80293fc: bd38 pop {r3, r4, r5, pc} 080293fe : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 80293fe: b538 push {r3, r4, r5, lr} 8029400: 460d mov r5, r1 Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8029402: 4604 mov r4, r0 8029404: b910 cbnz r0, 802940c 8029406: f001 f95b bl 802a6c0 802940a: e7fe b.n 802940a taskENTER_CRITICAL(); 802940c: f001 f960 bl 802a6d0 { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 8029410: 6823 ldr r3, [r4, #0] 8029412: 6be0 ldr r0, [r4, #60] ; 0x3c 8029414: 6c22 ldr r2, [r4, #64] ; 0x40 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; 8029416: 60a3 str r3, [r4, #8] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 8029418: 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 ); 802941c: 3801 subs r0, #1 802941e: fb02 3300 mla r3, r2, r0, r3 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 8029422: 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 ); 8029424: 60e3 str r3, [r4, #12] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 8029426: 2100 movs r1, #0 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 8029428: f04f 33ff mov.w r3, #4294967295 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 802942c: 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; 802942e: 6463 str r3, [r4, #68] ; 0x44 pxQueue->xTxLock = queueUNLOCKED; 8029430: 64a3 str r3, [r4, #72] ; 0x48 if( xNewQueue == pdFALSE ) 8029432: b955 cbnz r5, 802944a /* 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 ) 8029434: 6923 ldr r3, [r4, #16] 8029436: b183 cbz r3, 802945a { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 8029438: f104 0010 add.w r0, r4, #16 802943c: f000 fe3c bl 802a0b8 8029440: 2801 cmp r0, #1 8029442: d10a bne.n 802945a { queueYIELD_IF_USING_PREEMPTION(); 8029444: f001 f930 bl 802a6a8 8029448: e007 b.n 802945a } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 802944a: f104 0010 add.w r0, r4, #16 802944e: f7ff ff17 bl 8029280 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 8029452: f104 0024 add.w r0, r4, #36 ; 0x24 8029456: f7ff ff13 bl 8029280 } } taskEXIT_CRITICAL(); 802945a: f001 f965 bl 802a728 /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; } 802945e: 2001 movs r0, #1 8029460: bd38 pop {r3, r4, r5, pc} 08029462 : /*-----------------------------------------------------------*/ QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 8029462: b5f8 push {r3, r4, r5, r6, r7, lr} 8029464: 460d mov r5, r1 8029466: 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 ); 8029468: 4606 mov r6, r0 802946a: b910 cbnz r0, 8029472 802946c: f001 f928 bl 802a6c0 8029470: e7fe b.n 8029470 if( uxItemSize == ( UBaseType_t ) 0 ) 8029472: b111 cbz r1, 802947a } 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. */ 8029474: 4348 muls r0, r1 8029476: 3001 adds r0, #1 8029478: e000 b.n 802947c configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); if( uxItemSize == ( UBaseType_t ) 0 ) { /* There is not going to be a queue storage area. */ xQueueSizeInBytes = ( size_t ) 0; 802947a: 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 ); 802947c: 3054 adds r0, #84 ; 0x54 802947e: f001 fa35 bl 802a8ec if( pcAllocatedBuffer != NULL ) 8029482: 4604 mov r4, r0 8029484: b138 cbz r0, 8029496 { 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 ) 8029486: b90d cbnz r5, 802948c { /* 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; 8029488: 6020 str r0, [r4, #0] 802948a: e007 b.n 802949c } 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 ); 802948c: f100 0354 add.w r3, r0, #84 ; 0x54 8029490: 6003 str r3, [r0, #0] 8029492: e003 b.n 802949c 8029494: e7fe b.n 8029494 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 8029496: f001 f913 bl 802a6c0 802949a: e7fb b.n 8029494 pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); } /* Initialise the queue members as described above where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 802949c: 63e6 str r6, [r4, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; 802949e: 6425 str r5, [r4, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 80294a0: 4620 mov r0, r4 80294a2: 2101 movs r1, #1 80294a4: f7ff ffab bl 80293fe #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 80294a8: f884 7050 strb.w r7, [r4, #80] ; 0x50 } configASSERT( xReturn ); return xReturn; } 80294ac: 4620 mov r0, r4 80294ae: bdf8 pop {r3, r4, r5, r6, r7, pc} 080294b0 : /*-----------------------------------------------------------*/ #if ( configUSE_COUNTING_SEMAPHORES == 1 ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 80294b0: b510 push {r4, lr} 80294b2: 460c mov r4, r1 QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 80294b4: b910 cbnz r0, 80294bc 80294b6: f001 f903 bl 802a6c0 80294ba: e7fe b.n 80294ba configASSERT( uxInitialCount <= uxMaxCount ); 80294bc: 4281 cmp r1, r0 80294be: d902 bls.n 80294c6 80294c0: f001 f8fe bl 802a6c0 80294c4: e7fe b.n 80294c4 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 80294c6: 2100 movs r1, #0 80294c8: 2202 movs r2, #2 80294ca: f7ff ffca bl 8029462 if( xHandle != NULL ) 80294ce: b110 cbz r0, 80294d6 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 80294d0: 6384 str r4, [r0, #56] ; 0x38 80294d2: bd10 pop {r4, pc} 80294d4: e7fe b.n 80294d4 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } configASSERT( xHandle ); 80294d6: f001 f8f3 bl 802a6c0 80294da: e7fb b.n 80294d4 080294dc : #endif /* configUSE_COUNTING_SEMAPHORES */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { 80294dc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80294e0: b085 sub sp, #20 80294e2: 460f mov r7, r1 80294e4: 9201 str r2, [sp, #4] 80294e6: 461d mov r5, r3 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 80294e8: 4604 mov r4, r0 80294ea: b910 cbnz r0, 80294f2 80294ec: f001 f8e8 bl 802a6c0 80294f0: e7fe b.n 80294f0 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 80294f2: 2900 cmp r1, #0 80294f4: d17b bne.n 80295ee 80294f6: 6c03 ldr r3, [r0, #64] ; 0x40 80294f8: 2b00 cmp r3, #0 80294fa: d078 beq.n 80295ee 80294fc: e074 b.n 80295e8 80294fe: e7fe b.n 80294fe configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8029500: 6be3 ldr r3, [r4, #60] ; 0x3c 8029502: 2b01 cmp r3, #1 8029504: d176 bne.n 80295f4 8029506: e078 b.n 80295fa 8029508: e7fe b.n 8029508 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802950a: 9e01 ldr r6, [sp, #4] 802950c: b126 cbz r6, 8029518 802950e: e079 b.n 8029604 8029510: e7fe b.n 8029510 8029512: 2601 movs r6, #1 8029514: e002 b.n 802951c 8029516: 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 ); 8029518: 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(); 802951c: f001 f8d8 bl 802a6d0 { /* 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 ) ) 8029520: 6ba2 ldr r2, [r4, #56] ; 0x38 8029522: 6be3 ldr r3, [r4, #60] ; 0x3c 8029524: 429a cmp r2, r3 8029526: d301 bcc.n 802952c 8029528: 2d02 cmp r5, #2 802952a: d115 bne.n 8029558 { traceQUEUE_SEND( pxQueue ); xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 802952c: 4620 mov r0, r4 802952e: 4639 mov r1, r7 8029530: 462a mov r2, r5 8029532: f7ff ff2e bl 8029392 } #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 ) 8029536: 6a63 ldr r3, [r4, #36] ; 0x24 8029538: b143 cbz r3, 802954c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE ) 802953a: f104 0024 add.w r0, r4, #36 ; 0x24 802953e: f000 fdbb bl 802a0b8 8029542: 2801 cmp r0, #1 8029544: d104 bne.n 8029550 { /* 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(); 8029546: f001 f8af bl 802a6a8 802954a: e001 b.n 8029550 else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 802954c: 2800 cmp r0, #0 802954e: d1fa bne.n 8029546 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 8029550: f001 f8ea bl 802a728 return pdPASS; 8029554: 2001 movs r0, #1 8029556: e058 b.n 802960a } else { if( xTicksToWait == ( TickType_t ) 0 ) 8029558: f8dd 9004 ldr.w r9, [sp, #4] 802955c: f1b9 0f00 cmp.w r9, #0 8029560: d102 bne.n 8029568 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 8029562: f001 f8e1 bl 802a728 8029566: e03d b.n 80295e4 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } else if( xEntryTimeSet == pdFALSE ) 8029568: b916 cbnz r6, 8029570 { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802956a: a802 add r0, sp, #8 802956c: f000 fde0 bl 802a130 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8029570: f001 f8da bl 802a728 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8029574: f000 fb5c bl 8029c30 prvLockQueue( pxQueue ); 8029578: f001 f8aa bl 802a6d0 802957c: 6c63 ldr r3, [r4, #68] ; 0x44 802957e: 3301 adds r3, #1 8029580: bf08 it eq 8029582: f8c4 8044 streq.w r8, [r4, #68] ; 0x44 8029586: 6ca3 ldr r3, [r4, #72] ; 0x48 8029588: 3301 adds r3, #1 802958a: bf08 it eq 802958c: f8c4 8048 streq.w r8, [r4, #72] ; 0x48 8029590: f001 f8ca bl 802a728 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8029594: a802 add r0, sp, #8 8029596: a901 add r1, sp, #4 8029598: f000 fdda bl 802a150 802959c: b9e8 cbnz r0, 80295da static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802959e: f001 f897 bl 802a6d0 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 80295a2: f8d4 9038 ldr.w r9, [r4, #56] ; 0x38 80295a6: 6be6 ldr r6, [r4, #60] ; 0x3c else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 80295a8: f001 f8be bl 802a728 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 80295ac: 45b1 cmp r9, r6 80295ae: d10e bne.n 80295ce { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 80295b0: f104 0010 add.w r0, r4, #16 80295b4: 9901 ldr r1, [sp, #4] 80295b6: f000 fd23 bl 802a000 /* 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 ); 80295ba: 4620 mov r0, r4 80295bc: f7ff fea2 bl 8029304 /* 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 ) 80295c0: f000 fbd2 bl 8029d68 80295c4: 2800 cmp r0, #0 80295c6: d1a4 bne.n 8029512 { portYIELD_WITHIN_API(); 80295c8: f001 f86e bl 802a6a8 80295cc: e7a1 b.n 8029512 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 80295ce: 4620 mov r0, r4 80295d0: f7ff fe98 bl 8029304 ( void ) xTaskResumeAll(); 80295d4: f000 fbc8 bl 8029d68 80295d8: e79b b.n 8029512 } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 80295da: 4620 mov r0, r4 80295dc: f7ff fe92 bl 8029304 ( void ) xTaskResumeAll(); 80295e0: f000 fbc2 bl 8029d68 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 80295e4: 2000 movs r0, #0 80295e6: e010 b.n 802960a 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 ) ) ); 80295e8: f001 f86a bl 802a6c0 80295ec: e787 b.n 80294fe configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 80295ee: 2d02 cmp r5, #2 80295f0: d103 bne.n 80295fa 80295f2: e785 b.n 8029500 80295f4: f001 f864 bl 802a6c0 80295f8: e786 b.n 8029508 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 80295fa: f000 fddd bl 802a1b8 80295fe: 2800 cmp r0, #0 8029600: d189 bne.n 8029516 8029602: e782 b.n 802950a 8029604: f001 f85c bl 802a6c0 8029608: e782 b.n 8029510 function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } } } 802960a: b005 add sp, #20 802960c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08029610 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 8029610: b570 push {r4, r5, r6, lr} 8029612: 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 ) ); 8029614: 2054 movs r0, #84 ; 0x54 8029616: f001 f969 bl 802a8ec if( pxNewQueue != NULL ) 802961a: 4604 mov r4, r0 802961c: b108 cbz r0, 8029622 802961e: e003 b.n 8029628 8029620: e7fe b.n 8029620 else { traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); 8029622: f001 f84d bl 802a6c0 8029626: e7fb b.n 8029620 /* 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; 8029628: 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; 802962a: 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; 802962c: 63c3 str r3, [r0, #60] ; 0x3c pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 802962e: 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; 8029632: 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; 8029634: 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; 8029636: 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; 8029638: 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; 802963a: 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; 802963c: 6085 str r5, [r0, #8] pxNewQueue->u.pcReadFrom = NULL; 802963e: 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; 8029640: 6405 str r5, [r0, #64] ; 0x40 pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 8029642: f880 6050 strb.w r6, [r0, #80] ; 0x50 pxNewQueue->pxQueueSetContainer = NULL; } #endif /* Ensure the event queues start with the correct state. */ vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) ); 8029646: 3010 adds r0, #16 8029648: f7ff fe1a bl 8029280 vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) ); 802964c: f104 0024 add.w r0, r4, #36 ; 0x24 8029650: f7ff fe16 bl 8029280 traceCREATE_MUTEX( pxNewQueue ); /* Start with the semaphore in the expected state. */ ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 8029654: 4620 mov r0, r4 8029656: 4629 mov r1, r5 8029658: 462a mov r2, r5 802965a: 462b mov r3, r5 802965c: f7ff ff3e bl 80294dc traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); return pxNewQueue; } 8029660: 4620 mov r0, r4 8029662: bd70 pop {r4, r5, r6, pc} 08029664 : #endif /* configUSE_ALTERNATIVE_API */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 8029664: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8029668: 460f mov r7, r1 802966a: 4616 mov r6, r2 802966c: 461d mov r5, r3 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802966e: 4604 mov r4, r0 8029670: b910 cbnz r0, 8029678 8029672: f001 f825 bl 802a6c0 8029676: e7fe b.n 8029676 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8029678: bb41 cbnz r1, 80296cc 802967a: 6c03 ldr r3, [r0, #64] ; 0x40 802967c: b333 cbz r3, 80296cc 802967e: e022 b.n 80296c6 8029680: e7fe b.n 8029680 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8029682: 6be3 ldr r3, [r4, #60] ; 0x3c 8029684: 2b01 cmp r3, #1 8029686: d124 bne.n 80296d2 8029688: e026 b.n 80296d8 802968a: e7fe b.n 802968a 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 ) ) 802968c: 2d02 cmp r5, #2 802968e: d118 bne.n 80296c2 /* 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 ); 8029690: 4620 mov r0, r4 8029692: 4639 mov r1, r7 8029694: 462a mov r2, r5 8029696: f7ff fe7c bl 8029392 /* 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 ) 802969a: 6ca3 ldr r3, [r4, #72] ; 0x48 802969c: 3301 adds r3, #1 802969e: d10b bne.n 80296b8 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80296a0: 6a63 ldr r3, [r4, #36] ; 0x24 80296a2: b903 cbnz r3, 80296a6 80296a4: e00b b.n 80296be { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80296a6: f104 0024 add.w r0, r4, #36 ; 0x24 80296aa: f000 fd05 bl 802a0b8 80296ae: b130 cbz r0, 80296be { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 80296b0: b12e cbz r6, 80296be { *pxHigherPriorityTaskWoken = pdTRUE; 80296b2: 2401 movs r4, #1 80296b4: 6034 str r4, [r6, #0] 80296b6: e019 b.n 80296ec } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 80296b8: 6ca3 ldr r3, [r4, #72] ; 0x48 80296ba: 3301 adds r3, #1 80296bc: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 80296be: 2401 movs r4, #1 80296c0: e014 b.n 80296ec } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 80296c2: 2400 movs r4, #0 80296c4: e012 b.n 80296ec BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 80296c6: f000 fffb bl 802a6c0 80296ca: e7d9 b.n 8029680 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 80296cc: 2d02 cmp r5, #2 80296ce: d103 bne.n 80296d8 80296d0: e7d7 b.n 8029682 80296d2: f000 fff5 bl 802a6c0 80296d6: e7d8 b.n 802968a 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(); 80296d8: f001 f8c2 bl 802a860 /* 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(); 80296dc: f000 fff0 bl 802a6c0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 80296e0: 6ba2 ldr r2, [r4, #56] ; 0x38 80296e2: 6be3 ldr r3, [r4, #60] ; 0x3c 80296e4: 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(); 80296e6: 4680 mov r8, r0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 80296e8: d2d0 bcs.n 802968c 80296ea: e7d1 b.n 8029690 { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 80296ec: 4640 mov r0, r8 80296ee: f001 f817 bl 802a720 return xReturn; } 80296f2: 4620 mov r0, r4 80296f4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080296f8 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 80296f8: b5f8 push {r3, r4, r5, r6, r7, lr} 80296fa: 460d mov r5, r1 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 80296fc: 4604 mov r4, r0 80296fe: b910 cbnz r0, 8029706 8029700: f000 ffde bl 802a6c0 8029704: e7fe b.n 8029704 /* xQueueGenericSendFromISR() should be used in the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8029706: 6c06 ldr r6, [r0, #64] ; 0x40 8029708: b116 cbz r6, 8029710 802970a: f000 ffd9 bl 802a6c0 802970e: e7fe b.n 802970e 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(); 8029710: f001 f8a6 bl 802a860 /* 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(); 8029714: f000 ffd4 bl 802a6c0 { /* 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 ) 8029718: 6ba2 ldr r2, [r4, #56] ; 0x38 802971a: 6be3 ldr r3, [r4, #60] ; 0x3c 802971c: 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(); 802971e: 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 ) 8029720: d216 bcs.n 8029750 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 ); 8029722: 6ba3 ldr r3, [r4, #56] ; 0x38 8029724: 3301 adds r3, #1 8029726: 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 ) 8029728: 6ca3 ldr r3, [r4, #72] ; 0x48 802972a: 3301 adds r3, #1 802972c: d10b bne.n 8029746 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802972e: 6a63 ldr r3, [r4, #36] ; 0x24 8029730: b903 cbnz r3, 8029734 8029732: e00b b.n 802974c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8029734: f104 0024 add.w r0, r4, #36 ; 0x24 8029738: f000 fcbe bl 802a0b8 802973c: b130 cbz r0, 802974c { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 802973e: b12d cbz r5, 802974c { *pxHigherPriorityTaskWoken = pdTRUE; 8029740: 2401 movs r4, #1 8029742: 602c str r4, [r5, #0] 8029744: e005 b.n 8029752 } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 8029746: 6ca3 ldr r3, [r4, #72] ; 0x48 8029748: 3301 adds r3, #1 802974a: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 802974c: 2401 movs r4, #1 802974e: e000 b.n 8029752 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 8029750: 4634 mov r4, r6 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 8029752: 4638 mov r0, r7 8029754: f000 ffe4 bl 802a720 return xReturn; } 8029758: 4620 mov r0, r4 802975a: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802975c : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeeking ) { 802975c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8029760: b085 sub sp, #20 8029762: 460e mov r6, r1 8029764: 9201 str r2, [sp, #4] 8029766: 4699 mov r9, r3 BaseType_t xEntryTimeSet = pdFALSE; TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8029768: 4604 mov r4, r0 802976a: b910 cbnz r0, 8029772 802976c: f000 ffa8 bl 802a6c0 8029770: e7fe b.n 8029770 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8029772: 2900 cmp r1, #0 8029774: f040 8089 bne.w 802988a 8029778: 6c03 ldr r3, [r0, #64] ; 0x40 802977a: 2b00 cmp r3, #0 802977c: f000 8085 beq.w 802988a 8029780: e080 b.n 8029884 8029782: e7fe b.n 8029782 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8029784: 9d01 ldr r5, [sp, #4] 8029786: b125 cbz r5, 8029792 8029788: e085 b.n 8029896 802978a: e7fe b.n 802978a 802978c: 2501 movs r5, #1 802978e: e001 b.n 8029794 8029790: 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 ); 8029792: 2700 movs r7, #0 statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 8029794: f000 ff9c bl 802a6d0 { /* 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 ) 8029798: 6ba3 ldr r3, [r4, #56] ; 0x38 802979a: b33b cbz r3, 80297ec { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; prvCopyDataFromQueue( pxQueue, pvBuffer ); 802979c: 4620 mov r0, r4 802979e: 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; 80297a0: 68e5 ldr r5, [r4, #12] prvCopyDataFromQueue( pxQueue, pvBuffer ); 80297a2: f7ff fde3 bl 802936c if( xJustPeeking == pdFALSE ) 80297a6: f1b9 0f00 cmp.w r9, #0 80297aa: d112 bne.n 80297d2 { traceQUEUE_RECEIVE( pxQueue ); /* Actually removing data, not just peeking. */ --( pxQueue->uxMessagesWaiting ); 80297ac: 6ba3 ldr r3, [r4, #56] ; 0x38 80297ae: 3b01 subs r3, #1 80297b0: 63a3 str r3, [r4, #56] ; 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 80297b2: 6823 ldr r3, [r4, #0] 80297b4: b913 cbnz r3, 80297bc { /* 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. */ 80297b6: f000 fd99 bl 802a2ec 80297ba: 6060 str r0, [r4, #4] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 80297bc: 6923 ldr r3, [r4, #16] 80297be: b18b cbz r3, 80297e4 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 80297c0: f104 0010 add.w r0, r4, #16 80297c4: f000 fc78 bl 802a0b8 80297c8: 2801 cmp r0, #1 80297ca: d10b bne.n 80297e4 { queueYIELD_IF_USING_PREEMPTION(); 80297cc: f000 ff6c bl 802a6a8 80297d0: e008 b.n 80297e4 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 ) 80297d2: 6a63 ldr r3, [r4, #36] ; 0x24 { traceQUEUE_PEEK( pxQueue ); /* The data is not being removed, so reset the read pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; 80297d4: 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 ) 80297d6: b12b cbz r3, 80297e4 { /* 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 ) 80297d8: f104 0024 add.w r0, r4, #36 ; 0x24 80297dc: f000 fc6c bl 802a0b8 80297e0: 2800 cmp r0, #0 80297e2: d1f3 bne.n 80297cc { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 80297e4: f000 ffa0 bl 802a728 return pdPASS; 80297e8: 2001 movs r0, #1 80297ea: e057 b.n 802989c } else { if( xTicksToWait == ( TickType_t ) 0 ) 80297ec: f8dd 8004 ldr.w r8, [sp, #4] 80297f0: f1b8 0f00 cmp.w r8, #0 80297f4: d102 bne.n 80297fc { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 80297f6: f000 ff97 bl 802a728 80297fa: e041 b.n 8029880 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } else if( xEntryTimeSet == pdFALSE ) 80297fc: b915 cbnz r5, 8029804 { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 80297fe: a802 add r0, sp, #8 8029800: f000 fc96 bl 802a130 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8029804: f000 ff90 bl 802a728 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8029808: f000 fa12 bl 8029c30 prvLockQueue( pxQueue ); 802980c: f000 ff60 bl 802a6d0 8029810: 6c63 ldr r3, [r4, #68] ; 0x44 8029812: 3301 adds r3, #1 8029814: bf08 it eq 8029816: 6467 streq r7, [r4, #68] ; 0x44 8029818: 6ca3 ldr r3, [r4, #72] ; 0x48 802981a: 3301 adds r3, #1 802981c: bf08 it eq 802981e: 64a7 streq r7, [r4, #72] ; 0x48 8029820: f000 ff82 bl 802a728 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8029824: a802 add r0, sp, #8 8029826: a901 add r1, sp, #4 8029828: f000 fc92 bl 802a150 802982c: bb18 cbnz r0, 8029876 static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 802982e: f000 ff4f bl 802a6d0 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 8029832: 6ba5 ldr r5, [r4, #56] ; 0x38 else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 8029834: f000 ff78 bl 802a728 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 8029838: b9bd cbnz r5, 802986a { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802983a: 6823 ldr r3, [r4, #0] 802983c: b933 cbnz r3, 802984c { taskENTER_CRITICAL(); 802983e: f000 ff47 bl 802a6d0 { vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); 8029842: 6860 ldr r0, [r4, #4] 8029844: f000 fcc8 bl 802a1d8 } taskEXIT_CRITICAL(); 8029848: f000 ff6e bl 802a728 mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 802984c: f104 0024 add.w r0, r4, #36 ; 0x24 8029850: 9901 ldr r1, [sp, #4] 8029852: f000 fbd5 bl 802a000 prvUnlockQueue( pxQueue ); 8029856: 4620 mov r0, r4 8029858: f7ff fd54 bl 8029304 if( xTaskResumeAll() == pdFALSE ) 802985c: f000 fa84 bl 8029d68 8029860: 2800 cmp r0, #0 8029862: d193 bne.n 802978c { portYIELD_WITHIN_API(); 8029864: f000 ff20 bl 802a6a8 8029868: e790 b.n 802978c } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 802986a: 4620 mov r0, r4 802986c: f7ff fd4a bl 8029304 ( void ) xTaskResumeAll(); 8029870: f000 fa7a bl 8029d68 8029874: e78a b.n 802978c } } else { prvUnlockQueue( pxQueue ); 8029876: 4620 mov r0, r4 8029878: f7ff fd44 bl 8029304 ( void ) xTaskResumeAll(); 802987c: f000 fa74 bl 8029d68 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8029880: 2000 movs r0, #0 8029882: e00b b.n 802989c TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8029884: f000 ff1c bl 802a6c0 8029888: e77b b.n 8029782 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 802988a: f000 fc95 bl 802a1b8 802988e: 2800 cmp r0, #0 8029890: f47f af7e bne.w 8029790 8029894: e776 b.n 8029784 8029896: f000 ff13 bl 802a6c0 802989a: e776 b.n 802978a ( void ) xTaskResumeAll(); traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } } } 802989c: b005 add sp, #20 802989e: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 080298a2 : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) { 80298a2: b510 push {r4, lr} UBaseType_t uxReturn; Queue_t *pxQueue; pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 80298a4: 4604 mov r4, r0 80298a6: b910 cbnz r0, 80298ae 80298a8: f000 ff0a bl 802a6c0 80298ac: e7fe b.n 80298ac taskENTER_CRITICAL(); 80298ae: f000 ff0f bl 802a6d0 { uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting; 80298b2: 6ba3 ldr r3, [r4, #56] ; 0x38 80298b4: 6be4 ldr r4, [r4, #60] ; 0x3c 80298b6: 1ae4 subs r4, r4, r3 } taskEXIT_CRITICAL(); 80298b8: f000 ff36 bl 802a728 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 80298bc: 4620 mov r0, r4 80298be: bd10 pop {r4, pc} 080298c0 : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 80298c0: b538 push {r3, r4, r5, lr} 80298c2: 4604 mov r4, r0 80298c4: 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 ); 80298c6: f000 ff03 bl 802a6d0 80298ca: 6c63 ldr r3, [r4, #68] ; 0x44 80298cc: 3301 adds r3, #1 80298ce: d101 bne.n 80298d4 80298d0: 2300 movs r3, #0 80298d2: 6463 str r3, [r4, #68] ; 0x44 80298d4: 6ca3 ldr r3, [r4, #72] ; 0x48 80298d6: 3301 adds r3, #1 80298d8: d101 bne.n 80298de 80298da: 2300 movs r3, #0 80298dc: 64a3 str r3, [r4, #72] ; 0x48 80298de: f000 ff23 bl 802a728 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 80298e2: 6ba3 ldr r3, [r4, #56] ; 0x38 80298e4: b923 cbnz r3, 80298f0 { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 80298e6: f104 0024 add.w r0, r4, #36 ; 0x24 80298ea: 4629 mov r1, r5 80298ec: f000 fbbc bl 802a068 } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 80298f0: 4620 mov r0, r4 } 80298f2: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 80298f6: f7ff bd05 b.w 8029304 80298fa: 0000 movs r0, r0 080298fc : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80298fc: 4a06 ldr r2, [pc, #24] ; (8029918 ) 80298fe: 6813 ldr r3, [r2, #0] 8029900: 6819 ldr r1, [r3, #0] 8029902: 4b06 ldr r3, [pc, #24] ; (802991c ) 8029904: b911 cbnz r1, 802990c /* 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; 8029906: f04f 32ff mov.w r2, #4294967295 802990a: e003 b.n 8029914 { /* 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 ); 802990c: 6812 ldr r2, [r2, #0] 802990e: 68d2 ldr r2, [r2, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xGenericListItem ) ); 8029910: 68d2 ldr r2, [r2, #12] 8029912: 6852 ldr r2, [r2, #4] 8029914: 601a str r2, [r3, #0] 8029916: 4770 bx lr 8029918: 20002988 .word 0x20002988 802991c: 200015dc .word 0x200015dc 08029920 : /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 8029920: 4b0e ldr r3, [pc, #56] ; (802995c ) 8029922: 681a ldr r2, [r3, #0] #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 8029924: b510 push {r4, lr} /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 8029926: 6050 str r0, [r2, #4] if( xTimeToWake < xTickCount ) 8029928: 4a0d ldr r2, [pc, #52] ; (8029960 ) 802992a: 6812 ldr r2, [r2, #0] 802992c: 4290 cmp r0, r2 #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802992e: 4604 mov r4, r0 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) 8029930: d207 bcs.n 8029942 { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 8029932: 4a0c ldr r2, [pc, #48] ; (8029964 ) 8029934: 6810 ldr r0, [r2, #0] 8029936: 6819 ldr r1, [r3, #0] 8029938: 3104 adds r1, #4 else { mtCOVERAGE_TEST_MARKER(); } } } 802993a: 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 ) ); 802993e: f7ff bcb9 b.w 80292b4 } else { /* The wake time has not overflowed, so the current block list is used. */ vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 8029942: 4a09 ldr r2, [pc, #36] ; (8029968 ) 8029944: 6810 ldr r0, [r2, #0] 8029946: 6819 ldr r1, [r3, #0] 8029948: 3104 adds r1, #4 802994a: f7ff fcb3 bl 80292b4 /* 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 ) 802994e: 4b07 ldr r3, [pc, #28] ; (802996c ) 8029950: 681a ldr r2, [r3, #0] 8029952: 4294 cmp r4, r2 { xNextTaskUnblockTime = xTimeToWake; 8029954: bf38 it cc 8029956: 601c strcc r4, [r3, #0] 8029958: bd10 pop {r4, pc} 802995a: bf00 nop 802995c: 20002a38 .word 0x20002a38 8029960: 20002a54 .word 0x20002a54 8029964: 20002a58 .word 0x20002a58 8029968: 20002988 .word 0x20002988 802996c: 200015dc .word 0x200015dc 08029970 : #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. */ { 8029970: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8029974: 9d0a ldr r5, [sp, #40] ; 0x28 8029976: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 802997a: 9e0c ldr r6, [sp, #48] ; 0x30 802997c: 460f mov r7, r1 802997e: 4693 mov fp, r2 8029980: 469a mov sl, r3 BaseType_t xReturn; TCB_t * pxNewTCB; StackType_t *pxTopOfStack; configASSERT( pxTaskCode ); 8029982: 4681 mov r9, r0 8029984: b910 cbnz r0, 802998c 8029986: f000 fe9b bl 802a6c0 802998a: e7fe b.n 802998a configASSERT( ( ( uxPriority & ( ~portPRIVILEGE_BIT ) ) < configMAX_PRIORITIES ) ); 802998c: 2d04 cmp r5, #4 802998e: d902 bls.n 8029996 8029990: f000 fe96 bl 802a6c0 8029994: e7fe b.n 8029994 #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. */ 8029996: b936 cbnz r6, 80299a6 8029998: 0090 lsls r0, r2, #2 802999a: f000 ffa7 bl 802a8ec if( pxStack != NULL ) 802999e: 4606 mov r6, r0 80299a0: 2800 cmp r0, #0 80299a2: f000 809e beq.w 8029ae2 { /* 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 ) ); 80299a6: 205c movs r0, #92 ; 0x5c 80299a8: f000 ffa0 bl 802a8ec if( pxNewTCB != NULL ) 80299ac: 4604 mov r4, r0 80299ae: b178 cbz r0, 80299d0 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 80299b0: 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 ) ); 80299b2: ea4f 028b mov.w r2, fp, lsl #2 80299b6: 4630 mov r0, r6 80299b8: 21a5 movs r1, #165 ; 0xa5 80299ba: f7f8 f881 bl 8021ac0 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 ); 80299be: 6b23 ldr r3, [r4, #48] ; 0x30 80299c0: f10b 3bff add.w fp, fp, #4294967295 80299c4: 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. */ 80299c8: 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++ ) 80299cc: 2600 movs r6, #0 80299ce: e003 b.n 80299d8 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 80299d0: 4630 mov r0, r6 80299d2: f001 f811 bl 802a9f8 80299d6: e084 b.n 8029ae2 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. */ 80299d8: 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 ]; 80299da: 5dba ldrb r2, [r7, r6] 80299dc: 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 ) 80299e0: 5dbb ldrb r3, [r7, r6] 80299e2: b113 cbz r3, 80299ea 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++ ) 80299e4: 3601 adds r6, #1 80299e6: 2e10 cmp r6, #16 80299e8: d1f6 bne.n 80299d8 } } /* 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'; 80299ea: 2600 movs r6, #0 pxTCB->uxBasePriority = uxPriority; pxTCB->uxMutexesHeld = 0; } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 80299ec: 1d27 adds r7, r4, #4 80299ee: 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'; 80299f0: f884 6043 strb.w r6, [r4, #67] ; 0x43 else { mtCOVERAGE_TEST_MARKER(); } pxTCB->uxPriority = uxPriority; 80299f4: 62e5 str r5, [r4, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxTCB->uxBasePriority = uxPriority; 80299f6: 64e5 str r5, [r4, #76] ; 0x4c pxTCB->uxMutexesHeld = 0; 80299f8: 6526 str r6, [r4, #80] ; 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 80299fa: f7ff fc4c bl 8029296 vListInitialiseItem( &( pxTCB->xEventListItem ) ); 80299fe: f104 0018 add.w r0, r4, #24 8029a02: f7ff fc48 bl 8029296 /* 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. */ 8029a06: f1c5 0305 rsb r3, r5, #5 } #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; 8029a0a: 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 ); 8029a0c: 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. */ 8029a0e: 61a3 str r3, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxTCB->xEventListItem ), pxTCB ); 8029a10: 6264 str r4, [r4, #36] ; 0x24 #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; pxTCB->eNotifyState = eNotWaitingNotification; 8029a12: 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 ); 8029a16: 4658 mov r0, fp 8029a18: 4649 mov r1, r9 8029a1a: 4652 mov r2, sl 8029a1c: f000 fe24 bl 802a668 8029a20: 6020 str r0, [r4, #0] } #endif /* portUSING_MPU_WRAPPERS */ if( ( void * ) pxCreatedTask != NULL ) 8029a22: f1b8 0f00 cmp.w r8, #0 8029a26: d001 beq.n 8029a2c { /* 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; 8029a28: f8c8 4000 str.w r4, [r8] mtCOVERAGE_TEST_MARKER(); } /* Ensure interrupts don't access the task lists while they are being updated. */ taskENTER_CRITICAL(); 8029a2c: f000 fe50 bl 802a6d0 { uxCurrentNumberOfTasks++; 8029a30: 4a2e ldr r2, [pc, #184] ; (8029aec ) 8029a32: 6813 ldr r3, [r2, #0] 8029a34: 3301 adds r3, #1 8029a36: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 8029a38: 4b2d ldr r3, [pc, #180] ; (8029af0 ) 8029a3a: 681e ldr r6, [r3, #0] 8029a3c: bb36 cbnz r6, 8029a8c { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 8029a3e: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 8029a40: 6813 ldr r3, [r2, #0] 8029a42: 2b01 cmp r3, #1 8029a44: d12a bne.n 8029a9c { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8029a46: f8df 80d0 ldr.w r8, [pc, #208] ; 8029b18 8029a4a: f04f 0914 mov.w r9, #20 8029a4e: 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++ ) 8029a52: 3601 adds r6, #1 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8029a54: f7ff fc14 bl 8029280 static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8029a58: 2e05 cmp r6, #5 8029a5a: d1f8 bne.n 8029a4e { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 8029a5c: f8df 80bc ldr.w r8, [pc, #188] ; 8029b1c vListInitialise( &xDelayedTaskList2 ); 8029a60: 4e24 ldr r6, [pc, #144] ; (8029af4 ) for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 8029a62: 4640 mov r0, r8 8029a64: f7ff fc0c bl 8029280 vListInitialise( &xDelayedTaskList2 ); 8029a68: 4630 mov r0, r6 8029a6a: f7ff fc09 bl 8029280 vListInitialise( &xPendingReadyList ); 8029a6e: 4822 ldr r0, [pc, #136] ; (8029af8 ) 8029a70: f7ff fc06 bl 8029280 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 8029a74: 4821 ldr r0, [pc, #132] ; (8029afc ) 8029a76: f7ff fc03 bl 8029280 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 8029a7a: 4821 ldr r0, [pc, #132] ; (8029b00 ) 8029a7c: f7ff fc00 bl 8029280 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 8029a80: 4b20 ldr r3, [pc, #128] ; (8029b04 ) 8029a82: f8c3 8000 str.w r8, [r3] pxOverflowDelayedTaskList = &xDelayedTaskList2; 8029a86: 4b20 ldr r3, [pc, #128] ; (8029b08 ) 8029a88: 601e str r6, [r3, #0] 8029a8a: e007 b.n 8029a9c 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 ) 8029a8c: 4a1f ldr r2, [pc, #124] ; (8029b0c ) 8029a8e: 6812 ldr r2, [r2, #0] 8029a90: b922 cbnz r2, 8029a9c { if( pxCurrentTCB->uxPriority <= uxPriority ) 8029a92: 681a ldr r2, [r3, #0] 8029a94: 6ad2 ldr r2, [r2, #44] ; 0x2c 8029a96: 42aa cmp r2, r5 { pxCurrentTCB = pxNewTCB; 8029a98: bf98 it ls 8029a9a: 601c strls r4, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 8029a9c: 4a1c ldr r2, [pc, #112] ; (8029b10 ) 8029a9e: 6813 ldr r3, [r2, #0] 8029aa0: 3301 adds r3, #1 8029aa2: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 8029aa4: 4a1b ldr r2, [pc, #108] ; (8029b14 ) uxTaskNumber++; #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 8029aa6: 6463 str r3, [r4, #68] ; 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 8029aa8: 6ae3 ldr r3, [r4, #44] ; 0x2c 8029aaa: 6811 ldr r1, [r2, #0] 8029aac: 2401 movs r4, #1 8029aae: fa04 f003 lsl.w r0, r4, r3 8029ab2: 4301 orrs r1, r0 8029ab4: 6011 str r1, [r2, #0] 8029ab6: 4a18 ldr r2, [pc, #96] ; (8029b18 ) 8029ab8: 2014 movs r0, #20 8029aba: fb00 2003 mla r0, r0, r3, r2 8029abe: 4639 mov r1, r7 8029ac0: f7ff fbec bl 802929c xReturn = pdPASS; portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 8029ac4: f000 fe30 bl 802a728 traceTASK_CREATE_FAILED(); } if( xReturn == pdPASS ) { if( xSchedulerRunning != pdFALSE ) 8029ac8: 4b10 ldr r3, [pc, #64] ; (8029b0c ) 8029aca: 681b ldr r3, [r3, #0] 8029acc: b133 cbz r3, 8029adc { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < uxPriority ) 8029ace: 4b08 ldr r3, [pc, #32] ; (8029af0 ) 8029ad0: 681b ldr r3, [r3, #0] 8029ad2: 6adb ldr r3, [r3, #44] ; 0x2c 8029ad4: 42ab cmp r3, r5 8029ad6: d201 bcs.n 8029adc { taskYIELD_IF_USING_PREEMPTION(); 8029ad8: f000 fde6 bl 802a6a8 #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); xReturn = pdPASS; 8029adc: 4620 mov r0, r4 8029ade: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } taskEXIT_CRITICAL(); } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 8029ae2: f04f 30ff mov.w r0, #4294967295 mtCOVERAGE_TEST_MARKER(); } } return xReturn; } 8029ae6: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8029aea: bf00 nop 8029aec: 20002a60 .word 0x20002a60 8029af0: 20002a38 .word 0x20002a38 8029af4: 200029a8 .word 0x200029a8 8029af8: 20002a3c .word 0x20002a3c 8029afc: 20002a24 .word 0x20002a24 8029b00: 20002a64 .word 0x20002a64 8029b04: 20002988 .word 0x20002988 8029b08: 20002a58 .word 0x20002a58 8029b0c: 2000298c .word 0x2000298c 8029b10: 20002a5c .word 0x20002a5c 8029b14: 20002a78 .word 0x20002a78 8029b18: 200029c0 .word 0x200029c0 8029b1c: 20002994 .word 0x20002994 08029b20 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) void vTaskDelete( TaskHandle_t xTaskToDelete ) { 8029b20: b538 push {r3, r4, r5, lr} 8029b22: 4604 mov r4, r0 TCB_t *pxTCB; taskENTER_CRITICAL(); 8029b24: f000 fdd4 bl 802a6d0 { /* If null is passed in here then it is the calling task that is being deleted. */ pxTCB = prvGetTCBFromHandle( xTaskToDelete ); 8029b28: b90c cbnz r4, 8029b2e 8029b2a: 4b22 ldr r3, [pc, #136] ; (8029bb4 ) 8029b2c: 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 ) 8029b2e: 1d25 adds r5, r4, #4 8029b30: 4628 mov r0, r5 8029b32: f7ff fbd7 bl 80292e4 8029b36: b968 cbnz r0, 8029b54 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 8029b38: 6ae2 ldr r2, [r4, #44] ; 0x2c 8029b3a: 491f ldr r1, [pc, #124] ; (8029bb8 ) 8029b3c: 2314 movs r3, #20 8029b3e: 4353 muls r3, r2 8029b40: 58cb ldr r3, [r1, r3] 8029b42: b93b cbnz r3, 8029b54 8029b44: 4b1d ldr r3, [pc, #116] ; (8029bbc ) 8029b46: 2001 movs r0, #1 8029b48: 6819 ldr r1, [r3, #0] 8029b4a: fa00 f202 lsl.w r2, r0, r2 8029b4e: ea21 0202 bic.w r2, r1, r2 8029b52: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Is the task waiting on an event also? */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 8029b54: 6aa3 ldr r3, [r4, #40] ; 0x28 8029b56: b11b cbz r3, 8029b60 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8029b58: f104 0018 add.w r0, r4, #24 8029b5c: f7ff fbc2 bl 80292e4 else { mtCOVERAGE_TEST_MARKER(); } vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) ); 8029b60: 4817 ldr r0, [pc, #92] ; (8029bc0 ) 8029b62: 4629 mov r1, r5 8029b64: f7ff fb9a bl 802929c /* 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; 8029b68: 4b16 ldr r3, [pc, #88] ; (8029bc4 ) 8029b6a: 681a ldr r2, [r3, #0] 8029b6c: 3201 adds r2, #1 8029b6e: 601a str r2, [r3, #0] /* Increment the uxTaskNumberVariable also so kernel aware debuggers can detect that the task lists need re-generating. */ uxTaskNumber++; 8029b70: 4b15 ldr r3, [pc, #84] ; (8029bc8 ) 8029b72: 681a ldr r2, [r3, #0] 8029b74: 3201 adds r2, #1 8029b76: 601a str r2, [r3, #0] traceTASK_DELETE( pxTCB ); } taskEXIT_CRITICAL(); 8029b78: f000 fdd6 bl 802a728 /* Force a reschedule if it is the currently running task that has just been deleted. */ if( xSchedulerRunning != pdFALSE ) 8029b7c: 4b13 ldr r3, [pc, #76] ; (8029bcc ) 8029b7e: 681b ldr r3, [r3, #0] 8029b80: 2b00 cmp r3, #0 8029b82: d015 beq.n 8029bb0 { if( pxTCB == pxCurrentTCB ) 8029b84: 4b0b ldr r3, [pc, #44] ; (8029bb4 ) 8029b86: 681b ldr r3, [r3, #0] 8029b88: 429c cmp r4, r3 8029b8a: d109 bne.n 8029ba0 { configASSERT( uxSchedulerSuspended == 0 ); 8029b8c: 4b10 ldr r3, [pc, #64] ; (8029bd0 ) 8029b8e: 681b ldr r3, [r3, #0] 8029b90: b113 cbz r3, 8029b98 8029b92: f000 fd95 bl 802a6c0 8029b96: e7fe b.n 8029b96 prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); } } } 8029b98: 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(); 8029b9c: f000 bd84 b.w 802a6a8 } else { /* Reset the next expected unblock time in case it referred to the task that has just been deleted. */ taskENTER_CRITICAL(); 8029ba0: f000 fd96 bl 802a6d0 { prvResetNextTaskUnblockTime(); 8029ba4: f7ff feaa bl 80298fc } taskEXIT_CRITICAL(); } } } 8029ba8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} the task that has just been deleted. */ taskENTER_CRITICAL(); { prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); 8029bac: f000 bdbc b.w 802a728 8029bb0: bd38 pop {r3, r4, r5, pc} 8029bb2: bf00 nop 8029bb4: 20002a38 .word 0x20002a38 8029bb8: 200029c0 .word 0x200029c0 8029bbc: 20002a78 .word 0x20002a78 8029bc0: 20002a24 .word 0x20002a24 8029bc4: 20002990 .word 0x20002990 8029bc8: 20002a5c .word 0x20002a5c 8029bcc: 2000298c .word 0x2000298c 8029bd0: 20002a50 .word 0x20002a50 08029bd4 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 8029bd4: b530 push {r4, r5, lr} 8029bd6: 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. */ 8029bd8: 2400 movs r4, #0 8029bda: 2280 movs r2, #128 ; 0x80 8029bdc: 9400 str r4, [sp, #0] 8029bde: 9401 str r4, [sp, #4] 8029be0: 9402 str r4, [sp, #8] 8029be2: 9403 str r4, [sp, #12] 8029be4: 480e ldr r0, [pc, #56] ; (8029c20 ) 8029be6: 490f ldr r1, [pc, #60] ; (8029c24 ) 8029be8: 4623 mov r3, r4 8029bea: f7ff fec1 bl 8029970 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 8029bee: 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. */ 8029bf0: 4605 mov r5, r0 } #endif /* INCLUDE_xTaskGetIdleTaskHandle */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 8029bf2: d10f bne.n 8029c14 { xReturn = xTimerCreateTimerTask(); 8029bf4: f000 fbce bl 802a394 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 8029bf8: 2801 cmp r0, #1 #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) { xReturn = xTimerCreateTimerTask(); 8029bfa: 4605 mov r5, r0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 8029bfc: d10a bne.n 8029c14 /* 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(); 8029bfe: f000 fd5f bl 802a6c0 structure specific to the task that will run first. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xSchedulerRunning = pdTRUE; 8029c02: 4b09 ldr r3, [pc, #36] ; (8029c28 ) 8029c04: 601d str r5, [r3, #0] xTickCount = ( TickType_t ) 0U; 8029c06: 4b09 ldr r3, [pc, #36] ; (8029c2c ) 8029c08: 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 ); } } 8029c0a: b005 add sp, #20 8029c0c: 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 ) 8029c10: f000 bde2 b.w 802a7d8 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 ); 8029c14: b915 cbnz r5, 8029c1c 8029c16: f000 fd53 bl 802a6c0 8029c1a: e7fe b.n 8029c1a } } 8029c1c: b005 add sp, #20 8029c1e: bd30 pop {r4, r5, pc} 8029c20: 08029e41 .word 0x08029e41 8029c24: 08036e76 .word 0x08036e76 8029c28: 2000298c .word 0x2000298c 8029c2c: 20002a54 .word 0x20002a54 08029c30 : { /* 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; 8029c30: 4b02 ldr r3, [pc, #8] ; (8029c3c ) 8029c32: 681a ldr r2, [r3, #0] 8029c34: 3201 adds r2, #1 8029c36: 601a str r2, [r3, #0] 8029c38: 4770 bx lr 8029c3a: bf00 nop 8029c3c: 20002a50 .word 0x20002a50 08029c40 : TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 8029c40: 4b01 ldr r3, [pc, #4] ; (8029c48 ) 8029c42: 6818 ldr r0, [r3, #0] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; } 8029c44: 4770 bx lr 8029c46: bf00 nop 8029c48: 20002a54 .word 0x20002a54 08029c4c : /* 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 ) 8029c4c: 4b3b ldr r3, [pc, #236] ; (8029d3c ) 8029c4e: 681b ldr r3, [r3, #0] #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 8029c50: 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 ) 8029c54: 2b00 cmp r3, #0 8029c56: d15b bne.n 8029d10 { /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ ++xTickCount; 8029c58: 4b39 ldr r3, [pc, #228] ; (8029d40 ) 8029c5a: 681a ldr r2, [r3, #0] 8029c5c: 3201 adds r2, #1 8029c5e: 601a str r2, [r3, #0] { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8029c60: 681e ldr r6, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) 8029c62: b98e cbnz r6, 8029c88 { taskSWITCH_DELAYED_LISTS(); 8029c64: 4b37 ldr r3, [pc, #220] ; (8029d44 ) 8029c66: 681a ldr r2, [r3, #0] 8029c68: 6812 ldr r2, [r2, #0] 8029c6a: b112 cbz r2, 8029c72 8029c6c: f000 fd28 bl 802a6c0 8029c70: e7fe b.n 8029c70 8029c72: 4a35 ldr r2, [pc, #212] ; (8029d48 ) 8029c74: 6819 ldr r1, [r3, #0] 8029c76: 6810 ldr r0, [r2, #0] 8029c78: 6018 str r0, [r3, #0] 8029c7a: 4b34 ldr r3, [pc, #208] ; (8029d4c ) 8029c7c: 6011 str r1, [r2, #0] 8029c7e: 681a ldr r2, [r3, #0] 8029c80: 3201 adds r2, #1 8029c82: 601a str r2, [r3, #0] 8029c84: f7ff fe3a bl 80298fc /* 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 ) 8029c88: 4b31 ldr r3, [pc, #196] ; (8029d50 ) 8029c8a: 681b ldr r3, [r3, #0] 8029c8c: 2400 movs r4, #0 8029c8e: 429e cmp r6, r3 8029c90: d200 bcs.n 8029c94 8029c92: e032 b.n 8029cfa { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 8029c94: 4f2b ldr r7, [pc, #172] ; (8029d44 ) mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 8029c96: f8df 80cc ldr.w r8, [pc, #204] ; 8029d64 8029c9a: f8df a0bc ldr.w sl, [pc, #188] ; 8029d58 look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 8029c9e: 683b ldr r3, [r7, #0] 8029ca0: 681b ldr r3, [r3, #0] 8029ca2: 2b00 cmp r3, #0 8029ca4: d13a bne.n 8029d1c /* 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; 8029ca6: 4b2a ldr r3, [pc, #168] ; (8029d50 ) 8029ca8: f04f 32ff mov.w r2, #4294967295 8029cac: 601a str r2, [r3, #0] break; 8029cae: e024 b.n 8029cfa /* 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; 8029cb0: 4a27 ldr r2, [pc, #156] ; (8029d50 ) 8029cb2: 6013 str r3, [r2, #0] break; 8029cb4: e021 b.n 8029cfa { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 8029cb6: f105 0904 add.w r9, r5, #4 8029cba: 4648 mov r0, r9 8029cbc: f7ff fb12 bl 80292e4 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 8029cc0: 6aab ldr r3, [r5, #40] ; 0x28 8029cc2: b11b cbz r3, 8029ccc { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8029cc4: f105 0018 add.w r0, r5, #24 8029cc8: f7ff fb0c bl 80292e4 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 8029ccc: 6aeb ldr r3, [r5, #44] ; 0x2c 8029cce: f8d8 1000 ldr.w r1, [r8] 8029cd2: 2201 movs r2, #1 8029cd4: fa02 f203 lsl.w r2, r2, r3 8029cd8: 2014 movs r0, #20 8029cda: 430a orrs r2, r1 8029cdc: fb00 a003 mla r0, r0, r3, sl 8029ce0: 4649 mov r1, r9 8029ce2: f8c8 2000 str.w r2, [r8] 8029ce6: f7ff fad9 bl 802929c { /* 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 ) 8029cea: 4b1a ldr r3, [pc, #104] ; (8029d54 ) 8029cec: 6aea ldr r2, [r5, #44] ; 0x2c 8029cee: 681b ldr r3, [r3, #0] 8029cf0: 6adb ldr r3, [r3, #44] ; 0x2c { xSwitchRequired = pdTRUE; 8029cf2: 429a cmp r2, r3 8029cf4: bf28 it cs 8029cf6: 2401 movcs r4, #1 8029cf8: e7d1 b.n 8029c9e /* 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 ) 8029cfa: 4b16 ldr r3, [pc, #88] ; (8029d54 ) 8029cfc: 681b ldr r3, [r3, #0] 8029cfe: 6adb ldr r3, [r3, #44] ; 0x2c 8029d00: 2214 movs r2, #20 8029d02: 4353 muls r3, r2 8029d04: 4a14 ldr r2, [pc, #80] ; (8029d58 ) 8029d06: 58d3 ldr r3, [r2, r3] { xSwitchRequired = pdTRUE; 8029d08: 2b01 cmp r3, #1 8029d0a: bf88 it hi 8029d0c: 2401 movhi r4, #1 8029d0e: e00c b.n 8029d2a } #endif /* configUSE_TICK_HOOK */ } else { ++uxPendedTicks; 8029d10: 4b12 ldr r3, [pc, #72] ; (8029d5c ) 8029d12: 681a ldr r2, [r3, #0] 8029d14: 3201 adds r2, #1 8029d16: 601a str r2, [r3, #0] BaseType_t xTaskIncrementTick( void ) { TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 8029d18: 2400 movs r4, #0 8029d1a: e006 b.n 8029d2a { /* 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 ); 8029d1c: 683b ldr r3, [r7, #0] 8029d1e: 68db ldr r3, [r3, #12] 8029d20: 68dd ldr r5, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); 8029d22: 686b ldr r3, [r5, #4] if( xConstTickCount < xItemValue ) 8029d24: 429e cmp r6, r3 8029d26: d2c6 bcs.n 8029cb6 8029d28: e7c2 b.n 8029cb0 #endif } #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 8029d2a: 4b0d ldr r3, [pc, #52] ; (8029d60 ) 8029d2c: 681b ldr r3, [r3, #0] { xSwitchRequired = pdTRUE; 8029d2e: 2b00 cmp r3, #0 8029d30: bf18 it ne 8029d32: 2401 movne r4, #1 } } #endif /* configUSE_PREEMPTION */ return xSwitchRequired; } 8029d34: 4620 mov r0, r4 8029d36: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8029d3a: bf00 nop 8029d3c: 20002a50 .word 0x20002a50 8029d40: 20002a54 .word 0x20002a54 8029d44: 20002988 .word 0x20002988 8029d48: 20002a58 .word 0x20002a58 8029d4c: 20002984 .word 0x20002984 8029d50: 200015dc .word 0x200015dc 8029d54: 20002a38 .word 0x20002a38 8029d58: 200029c0 .word 0x200029c0 8029d5c: 200029bc .word 0x200029bc 8029d60: 20002a7c .word 0x20002a7c 8029d64: 20002a78 .word 0x20002a78 08029d68 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 8029d68: 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 ); 8029d6c: 4c2c ldr r4, [pc, #176] ; (8029e20 ) 8029d6e: 6823 ldr r3, [r4, #0] 8029d70: b913 cbnz r3, 8029d78 8029d72: f000 fca5 bl 802a6c0 8029d76: e7fe b.n 8029d76 /* 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(); 8029d78: f000 fcaa bl 802a6d0 { --uxSchedulerSuspended; 8029d7c: 6823 ldr r3, [r4, #0] 8029d7e: 3b01 subs r3, #1 8029d80: 6023 str r3, [r4, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8029d82: 6823 ldr r3, [r4, #0] 8029d84: b10b cbz r3, 8029d8a /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; 8029d86: 2400 movs r4, #0 8029d88: e044 b.n 8029e14 { --uxSchedulerSuspended; if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 8029d8a: 4b26 ldr r3, [pc, #152] ; (8029e24 ) 8029d8c: 681b ldr r3, [r3, #0] 8029d8e: bb0b cbnz r3, 8029dd4 8029d90: e7f9 b.n 8029d86 { /* 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 ) ); 8029d92: 68f3 ldr r3, [r6, #12] 8029d94: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 8029d96: 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 ) ); 8029d9a: f104 0018 add.w r0, r4, #24 8029d9e: f7ff faa1 bl 80292e4 ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 8029da2: 4640 mov r0, r8 8029da4: f7ff fa9e bl 80292e4 prvAddTaskToReadyList( pxTCB ); 8029da8: 6ae3 ldr r3, [r4, #44] ; 0x2c 8029daa: 682a ldr r2, [r5, #0] 8029dac: 2701 movs r7, #1 8029dae: fa07 f103 lsl.w r1, r7, r3 8029db2: 2014 movs r0, #20 8029db4: 430a orrs r2, r1 8029db6: fb00 9003 mla r0, r0, r3, r9 8029dba: 4641 mov r1, r8 8029dbc: 602a str r2, [r5, #0] 8029dbe: f7ff fa6d bl 802929c /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 8029dc2: 4b19 ldr r3, [pc, #100] ; (8029e28 ) 8029dc4: 6ae2 ldr r2, [r4, #44] ; 0x2c 8029dc6: 681b ldr r3, [r3, #0] 8029dc8: 6adb ldr r3, [r3, #44] ; 0x2c 8029dca: 429a cmp r2, r3 8029dcc: d306 bcc.n 8029ddc { xYieldPending = pdTRUE; 8029dce: 4b17 ldr r3, [pc, #92] ; (8029e2c ) 8029dd0: 601f str r7, [r3, #0] 8029dd2: e003 b.n 8029ddc { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8029dd4: 4e16 ldr r6, [pc, #88] ; (8029e30 ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); prvAddTaskToReadyList( pxTCB ); 8029dd6: 4d17 ldr r5, [pc, #92] ; (8029e34 ) 8029dd8: f8df 9060 ldr.w r9, [pc, #96] ; 8029e3c { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8029ddc: 6833 ldr r3, [r6, #0] 8029dde: 2b00 cmp r3, #0 8029de0: d1d7 bne.n 8029d92 /* 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 ) 8029de2: 4c15 ldr r4, [pc, #84] ; (8029e38 ) 8029de4: 6823 ldr r3, [r4, #0] 8029de6: b96b cbnz r3, 8029e04 else { mtCOVERAGE_TEST_MARKER(); } if( xYieldPending == pdTRUE ) 8029de8: 4b10 ldr r3, [pc, #64] ; (8029e2c ) 8029dea: 681c ldr r4, [r3, #0] 8029dec: 2c01 cmp r4, #1 8029dee: d1ca bne.n 8029d86 8029df0: e00e b.n 8029e10 time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) 8029df2: f7ff ff2b bl 8029c4c 8029df6: b108 cbz r0, 8029dfc { xYieldPending = pdTRUE; 8029df8: 2301 movs r3, #1 8029dfa: 6033 str r3, [r6, #0] } else { mtCOVERAGE_TEST_MARKER(); } --uxPendedTicks; 8029dfc: 682b ldr r3, [r5, #0] 8029dfe: 3b01 subs r3, #1 8029e00: 602b str r3, [r5, #0] 8029e02: e001 b.n 8029e08 { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) { xYieldPending = pdTRUE; 8029e04: 4e09 ldr r6, [pc, #36] ; (8029e2c ) 8029e06: 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 ) 8029e08: 6823 ldr r3, [r4, #0] 8029e0a: 2b00 cmp r3, #0 8029e0c: d1f1 bne.n 8029df2 8029e0e: e7eb b.n 8029de8 #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; } #endif taskYIELD_IF_USING_PREEMPTION(); 8029e10: f000 fc4a bl 802a6a8 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8029e14: f000 fc88 bl 802a728 return xAlreadyYielded; } 8029e18: 4620 mov r0, r4 8029e1a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8029e1e: bf00 nop 8029e20: 20002a50 .word 0x20002a50 8029e24: 20002a60 .word 0x20002a60 8029e28: 20002a38 .word 0x20002a38 8029e2c: 20002a7c .word 0x20002a7c 8029e30: 20002a3c .word 0x20002a3c 8029e34: 20002a78 .word 0x20002a78 8029e38: 200029bc .word 0x200029bc 8029e3c: 200029c0 .word 0x200029c0 08029e40 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 8029e40: 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 ) 8029e42: 4c14 ldr r4, [pc, #80] ; (8029e94 ) { vTaskSuspendAll(); { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 8029e44: 4e14 ldr r6, [pc, #80] ; (8029e98 ) taskENTER_CRITICAL(); { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); --uxCurrentNumberOfTasks; 8029e46: 4f15 ldr r7, [pc, #84] ; (8029e9c ) { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 8029e48: 6823 ldr r3, [r4, #0] 8029e4a: b1e3 cbz r3, 8029e86 { vTaskSuspendAll(); 8029e4c: f7ff fef0 bl 8029c30 { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 8029e50: 6835 ldr r5, [r6, #0] } ( void ) xTaskResumeAll(); 8029e52: f7ff ff89 bl 8029d68 if( xListIsEmpty == pdFALSE ) 8029e56: 2d00 cmp r5, #0 8029e58: d0f6 beq.n 8029e48 { TCB_t *pxTCB; taskENTER_CRITICAL(); 8029e5a: f000 fc39 bl 802a6d0 { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); 8029e5e: 68f3 ldr r3, [r6, #12] 8029e60: 68dd ldr r5, [r3, #12] ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 8029e62: 1d28 adds r0, r5, #4 8029e64: f7ff fa3e bl 80292e4 --uxCurrentNumberOfTasks; 8029e68: 683b ldr r3, [r7, #0] 8029e6a: 3b01 subs r3, #1 8029e6c: 603b str r3, [r7, #0] --uxTasksDeleted; 8029e6e: 6823 ldr r3, [r4, #0] 8029e70: 3b01 subs r3, #1 8029e72: 6023 str r3, [r4, #0] } taskEXIT_CRITICAL(); 8029e74: f000 fc58 bl 802a728 vPortFreeAligned( pxTCB->pxStack ); } } #else { vPortFreeAligned( pxTCB->pxStack ); 8029e78: 6b28 ldr r0, [r5, #48] ; 0x30 8029e7a: f000 fdbd bl 802a9f8 } #endif vPortFree( pxTCB ); 8029e7e: 4628 mov r0, r5 8029e80: f000 fdba bl 802a9f8 8029e84: e7e0 b.n 8029e48 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 ) 8029e86: 4b06 ldr r3, [pc, #24] ; (8029ea0 ) 8029e88: 681b ldr r3, [r3, #0] 8029e8a: 2b01 cmp r3, #1 8029e8c: d9dc bls.n 8029e48 { taskYIELD(); 8029e8e: f000 fc0b bl 802a6a8 8029e92: e7d9 b.n 8029e48 8029e94: 20002990 .word 0x20002990 8029e98: 20002a24 .word 0x20002a24 8029e9c: 20002a60 .word 0x20002a60 8029ea0: 200029c0 .word 0x200029c0 08029ea4 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 8029ea4: 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 ) 8029ea6: 4604 mov r4, r0 8029ea8: b918 cbnz r0, 8029eb2 } else { mtCOVERAGE_TEST_MARKER(); } } 8029eaa: 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(); 8029eae: f000 bbfb b.w 802a6a8 /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) { configASSERT( uxSchedulerSuspended == 0 ); 8029eb2: 4b11 ldr r3, [pc, #68] ; (8029ef8 ) 8029eb4: 681b ldr r3, [r3, #0] 8029eb6: b113 cbz r3, 8029ebe 8029eb8: f000 fc02 bl 802a6c0 8029ebc: e7fe b.n 8029ebc vTaskSuspendAll(); 8029ebe: f7ff feb7 bl 8029c30 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; 8029ec2: 4b0e ldr r3, [pc, #56] ; (8029efc ) 8029ec4: 681d ldr r5, [r3, #0] 8029ec6: 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 ) 8029ec8: 4c0d ldr r4, [pc, #52] ; (8029f00 ) 8029eca: 6820 ldr r0, [r4, #0] 8029ecc: 3004 adds r0, #4 8029ece: f7ff fa09 bl 80292e4 8029ed2: b948 cbnz r0, 8029ee8 { /* 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 ); 8029ed4: 4b0b ldr r3, [pc, #44] ; (8029f04 ) 8029ed6: 6819 ldr r1, [r3, #0] 8029ed8: 6822 ldr r2, [r4, #0] 8029eda: 6ad2 ldr r2, [r2, #44] ; 0x2c 8029edc: 2001 movs r0, #1 8029ede: fa00 f202 lsl.w r2, r0, r2 8029ee2: ea21 0202 bic.w r2, r1, r2 8029ee6: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 8029ee8: 4628 mov r0, r5 8029eea: f7ff fd19 bl 8029920 } xAlreadyYielded = xTaskResumeAll(); 8029eee: f7ff ff3b bl 8029d68 mtCOVERAGE_TEST_MARKER(); } /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 8029ef2: 2800 cmp r0, #0 8029ef4: d0d9 beq.n 8029eaa } else { mtCOVERAGE_TEST_MARKER(); } } 8029ef6: bd38 pop {r3, r4, r5, pc} 8029ef8: 20002a50 .word 0x20002a50 8029efc: 20002a54 .word 0x20002a54 8029f00: 20002a38 .word 0x20002a38 8029f04: 20002a78 .word 0x20002a78 08029f08 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { 8029f08: b570 push {r4, r5, r6, lr} 8029f0a: 460c mov r4, r1 TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; configASSERT( pxPreviousWakeTime ); 8029f0c: 4605 mov r5, r0 8029f0e: b910 cbnz r0, 8029f16 8029f10: f000 fbd6 bl 802a6c0 8029f14: e7fe b.n 8029f14 configASSERT( ( xTimeIncrement > 0U ) ); 8029f16: b911 cbnz r1, 8029f1e 8029f18: f000 fbd2 bl 802a6c0 8029f1c: e7fe b.n 8029f1c configASSERT( uxSchedulerSuspended == 0 ); 8029f1e: 4b1c ldr r3, [pc, #112] ; (8029f90 ) 8029f20: 681e ldr r6, [r3, #0] 8029f22: b116 cbz r6, 8029f2a 8029f24: f000 fbcc bl 802a6c0 8029f28: e7fe b.n 8029f28 vTaskSuspendAll(); 8029f2a: f7ff fe81 bl 8029c30 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8029f2e: 4b19 ldr r3, [pc, #100] ; (8029f94 ) /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; 8029f30: 682a ldr r2, [r5, #0] vTaskSuspendAll(); { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8029f32: 6818 ldr r0, [r3, #0] /* Generate the tick time at which the task wants to wake. */ xTimeToWake = *pxPreviousWakeTime + xTimeIncrement; if( xConstTickCount < *pxPreviousWakeTime ) 8029f34: 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; 8029f36: 4414 add r4, r2 if( xConstTickCount < *pxPreviousWakeTime ) 8029f38: d202 bcs.n 8029f40 /* 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 ) ) 8029f3a: 4294 cmp r4, r2 8029f3c: d207 bcs.n 8029f4e 8029f3e: e001 b.n 8029f44 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 ) ) 8029f40: 4294 cmp r4, r2 8029f42: d306 bcc.n 8029f52 8029f44: 4284 cmp r4, r0 8029f46: bf94 ite ls 8029f48: 2300 movls r3, #0 8029f4a: 2301 movhi r3, #1 8029f4c: e002 b.n 8029f54 #if ( INCLUDE_vTaskDelayUntil == 1 ) void vTaskDelayUntil( TickType_t * const pxPreviousWakeTime, const TickType_t xTimeIncrement ) { TickType_t xTimeToWake; BaseType_t xAlreadyYielded, xShouldDelay = pdFALSE; 8029f4e: 4633 mov r3, r6 8029f50: e000 b.n 8029f54 /* 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; 8029f52: 2301 movs r3, #1 mtCOVERAGE_TEST_MARKER(); } } /* Update the wake time ready for the next call. */ *pxPreviousWakeTime = xTimeToWake; 8029f54: 602c str r4, [r5, #0] if( xShouldDelay != pdFALSE ) 8029f56: b193 cbz r3, 8029f7e { 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 ) 8029f58: 4d0f ldr r5, [pc, #60] ; (8029f98 ) 8029f5a: 6828 ldr r0, [r5, #0] 8029f5c: 3004 adds r0, #4 8029f5e: f7ff f9c1 bl 80292e4 8029f62: b948 cbnz r0, 8029f78 { /* 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 ); 8029f64: 4b0d ldr r3, [pc, #52] ; (8029f9c ) 8029f66: 6819 ldr r1, [r3, #0] 8029f68: 682a ldr r2, [r5, #0] 8029f6a: 6ad2 ldr r2, [r2, #44] ; 0x2c 8029f6c: 2001 movs r0, #1 8029f6e: fa00 f202 lsl.w r2, r0, r2 8029f72: ea21 0202 bic.w r2, r1, r2 8029f76: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 8029f78: 4620 mov r0, r4 8029f7a: f7ff fcd1 bl 8029920 else { mtCOVERAGE_TEST_MARKER(); } } xAlreadyYielded = xTaskResumeAll(); 8029f7e: f7ff fef3 bl 8029d68 /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 8029f82: b918 cbnz r0, 8029f8c } else { mtCOVERAGE_TEST_MARKER(); } } 8029f84: 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(); 8029f88: f000 bb8e b.w 802a6a8 8029f8c: bd70 pop {r4, r5, r6, pc} 8029f8e: bf00 nop 8029f90: 20002a50 .word 0x20002a50 8029f94: 20002a54 .word 0x20002a54 8029f98: 20002a38 .word 0x20002a38 8029f9c: 20002a78 .word 0x20002a78 08029fa0 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 8029fa0: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 8029fa2: 4b12 ldr r3, [pc, #72] ; (8029fec ) 8029fa4: 681a ldr r2, [r3, #0] 8029fa6: 4b12 ldr r3, [pc, #72] ; (8029ff0 ) 8029fa8: b10a cbz r2, 8029fae { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 8029faa: 2201 movs r2, #1 8029fac: e01c b.n 8029fe8 } else { xYieldPending = pdFALSE; 8029fae: 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(); 8029fb0: 4b10 ldr r3, [pc, #64] ; (8029ff4 ) 8029fb2: 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 ) ); 8029fb4: fab2 f282 clz r2, r2 8029fb8: b2d2 uxtb r2, r2 8029fba: 2314 movs r3, #20 8029fbc: f1c2 021f rsb r2, r2, #31 8029fc0: 490d ldr r1, [pc, #52] ; (8029ff8 ) 8029fc2: 435a muls r2, r3 8029fc4: 188b adds r3, r1, r2 8029fc6: 588a ldr r2, [r1, r2] 8029fc8: b912 cbnz r2, 8029fd0 8029fca: f000 fb79 bl 802a6c0 8029fce: e7fe b.n 8029fce 8029fd0: 685a ldr r2, [r3, #4] 8029fd2: 6852 ldr r2, [r2, #4] 8029fd4: f103 0108 add.w r1, r3, #8 8029fd8: 428a cmp r2, r1 8029fda: 605a str r2, [r3, #4] 8029fdc: bf04 itt eq 8029fde: 6852 ldreq r2, [r2, #4] 8029fe0: 605a streq r2, [r3, #4] 8029fe2: 685b ldr r3, [r3, #4] 8029fe4: 68da ldr r2, [r3, #12] 8029fe6: 4b05 ldr r3, [pc, #20] ; (8029ffc ) 8029fe8: 601a str r2, [r3, #0] 8029fea: bd08 pop {r3, pc} 8029fec: 20002a50 .word 0x20002a50 8029ff0: 20002a7c .word 0x20002a7c 8029ff4: 20002a78 .word 0x20002a78 8029ff8: 200029c0 .word 0x200029c0 8029ffc: 20002a38 .word 0x20002a38 0802a000 : } } /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802a000: b538 push {r3, r4, r5, lr} 802a002: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802a004: b910 cbnz r0, 802a00c 802a006: f000 fb5b bl 802a6c0 802a00a: e7fe b.n 802a00a /* 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 ) ); 802a00c: 4c12 ldr r4, [pc, #72] ; (802a058 ) 802a00e: 6821 ldr r1, [r4, #0] 802a010: 3118 adds r1, #24 802a012: f7ff f94f bl 80292b4 /* 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 ) 802a016: 6820 ldr r0, [r4, #0] 802a018: 3004 adds r0, #4 802a01a: f7ff f963 bl 80292e4 802a01e: b948 cbnz r0, 802a034 { /* 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 ); 802a020: 4b0e ldr r3, [pc, #56] ; (802a05c ) 802a022: 6819 ldr r1, [r3, #0] 802a024: 6822 ldr r2, [r4, #0] 802a026: 6ad2 ldr r2, [r2, #44] ; 0x2c 802a028: 2001 movs r0, #1 802a02a: fa00 f202 lsl.w r2, r0, r2 802a02e: ea21 0202 bic.w r2, r1, r2 802a032: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( xTicksToWait == portMAX_DELAY ) 802a034: 1c69 adds r1, r5, #1 802a036: d107 bne.n 802a048 { /* 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 ) ); 802a038: 4b07 ldr r3, [pc, #28] ; (802a058 ) 802a03a: 4809 ldr r0, [pc, #36] ; (802a060 ) 802a03c: 6819 ldr r1, [r3, #0] 802a03e: 3104 adds r1, #4 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802a040: 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 ) ); 802a044: f7ff b92a b.w 802929c 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; 802a048: 4b06 ldr r3, [pc, #24] ; (802a064 ) 802a04a: 6818 ldr r0, [r3, #0] prvAddCurrentTaskToDelayedList( xTimeToWake ); 802a04c: 1828 adds r0, r5, r0 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 802a04e: 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 ); 802a052: f7ff bc65 b.w 8029920 802a056: bf00 nop 802a058: 20002a38 .word 0x20002a38 802a05c: 20002a78 .word 0x20002a78 802a060: 20002a64 .word 0x20002a64 802a064: 20002a54 .word 0x20002a54 0802a068 : /*-----------------------------------------------------------*/ #if configUSE_TIMERS == 1 void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, const TickType_t xTicksToWait ) { 802a068: b538 push {r3, r4, r5, lr} 802a06a: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 802a06c: b910 cbnz r0, 802a074 802a06e: f000 fb27 bl 802a6c0 802a072: e7fe b.n 802a072 /* 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 ) ); 802a074: 4c0d ldr r4, [pc, #52] ; (802a0ac ) 802a076: 6821 ldr r1, [r4, #0] 802a078: 3118 adds r1, #24 802a07a: f7ff f90f bl 802929c /* 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 ) 802a07e: 6820 ldr r0, [r4, #0] 802a080: 3004 adds r0, #4 802a082: f7ff f92f bl 80292e4 802a086: b948 cbnz r0, 802a09c { /* 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 ); 802a088: 4b09 ldr r3, [pc, #36] ; (802a0b0 ) 802a08a: 6819 ldr r1, [r3, #0] 802a08c: 6822 ldr r2, [r4, #0] 802a08e: 6ad2 ldr r2, [r2, #44] ; 0x2c 802a090: 2001 movs r0, #1 802a092: fa00 f202 lsl.w r2, r0, r2 802a096: ea21 0202 bic.w r2, r1, r2 802a09a: 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; 802a09c: 4b05 ldr r3, [pc, #20] ; (802a0b4 ) 802a09e: 6818 ldr r0, [r3, #0] traceTASK_DELAY_UNTIL(); prvAddCurrentTaskToDelayedList( xTimeToWake ); 802a0a0: 1828 adds r0, r5, r0 } 802a0a2: 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 ); 802a0a6: f7ff bc3b b.w 8029920 802a0aa: bf00 nop 802a0ac: 20002a38 .word 0x20002a38 802a0b0: 20002a78 .word 0x20002a78 802a0b4: 20002a54 .word 0x20002a54 0802a0b8 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 802a0b8: 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 ); 802a0ba: 68c3 ldr r3, [r0, #12] 802a0bc: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 802a0be: b914 cbnz r4, 802a0c6 802a0c0: f000 fafe bl 802a6c0 802a0c4: e7fe b.n 802a0c4 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 802a0c6: f104 0518 add.w r5, r4, #24 802a0ca: 4628 mov r0, r5 802a0cc: f7ff f90a bl 80292e4 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802a0d0: 4b11 ldr r3, [pc, #68] ; (802a118 ) 802a0d2: 681b ldr r3, [r3, #0] 802a0d4: b983 cbnz r3, 802a0f8 { ( void ) uxListRemove( &( pxUnblockedTCB->xGenericListItem ) ); 802a0d6: 1d25 adds r5, r4, #4 802a0d8: 4628 mov r0, r5 802a0da: f7ff f903 bl 80292e4 prvAddTaskToReadyList( pxUnblockedTCB ); 802a0de: 4a0f ldr r2, [pc, #60] ; (802a11c ) 802a0e0: 6ae3 ldr r3, [r4, #44] ; 0x2c 802a0e2: 6810 ldr r0, [r2, #0] 802a0e4: 2101 movs r1, #1 802a0e6: fa01 f103 lsl.w r1, r1, r3 802a0ea: 4301 orrs r1, r0 802a0ec: 6011 str r1, [r2, #0] 802a0ee: 4a0c ldr r2, [pc, #48] ; (802a120 ) 802a0f0: 2014 movs r0, #20 802a0f2: fb00 2003 mla r0, r0, r3, r2 802a0f6: e000 b.n 802a0fa } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 802a0f8: 480a ldr r0, [pc, #40] ; (802a124 ) 802a0fa: 4629 mov r1, r5 802a0fc: f7ff f8ce bl 802929c } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 802a100: 4b09 ldr r3, [pc, #36] ; (802a128 ) 802a102: 6ae2 ldr r2, [r4, #44] ; 0x2c 802a104: 681b ldr r3, [r3, #0] 802a106: 6adb ldr r3, [r3, #44] ; 0x2c 802a108: 429a cmp r2, r3 802a10a: d903 bls.n 802a114 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; 802a10c: 4b07 ldr r3, [pc, #28] ; (802a12c ) 802a10e: 2001 movs r0, #1 802a110: 6018 str r0, [r3, #0] 802a112: bd38 pop {r3, r4, r5, pc} } else { xReturn = pdFALSE; 802a114: 2000 movs r0, #0 prvResetNextTaskUnblockTime(); } #endif return xReturn; } 802a116: bd38 pop {r3, r4, r5, pc} 802a118: 20002a50 .word 0x20002a50 802a11c: 20002a78 .word 0x20002a78 802a120: 200029c0 .word 0x200029c0 802a124: 20002a3c .word 0x20002a3c 802a128: 20002a38 .word 0x20002a38 802a12c: 20002a7c .word 0x20002a7c 0802a130 : return xReturn; } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 802a130: b508 push {r3, lr} configASSERT( pxTimeOut ); 802a132: b910 cbnz r0, 802a13a 802a134: f000 fac4 bl 802a6c0 802a138: e7fe b.n 802a138 pxTimeOut->xOverflowCount = xNumOfOverflows; 802a13a: 4b03 ldr r3, [pc, #12] ; (802a148 ) 802a13c: 681b ldr r3, [r3, #0] 802a13e: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 802a140: 4b02 ldr r3, [pc, #8] ; (802a14c ) 802a142: 681b ldr r3, [r3, #0] 802a144: 6043 str r3, [r0, #4] 802a146: bd08 pop {r3, pc} 802a148: 20002984 .word 0x20002984 802a14c: 20002a54 .word 0x20002a54 0802a150 : } /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 802a150: b538 push {r3, r4, r5, lr} 802a152: 460d mov r5, r1 BaseType_t xReturn; configASSERT( pxTimeOut ); 802a154: 4604 mov r4, r0 802a156: b910 cbnz r0, 802a15e 802a158: f000 fab2 bl 802a6c0 802a15c: e7fe b.n 802a15c configASSERT( pxTicksToWait ); 802a15e: b911 cbnz r1, 802a166 802a160: f000 faae bl 802a6c0 802a164: e7fe b.n 802a164 taskENTER_CRITICAL(); 802a166: f000 fab3 bl 802a6d0 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 802a16a: 4b0e ldr r3, [pc, #56] ; (802a1a4 ) 802a16c: 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 ) 802a16e: 682b ldr r3, [r5, #0] 802a170: 1c59 adds r1, r3, #1 802a172: d010 beq.n 802a196 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. */ 802a174: 490c ldr r1, [pc, #48] ; (802a1a8 ) 802a176: 6808 ldr r0, [r1, #0] 802a178: 6821 ldr r1, [r4, #0] 802a17a: 4288 cmp r0, r1 802a17c: 6861 ldr r1, [r4, #4] 802a17e: d001 beq.n 802a184 802a180: 428a cmp r2, r1 802a182: d20a bcs.n 802a19a 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 ) 802a184: 1a50 subs r0, r2, r1 802a186: 4298 cmp r0, r3 802a188: d207 bcs.n 802a19a { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering ); 802a18a: 1a8a subs r2, r1, r2 802a18c: 18d3 adds r3, r2, r3 802a18e: 602b str r3, [r5, #0] vTaskSetTimeOutState( pxTimeOut ); 802a190: 4620 mov r0, r4 802a192: f7ff ffcd bl 802a130 /* 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; 802a196: 2400 movs r4, #0 802a198: e000 b.n 802a19c { /* 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; 802a19a: 2401 movs r4, #1 else { xReturn = pdTRUE; } } taskEXIT_CRITICAL(); 802a19c: f000 fac4 bl 802a728 return xReturn; } 802a1a0: 4620 mov r0, r4 802a1a2: bd38 pop {r3, r4, r5, pc} 802a1a4: 20002a54 .word 0x20002a54 802a1a8: 20002984 .word 0x20002984 0802a1ac : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { xYieldPending = pdTRUE; 802a1ac: 4b01 ldr r3, [pc, #4] ; (802a1b4 ) 802a1ae: 2201 movs r2, #1 802a1b0: 601a str r2, [r3, #0] 802a1b2: 4770 bx lr 802a1b4: 20002a7c .word 0x20002a7c 0802a1b8 : BaseType_t xTaskGetSchedulerState( void ) { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 802a1b8: 4b05 ldr r3, [pc, #20] ; (802a1d0 ) 802a1ba: 681b ldr r3, [r3, #0] 802a1bc: b133 cbz r3, 802a1cc { xReturn = taskSCHEDULER_NOT_STARTED; } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802a1be: 4b05 ldr r3, [pc, #20] ; (802a1d4 ) 802a1c0: 6818 ldr r0, [r3, #0] { xReturn = taskSCHEDULER_RUNNING; 802a1c2: 2800 cmp r0, #0 802a1c4: bf0c ite eq 802a1c6: 2002 moveq r0, #2 802a1c8: 2000 movne r0, #0 802a1ca: 4770 bx lr { BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) { xReturn = taskSCHEDULER_NOT_STARTED; 802a1cc: 2001 movs r0, #1 xReturn = taskSCHEDULER_SUSPENDED; } } return xReturn; } 802a1ce: 4770 bx lr 802a1d0: 2000298c .word 0x2000298c 802a1d4: 20002a50 .word 0x20002a50 0802a1d8 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 802a1d8: 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 ) 802a1da: 4604 mov r4, r0 802a1dc: 2800 cmp r0, #0 802a1de: d040 beq.n 802a262 { if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) 802a1e0: 4a20 ldr r2, [pc, #128] ; (802a264 ) 802a1e2: 6ac3 ldr r3, [r0, #44] ; 0x2c 802a1e4: 6811 ldr r1, [r2, #0] 802a1e6: 6ac9 ldr r1, [r1, #44] ; 0x2c 802a1e8: 428b cmp r3, r1 802a1ea: d23a bcs.n 802a262 { /* 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 ) 802a1ec: 6981 ldr r1, [r0, #24] 802a1ee: 2900 cmp r1, #0 802a1f0: db04 blt.n 802a1fc { 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. */ 802a1f2: 6812 ldr r2, [r2, #0] 802a1f4: 6ad2 ldr r2, [r2, #44] ; 0x2c 802a1f6: f1c2 0205 rsb r2, r2, #5 802a1fa: 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 ) 802a1fc: 4e1a ldr r6, [pc, #104] ; (802a268 ) 802a1fe: 6962 ldr r2, [r4, #20] 802a200: 2714 movs r7, #20 802a202: fb07 6303 mla r3, r7, r3, r6 802a206: 429a cmp r2, r3 802a208: d127 bne.n 802a25a 802a20a: e01f b.n 802a24c { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802a20c: 6ae2 ldr r2, [r4, #44] ; 0x2c 802a20e: 4357 muls r7, r2 802a210: 59f3 ldr r3, [r6, r7] 802a212: b93b cbnz r3, 802a224 802a214: 4b15 ldr r3, [pc, #84] ; (802a26c ) 802a216: 2001 movs r0, #1 802a218: 6819 ldr r1, [r3, #0] 802a21a: fa00 f202 lsl.w r2, r0, r2 802a21e: ea21 0202 bic.w r2, r1, r2 802a222: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802a224: 4b0f ldr r3, [pc, #60] ; (802a264 ) prvAddTaskToReadyList( pxTCB ); 802a226: 4a11 ldr r2, [pc, #68] ; (802a26c ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802a228: 681b ldr r3, [r3, #0] prvAddTaskToReadyList( pxTCB ); 802a22a: 6810 ldr r0, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802a22c: 6adb ldr r3, [r3, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802a22e: 2101 movs r1, #1 802a230: fa01 f103 lsl.w r1, r1, r3 802a234: 4301 orrs r1, r0 802a236: 6011 str r1, [r2, #0] 802a238: 4a0b ldr r2, [pc, #44] ; (802a268 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802a23a: 62e3 str r3, [r4, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 802a23c: 2014 movs r0, #20 802a23e: fb00 2003 mla r0, r0, r3, r2 802a242: 4629 mov r1, r5 } else { mtCOVERAGE_TEST_MARKER(); } } 802a244: 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 ); 802a248: f7ff b828 b.w 802929c /* 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 ) 802a24c: 1d25 adds r5, r4, #4 802a24e: 4628 mov r0, r5 802a250: f7ff f848 bl 80292e4 802a254: 2800 cmp r0, #0 802a256: d0d9 beq.n 802a20c 802a258: e7e4 b.n 802a224 prvAddTaskToReadyList( pxTCB ); } else { /* Just inherit the priority. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 802a25a: 4b02 ldr r3, [pc, #8] ; (802a264 ) 802a25c: 681b ldr r3, [r3, #0] 802a25e: 6adb ldr r3, [r3, #44] ; 0x2c 802a260: 62e3 str r3, [r4, #44] ; 0x2c 802a262: bdf8 pop {r3, r4, r5, r6, r7, pc} 802a264: 20002a38 .word 0x20002a38 802a268: 200029c0 .word 0x200029c0 802a26c: 20002a78 .word 0x20002a78 0802a270 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 802a270: b538 push {r3, r4, r5, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) 802a272: 4604 mov r4, r0 802a274: b908 cbnz r0, 802a27a #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; 802a276: 2000 movs r0, #0 802a278: bd38 pop {r3, r4, r5, pc} if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); 802a27a: 6d03 ldr r3, [r0, #80] ; 0x50 802a27c: b913 cbnz r3, 802a284 802a27e: f000 fa1f bl 802a6c0 802a282: e7fe b.n 802a282 ( pxTCB->uxMutexesHeld )--; if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802a284: 6ac1 ldr r1, [r0, #44] ; 0x2c 802a286: 6cc2 ldr r2, [r0, #76] ; 0x4c BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802a288: 3b01 subs r3, #1 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802a28a: 4291 cmp r1, r2 BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 802a28c: 6503 str r3, [r0, #80] ; 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 802a28e: d0f2 beq.n 802a276 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 802a290: 2b00 cmp r3, #0 802a292: d1f0 bne.n 802a276 /* 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 ) 802a294: 1d05 adds r5, r0, #4 802a296: 4628 mov r0, r5 802a298: f7ff f824 bl 80292e4 802a29c: b968 cbnz r0, 802a2ba { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 802a29e: 6ae2 ldr r2, [r4, #44] ; 0x2c 802a2a0: 4910 ldr r1, [pc, #64] ; (802a2e4 ) 802a2a2: 2314 movs r3, #20 802a2a4: 4353 muls r3, r2 802a2a6: 58cb ldr r3, [r1, r3] 802a2a8: b93b cbnz r3, 802a2ba 802a2aa: 4b0f ldr r3, [pc, #60] ; (802a2e8 ) 802a2ac: 2001 movs r0, #1 802a2ae: 6819 ldr r1, [r3, #0] 802a2b0: fa00 f202 lsl.w r2, r0, r2 802a2b4: ea21 0202 bic.w r2, r1, r2 802a2b8: 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; 802a2ba: 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. */ 802a2bc: f1c3 0205 rsb r2, r3, #5 802a2c0: 61a2 str r2, [r4, #24] prvAddTaskToReadyList( pxTCB ); 802a2c2: 4a09 ldr r2, [pc, #36] ; (802a2e8 ) } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 802a2c4: 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 ); 802a2c6: 6811 ldr r1, [r2, #0] 802a2c8: 2401 movs r4, #1 802a2ca: fa04 f003 lsl.w r0, r4, r3 802a2ce: 4301 orrs r1, r0 802a2d0: 6011 str r1, [r2, #0] 802a2d2: 4a04 ldr r2, [pc, #16] ; (802a2e4 ) 802a2d4: 2014 movs r0, #20 802a2d6: fb00 2003 mla r0, r0, r3, r2 802a2da: 4629 mov r1, r5 802a2dc: f7fe ffde bl 802929c 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; 802a2e0: 4620 mov r0, r4 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802a2e2: bd38 pop {r3, r4, r5, pc} 802a2e4: 200029c0 .word 0x200029c0 802a2e8: 20002a78 .word 0x20002a78 0802a2ec : void *pvTaskIncrementMutexHeldCount( void ) { /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 802a2ec: 4b04 ldr r3, [pc, #16] ; (802a300 ) 802a2ee: 681a ldr r2, [r3, #0] 802a2f0: b11a cbz r2, 802a2fa { ( pxCurrentTCB->uxMutexesHeld )++; 802a2f2: 681a ldr r2, [r3, #0] 802a2f4: 6d11 ldr r1, [r2, #80] ; 0x50 802a2f6: 3101 adds r1, #1 802a2f8: 6511 str r1, [r2, #80] ; 0x50 } return pxCurrentTCB; 802a2fa: 6818 ldr r0, [r3, #0] } 802a2fc: 4770 bx lr 802a2fe: bf00 nop 802a300: 20002a38 .word 0x20002a38 0802a304 : pxOverflowTimerList = pxTemp; } /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 802a304: 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 ) 802a306: 4c0f ldr r4, [pc, #60] ; (802a344 ) 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(); 802a308: f000 f9e2 bl 802a6d0 { if( xTimerQueue == NULL ) 802a30c: 6825 ldr r5, [r4, #0] 802a30e: b9ad cbnz r5, 802a33c { vListInitialise( &xActiveTimerList1 ); 802a310: 4f0d ldr r7, [pc, #52] ; (802a348 ) vListInitialise( &xActiveTimerList2 ); 802a312: 4e0e ldr r6, [pc, #56] ; (802a34c ) initialised. */ taskENTER_CRITICAL(); { if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); 802a314: 4638 mov r0, r7 802a316: f7fe ffb3 bl 8029280 vListInitialise( &xActiveTimerList2 ); 802a31a: 4630 mov r0, r6 802a31c: f7fe ffb0 bl 8029280 pxCurrentTimerList = &xActiveTimerList1; 802a320: 4b0b ldr r3, [pc, #44] ; (802a350 ) 802a322: 601f str r7, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 802a324: 4b0b ldr r3, [pc, #44] ; (802a354 ) xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802a326: 200a movs r0, #10 802a328: 210c movs r1, #12 802a32a: 462a mov r2, r5 if( xTimerQueue == NULL ) { vListInitialise( &xActiveTimerList1 ); vListInitialise( &xActiveTimerList2 ); pxCurrentTimerList = &xActiveTimerList1; pxOverflowTimerList = &xActiveTimerList2; 802a32c: 601e str r6, [r3, #0] xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); 802a32e: f7ff f898 bl 8029462 802a332: 6020 str r0, [r4, #0] configASSERT( xTimerQueue ); 802a334: b910 cbnz r0, 802a33c 802a336: f000 f9c3 bl 802a6c0 802a33a: e7fe b.n 802a33a { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); } 802a33c: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802a340: f000 b9f2 b.w 802a728 802a344: 20002ab0 .word 0x20002ab0 802a348: 20002a84 .word 0x20002a84 802a34c: 20002a98 .word 0x20002a98 802a350: 20002a80 .word 0x20002a80 802a354: 20002ab4 .word 0x20002ab4 0802a358 : return xTimeNow; } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 802a358: b510 push {r4, lr} 802a35a: 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 ) 802a35c: 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 ); 802a35e: 6041 str r1, [r0, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802a360: 6120 str r0, [r4, #16] if( xNextExpiryTime <= xTimeNow ) 802a362: d805 bhi.n 802a370 { /* 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 ) 802a364: 6981 ldr r1, [r0, #24] 802a366: 1ad2 subs r2, r2, r3 802a368: 428a cmp r2, r1 802a36a: d20c bcs.n 802a386 processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 802a36c: 4b07 ldr r3, [pc, #28] ; (802a38c ) 802a36e: e004 b.n 802a37a } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 802a370: 429a cmp r2, r3 802a372: d201 bcs.n 802a378 802a374: 4299 cmp r1, r3 802a376: d206 bcs.n 802a386 its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802a378: 4b05 ldr r3, [pc, #20] ; (802a390 ) 802a37a: 6818 ldr r0, [r3, #0] 802a37c: 1d21 adds r1, r4, #4 802a37e: f7fe ff99 bl 80292b4 } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { BaseType_t xProcessTimerNow = pdFALSE; 802a382: 2000 movs r0, #0 802a384: 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; 802a386: 2001 movs r0, #1 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } } return xProcessTimerNow; } 802a388: bd10 pop {r4, pc} 802a38a: bf00 nop 802a38c: 20002ab4 .word 0x20002ab4 802a390: 20002a80 .word 0x20002a80 0802a394 : static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 802a394: 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(); 802a396: f7ff ffb5 bl 802a304 if( xTimerQueue != NULL ) 802a39a: 4b0b ldr r3, [pc, #44] ; (802a3c8 ) 802a39c: 681b ldr r3, [r3, #0] 802a39e: b913 cbnz r3, 802a3a6 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802a3a0: f000 f98e bl 802a6c0 802a3a4: e00d b.n 802a3c2 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); 802a3a6: 2302 movs r3, #2 802a3a8: 9300 str r3, [sp, #0] 802a3aa: 2300 movs r3, #0 802a3ac: 9301 str r3, [sp, #4] 802a3ae: 9302 str r3, [sp, #8] 802a3b0: 9303 str r3, [sp, #12] 802a3b2: 4806 ldr r0, [pc, #24] ; (802a3cc ) 802a3b4: 4906 ldr r1, [pc, #24] ; (802a3d0 ) 802a3b6: f44f 7280 mov.w r2, #256 ; 0x100 802a3ba: f7ff fad9 bl 8029970 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 802a3be: b908 cbnz r0, 802a3c4 802a3c0: e7ee b.n 802a3a0 802a3c2: e7fe b.n 802a3c2 return xReturn; } 802a3c4: b005 add sp, #20 802a3c6: bd00 pop {pc} 802a3c8: 20002ab0 .word 0x20002ab0 802a3cc: 0802a4cd .word 0x0802a4cd 802a3d0: 08036e8a .word 0x08036e8a 0802a3d4 : /*-----------------------------------------------------------*/ TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { 802a3d4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a3d8: 4680 mov r8, r0 802a3da: 4617 mov r7, r2 802a3dc: 461e mov r6, r3 Timer_t *pxNewTimer; /* Allocate the timer structure. */ if( xTimerPeriodInTicks == ( TickType_t ) 0U ) 802a3de: 460d mov r5, r1 802a3e0: b191 cbz r1, 802a408 { pxNewTimer = NULL; } else { pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_t ) ); 802a3e2: 202c movs r0, #44 ; 0x2c 802a3e4: f000 fa82 bl 802a8ec if( pxNewTimer != NULL ) 802a3e8: 4604 mov r4, r0 802a3ea: b180 cbz r0, 802a40e { /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); 802a3ec: f7ff ff8a bl 802a304 /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; pxNewTimer->uxAutoReload = uxAutoReload; pxNewTimer->pvTimerID = pvTimerID; pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802a3f0: 9b06 ldr r3, [sp, #24] /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; 802a3f2: f8c4 8000 str.w r8, [r4] pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; 802a3f6: 61a5 str r5, [r4, #24] pxNewTimer->uxAutoReload = uxAutoReload; 802a3f8: 61e7 str r7, [r4, #28] pxNewTimer->pvTimerID = pvTimerID; 802a3fa: 6226 str r6, [r4, #32] pxNewTimer->pxCallbackFunction = pxCallbackFunction; 802a3fc: 6263 str r3, [r4, #36] ; 0x24 vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); 802a3fe: 1d20 adds r0, r4, #4 802a400: f7fe ff49 bl 8029296 802a404: e003 b.n 802a40e 802a406: e7fe b.n 802a406 traceTIMER_CREATE_FAILED(); } } /* 0 is not a valid value for xTimerPeriodInTicks. */ configASSERT( ( xTimerPeriodInTicks > 0 ) ); 802a408: f000 f95a bl 802a6c0 802a40c: e7fb b.n 802a406 return ( TimerHandle_t ) pxNewTimer; } 802a40e: 4620 mov r0, r4 802a410: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802a414 : /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 802a414: 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 ) 802a416: 4c0f ldr r4, [pc, #60] ; (802a454 ) 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 ) { 802a418: 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 ) 802a41a: 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 ) { 802a41c: 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 ) 802a41e: b1b8 cbz r0, 802a450 /* 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 ) 802a420: 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; 802a422: 9101 str r1, [sp, #4] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 802a424: 9202 str r2, [sp, #8] xMessage.u.xTimerParameters.pxTimer = ( Timer_t * ) xTimer; 802a426: 9503 str r5, [sp, #12] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 802a428: dc0d bgt.n 802a446 { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 802a42a: f7ff fec5 bl 802a1b8 802a42e: 2802 cmp r0, #2 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802a430: a901 add r1, sp, #4 802a432: 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 ) 802a434: d102 bne.n 802a43c { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 802a436: 9a08 ldr r2, [sp, #32] 802a438: 2300 movs r3, #0 802a43a: e001 b.n 802a440 } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 802a43c: 2200 movs r2, #0 802a43e: 4613 mov r3, r2 802a440: f7ff f84c bl 80294dc 802a444: e004 b.n 802a450 } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 802a446: 461a mov r2, r3 802a448: a901 add r1, sp, #4 802a44a: 2300 movs r3, #0 802a44c: f7ff f90a bl 8029664 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 802a450: b005 add sp, #20 802a452: bd30 pop {r4, r5, pc} 802a454: 20002ab0 .word 0x20002ab0 0802a458 : } } /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 802a458: 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 ) 802a45c: 4e19 ldr r6, [pc, #100] ; (802a4c4 ) listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802a45e: f04f 0800 mov.w r8, #0 802a462: e023 b.n 802a4ac 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 ); 802a464: 68db ldr r3, [r3, #12] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); 802a466: 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 ); 802a468: 681d ldr r5, [r3, #0] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802a46a: 1d27 adds r7, r4, #4 802a46c: 4638 mov r0, r7 802a46e: f7fe ff39 bl 80292e4 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 ); 802a472: 6a63 ldr r3, [r4, #36] ; 0x24 802a474: 4620 mov r0, r4 802a476: 4798 blx r3 if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802a478: 69e3 ldr r3, [r4, #28] 802a47a: 2b01 cmp r3, #1 802a47c: d116 bne.n 802a4ac 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 ); 802a47e: 69a3 ldr r3, [r4, #24] 802a480: 18eb adds r3, r5, r3 if( xReloadTime > xNextExpireTime ) 802a482: 42ab cmp r3, r5 802a484: d906 bls.n 802a494 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 802a486: 6063 str r3, [r4, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 802a488: 6124 str r4, [r4, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 802a48a: 6830 ldr r0, [r6, #0] 802a48c: 4639 mov r1, r7 802a48e: f7fe ff11 bl 80292b4 802a492: e00b b.n 802a4ac } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 802a494: 2100 movs r1, #0 802a496: f8cd 8000 str.w r8, [sp] 802a49a: 4620 mov r0, r4 802a49c: 462a mov r2, r5 802a49e: 460b mov r3, r1 802a4a0: f7ff ffb8 bl 802a414 configASSERT( xResult ); 802a4a4: b910 cbnz r0, 802a4ac 802a4a6: f000 f90b bl 802a6c0 802a4aa: e7fe b.n 802a4aa /* 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 ) 802a4ac: 6833 ldr r3, [r6, #0] 802a4ae: 681a ldr r2, [r3, #0] 802a4b0: 2a00 cmp r2, #0 802a4b2: d1d7 bne.n 802a464 mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802a4b4: 4a04 ldr r2, [pc, #16] ; (802a4c8 ) 802a4b6: 4803 ldr r0, [pc, #12] ; (802a4c4 ) 802a4b8: 6811 ldr r1, [r2, #0] pxOverflowTimerList = pxTemp; 802a4ba: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; pxCurrentTimerList = pxOverflowTimerList; 802a4bc: 6001 str r1, [r0, #0] pxOverflowTimerList = pxTemp; } 802a4be: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 802a4c2: bf00 nop 802a4c4: 20002a80 .word 0x20002a80 802a4c8: 20002ab4 .word 0x20002ab4 0802a4cc : pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802a4cc: 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 ) 802a4d0: f8df 816c ldr.w r8, [pc, #364] ; 802a640 pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); } /*-----------------------------------------------------------*/ static void prvTimerTask( void *pvParameters ) { 802a4d4: b087 sub sp, #28 802a4d6: 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 ); 802a4d8: 4b57 ldr r3, [pc, #348] ; (802a638 ) 802a4da: 681b ldr r3, [r3, #0] 802a4dc: 681f ldr r7, [r3, #0] 802a4de: f1d7 0701 rsbs r7, r7, #1 802a4e2: bf38 it cc 802a4e4: 2700 movcc r7, #0 if( *pxListWasEmpty == pdFALSE ) 802a4e6: b917 cbnz r7, 802a4ee { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 802a4e8: 68db ldr r3, [r3, #12] 802a4ea: 681d ldr r5, [r3, #0] 802a4ec: e000 b.n 802a4f0 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 802a4ee: 2500 movs r5, #0 static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, const BaseType_t xListWasEmpty ) { TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 802a4f0: f7ff fb9e bl 8029c30 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(); 802a4f4: f7ff fba4 bl 8029c40 if( xTimeNow < xLastTime ) 802a4f8: f8d8 3000 ldr.w r3, [r8] 802a4fc: 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(); 802a4fe: 4606 mov r6, r0 if( xTimeNow < xLastTime ) 802a500: d203 bcs.n 802a50a { prvSwitchTimerLists(); 802a502: f7ff ffa9 bl 802a458 *pxTimerListsWereSwitched = pdTRUE; 802a506: 2301 movs r3, #1 802a508: e000 b.n 802a50c } else { *pxTimerListsWereSwitched = pdFALSE; 802a50a: 2300 movs r3, #0 } xLastTime = xTimeNow; 802a50c: 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 ) 802a510: 2b00 cmp r3, #0 802a512: d132 bne.n 802a57a { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 802a514: bb2f cbnz r7, 802a562 802a516: 42b5 cmp r5, r6 802a518: d823 bhi.n 802a562 { ( void ) xTaskResumeAll(); 802a51a: f7ff fc25 bl 8029d68 /*-----------------------------------------------------------*/ 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 ); 802a51e: 4b46 ldr r3, [pc, #280] ; (802a638 ) 802a520: 681b ldr r3, [r3, #0] 802a522: 68db ldr r3, [r3, #12] 802a524: 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 ) ); 802a526: 1d20 adds r0, r4, #4 802a528: f7fe fedc bl 80292e4 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 ) 802a52c: 69e3 ldr r3, [r4, #28] 802a52e: 2b01 cmp r3, #1 802a530: d113 bne.n 802a55a { /* 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 ) 802a532: 69a1 ldr r1, [r4, #24] 802a534: 4620 mov r0, r4 802a536: 1869 adds r1, r5, r1 802a538: 4632 mov r2, r6 802a53a: 462b mov r3, r5 802a53c: f7ff ff0c bl 802a358 802a540: 2801 cmp r0, #1 802a542: d10a bne.n 802a55a { /* 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 ); 802a544: 9700 str r7, [sp, #0] 802a546: 4620 mov r0, r4 802a548: 4639 mov r1, r7 802a54a: 462a mov r2, r5 802a54c: 463b mov r3, r7 802a54e: f7ff ff61 bl 802a414 configASSERT( xResult ); 802a552: b910 cbnz r0, 802a55a 802a554: f000 f8b4 bl 802a6c0 802a558: e7fe b.n 802a558 { mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802a55a: 6a63 ldr r3, [r4, #36] ; 0x24 802a55c: 4620 mov r0, r4 802a55e: 4798 blx r3 802a560: e05f b.n 802a622 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 ) ); 802a562: 4b36 ldr r3, [pc, #216] ; (802a63c ) 802a564: 1ba9 subs r1, r5, r6 802a566: 6818 ldr r0, [r3, #0] 802a568: f7ff f9aa bl 80298c0 if( xTaskResumeAll() == pdFALSE ) 802a56c: f7ff fbfc bl 8029d68 802a570: 2800 cmp r0, #0 802a572: d156 bne.n 802a622 { /* 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(); 802a574: f000 f898 bl 802a6a8 802a578: e053 b.n 802a622 } } } else { ( void ) xTaskResumeAll(); 802a57a: f7ff fbf5 bl 8029d68 802a57e: e050 b.n 802a622 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 802a580: 9b03 ldr r3, [sp, #12] 802a582: 2b00 cmp r3, #0 802a584: db4e blt.n 802a624 { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 802a586: 9c05 ldr r4, [sp, #20] if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) 802a588: 6963 ldr r3, [r4, #20] 802a58a: b113 cbz r3, 802a592 { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 802a58c: 1d20 adds r0, r4, #4 802a58e: f7fe fea9 bl 80292e4 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(); 802a592: f7ff fb55 bl 8029c40 if( xTimeNow < xLastTime ) 802a596: f8d8 3000 ldr.w r3, [r8] 802a59a: 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(); 802a59c: 4605 mov r5, r0 if( xTimeNow < xLastTime ) 802a59e: d201 bcs.n 802a5a4 { prvSwitchTimerLists(); 802a5a0: f7ff ff5a bl 802a458 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 ) 802a5a4: 9b03 ldr r3, [sp, #12] else { *pxTimerListsWereSwitched = pdFALSE; } xLastTime = xTimeNow; 802a5a6: 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 ) 802a5aa: 2b09 cmp r3, #9 802a5ac: d83a bhi.n 802a624 802a5ae: f04f 6204 mov.w r2, #138412032 ; 0x8400000 802a5b2: 409a lsls r2, r3 802a5b4: d424 bmi.n 802a600 802a5b6: f04f 4263 mov.w r2, #3808428032 ; 0xe3000000 802a5ba: 409a lsls r2, r3 802a5bc: d404 bmi.n 802a5c8 802a5be: f04f 6280 mov.w r2, #67108864 ; 0x4000000 802a5c2: 409a lsls r2, r3 802a5c4: d429 bmi.n 802a61a 802a5c6: e02d b.n 802a624 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 ) 802a5c8: 9b04 ldr r3, [sp, #16] 802a5ca: 69a1 ldr r1, [r4, #24] 802a5cc: 4620 mov r0, r4 802a5ce: 1859 adds r1, r3, r1 802a5d0: 462a mov r2, r5 802a5d2: f7ff fec1 bl 802a358 802a5d6: 2801 cmp r0, #1 802a5d8: d124 bne.n 802a624 { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 802a5da: 6a63 ldr r3, [r4, #36] ; 0x24 802a5dc: 4620 mov r0, r4 802a5de: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( pxTimer->uxAutoReload == ( UBaseType_t ) pdTRUE ) 802a5e0: 69e3 ldr r3, [r4, #28] 802a5e2: 2b01 cmp r3, #1 802a5e4: d11e bne.n 802a624 { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 802a5e6: 69a2 ldr r2, [r4, #24] 802a5e8: 9b04 ldr r3, [sp, #16] 802a5ea: 2100 movs r1, #0 802a5ec: 18d2 adds r2, r2, r3 802a5ee: 9100 str r1, [sp, #0] 802a5f0: 4620 mov r0, r4 802a5f2: 460b mov r3, r1 802a5f4: f7ff ff0e bl 802a414 configASSERT( xResult ); 802a5f8: b9a0 cbnz r0, 802a624 802a5fa: f000 f861 bl 802a6c0 802a5fe: e7fe b.n 802a5fe There is nothing to do here. */ break; case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 802a600: 9904 ldr r1, [sp, #16] 802a602: 61a1 str r1, [r4, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 802a604: b911 cbnz r1, 802a60c 802a606: f000 f85b bl 802a6c0 802a60a: e7fe b.n 802a60a 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 ); 802a60c: 4620 mov r0, r4 802a60e: 1869 adds r1, r5, r1 802a610: 462a mov r2, r5 802a612: 462b mov r3, r5 802a614: f7ff fea0 bl 802a358 802a618: e004 b.n 802a624 break; case tmrCOMMAND_DELETE : /* The timer has already been removed from the active list, just free up the memory. */ vPortFree( pxTimer ); 802a61a: 4620 mov r0, r4 802a61c: f000 f9ec bl 802a9f8 802a620: e000 b.n 802a624 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. */ 802a622: 4e06 ldr r6, [pc, #24] ; (802a63c ) 802a624: 2200 movs r2, #0 802a626: 6830 ldr r0, [r6, #0] 802a628: a903 add r1, sp, #12 802a62a: 4613 mov r3, r2 802a62c: f7ff f896 bl 802975c 802a630: 2800 cmp r0, #0 802a632: d1a5 bne.n 802a580 802a634: e750 b.n 802a4d8 802a636: bf00 nop 802a638: 20002a80 .word 0x20002a80 802a63c: 20002ab0 .word 0x20002ab0 802a640: 20002aac .word 0x20002aac 0802a644 : void *pvTimerGetTimerID( const TimerHandle_t xTimer ) { Timer_t * const pxTimer = ( Timer_t * ) xTimer; return pxTimer->pvTimerID; } 802a644: 6a00 ldr r0, [r0, #32] 802a646: 4770 bx lr 0802a648 : } /*-----------------------------------------------------------*/ static void prvPortStartFirstTask( void ) { __asm volatile( 802a648: 4806 ldr r0, [pc, #24] ; (802a664 ) 802a64a: 6800 ldr r0, [r0, #0] 802a64c: 6800 ldr r0, [r0, #0] 802a64e: f380 8808 msr MSP, r0 802a652: b662 cpsie i 802a654: b661 cpsie f 802a656: f3bf 8f4f dsb sy 802a65a: f3bf 8f6f isb sy 802a65e: df00 svc 0 802a660: bf00 nop 802a662: 0000 .short 0x0000 802a664: e000ed08 .word 0xe000ed08 0802a668 : 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 */ 802a668: f04f 7380 mov.w r3, #16777216 ; 0x1000000 pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ 802a66c: e900 000a stmdb r0, {r1, r3} pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 802a670: 4b03 ldr r3, [pc, #12] ; (802a680 ) pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 802a672: 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 */ 802a676: 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; } 802a67a: 3840 subs r0, #64 ; 0x40 802a67c: 4770 bx lr 802a67e: bf00 nop 802a680: 0802a705 .word 0x0802a705 0802a684 : } /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 802a684: 4b07 ldr r3, [pc, #28] ; (802a6a4 ) 802a686: 6819 ldr r1, [r3, #0] 802a688: 6808 ldr r0, [r1, #0] 802a68a: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802a68e: f380 8809 msr PSP, r0 802a692: f3bf 8f6f isb sy 802a696: f04f 0000 mov.w r0, #0 802a69a: f380 8811 msr BASEPRI, r0 802a69e: f04e 0e0d orr.w lr, lr, #13 802a6a2: 4770 bx lr 0802a6a4 : 802a6a4: 20002a38 .word 0x20002a38 0802a6a8 : /*-----------------------------------------------------------*/ void vPortYield( void ) { /* Set a PendSV to request a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802a6a8: 4b04 ldr r3, [pc, #16] ; (802a6bc ) 802a6aa: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802a6ae: 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" ); 802a6b0: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802a6b4: f3bf 8f6f isb sy 802a6b8: 4770 bx lr 802a6ba: bf00 nop 802a6bc: e000ed04 .word 0xe000ed04 0802a6c0 : } /*-----------------------------------------------------------*/ __attribute__(( naked )) uint32_t ulPortSetInterruptMask( void ) { __asm volatile \ 802a6c0: f3ef 8011 mrs r0, BASEPRI 802a6c4: f04f 0150 mov.w r1, #80 ; 0x50 802a6c8: f381 8811 msr BASEPRI, r1 802a6cc: 4770 bx lr ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return 0; } 802a6ce: 2000 movs r0, #0 0802a6d0 : __asm volatile( "isb" ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 802a6d0: b508 push {r3, lr} portDISABLE_INTERRUPTS(); 802a6d2: f7ff fff5 bl 802a6c0 uxCriticalNesting++; 802a6d6: 4a09 ldr r2, [pc, #36] ; (802a6fc ) 802a6d8: 6813 ldr r3, [r2, #0] 802a6da: 3301 adds r3, #1 802a6dc: 6013 str r3, [r2, #0] __asm volatile( "dsb" ); 802a6de: f3bf 8f4f dsb sy __asm volatile( "isb" ); 802a6e2: 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 ) 802a6e6: 2b01 cmp r3, #1 802a6e8: d107 bne.n 802a6fa { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 802a6ea: 4b05 ldr r3, [pc, #20] ; (802a700 ) 802a6ec: 681b ldr r3, [r3, #0] 802a6ee: f013 0fff tst.w r3, #255 ; 0xff 802a6f2: d002 beq.n 802a6fa 802a6f4: f7ff ffe4 bl 802a6c0 802a6f8: e7fe b.n 802a6f8 802a6fa: bd08 pop {r3, pc} 802a6fc: 200015e0 .word 0x200015e0 802a700: e000ed04 .word 0xe000ed04 0802a704 : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 802a704: 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 ); 802a706: 4b05 ldr r3, [pc, #20] ; (802a71c ) 802a708: 681b ldr r3, [r3, #0] 802a70a: 3301 adds r3, #1 802a70c: d002 beq.n 802a714 802a70e: f7ff ffd7 bl 802a6c0 802a712: e7fe b.n 802a712 portDISABLE_INTERRUPTS(); 802a714: f7ff ffd4 bl 802a6c0 802a718: e7fe b.n 802a718 802a71a: bf00 nop 802a71c: 200015e0 .word 0x200015e0 0802a720 : } /*-----------------------------------------------------------*/ __attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue ) { __asm volatile \ 802a720: f380 8811 msr BASEPRI, r0 802a724: 4770 bx lr 802a726: 0000 movs r0, r0 0802a728 : } } /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 802a728: b508 push {r3, lr} configASSERT( uxCriticalNesting ); 802a72a: 4b07 ldr r3, [pc, #28] ; (802a748 ) 802a72c: 6818 ldr r0, [r3, #0] 802a72e: b910 cbnz r0, 802a736 802a730: f7ff ffc6 bl 802a6c0 802a734: e7fe b.n 802a734 uxCriticalNesting--; 802a736: 3801 subs r0, #1 802a738: 6018 str r0, [r3, #0] if( uxCriticalNesting == 0 ) 802a73a: b918 cbnz r0, 802a744 { portENABLE_INTERRUPTS(); } } 802a73c: e8bd 4008 ldmia.w sp!, {r3, lr} { configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); 802a740: f7ff bfee b.w 802a720 802a744: bd08 pop {r3, pc} 802a746: bf00 nop 802a748: 200015e0 .word 0x200015e0 0802a74c : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 802a74c: f3ef 8009 mrs r0, PSP 802a750: f3bf 8f6f isb sy 802a754: 4b0d ldr r3, [pc, #52] ; (802a78c ) 802a756: 681a ldr r2, [r3, #0] 802a758: e920 0ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802a75c: 6010 str r0, [r2, #0] 802a75e: e92d 4008 stmdb sp!, {r3, lr} 802a762: f04f 0050 mov.w r0, #80 ; 0x50 802a766: f380 8811 msr BASEPRI, r0 802a76a: f7ff fc19 bl 8029fa0 802a76e: f04f 0000 mov.w r0, #0 802a772: f380 8811 msr BASEPRI, r0 802a776: e8bd 4008 ldmia.w sp!, {r3, lr} 802a77a: 6819 ldr r1, [r3, #0] 802a77c: 6808 ldr r0, [r1, #0] 802a77e: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 802a782: f380 8809 msr PSP, r0 802a786: f3bf 8f6f isb sy 802a78a: 4770 bx lr 0802a78c : 802a78c: 20002a38 .word 0x20002a38 0802a790 : ); } /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 802a790: 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(); 802a792: f7ff ff95 bl 802a6c0 { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 802a796: f7ff fa59 bl 8029c4c 802a79a: b118 cbz r0, 802a7a4 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 802a79c: 4b04 ldr r3, [pc, #16] ; (802a7b0 ) 802a79e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 802a7a2: 601a str r2, [r3, #0] } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 802a7a4: 2000 movs r0, #0 } 802a7a6: 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 ); 802a7aa: f7ff bfb9 b.w 802a720 802a7ae: bf00 nop 802a7b0: e000ed04 .word 0xe000ed04 0802a7b4 : 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; 802a7b4: 4b06 ldr r3, [pc, #24] ; (802a7d0 ) 802a7b6: 681a ldr r2, [r3, #0] 802a7b8: f44f 737a mov.w r3, #1000 ; 0x3e8 802a7bc: fbb2 f2f3 udiv r2, r2, r3 802a7c0: 4b04 ldr r3, [pc, #16] ; (802a7d4 ) 802a7c2: 3a01 subs r2, #1 802a7c4: 601a str r2, [r3, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 802a7c6: 2207 movs r2, #7 802a7c8: f843 2c04 str.w r2, [r3, #-4] 802a7cc: 4770 bx lr 802a7ce: bf00 nop 802a7d0: 200005bc .word 0x200005bc 802a7d4: e000e014 .word 0xe000e014 0802a7d8 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 802a7d8: 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; 802a7da: 4b1d ldr r3, [pc, #116] ; (802a850 ) 802a7dc: 781a ldrb r2, [r3, #0] 802a7de: 9201 str r2, [sp, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 802a7e0: 22ff movs r2, #255 ; 0xff 802a7e2: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 802a7e4: 781b ldrb r3, [r3, #0] 802a7e6: f88d 3003 strb.w r3, [sp, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 802a7ea: f89d 2003 ldrb.w r2, [sp, #3] 802a7ee: 4b19 ldr r3, [pc, #100] ; (802a854 ) 802a7f0: f002 0250 and.w r2, r2, #80 ; 0x50 802a7f4: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 802a7f6: 4a18 ldr r2, [pc, #96] ; (802a858 ) 802a7f8: 2307 movs r3, #7 802a7fa: 6013 str r3, [r2, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 802a7fc: e005 b.n 802a80a { ulMaxPRIGROUPValue--; ucMaxPriorityValue <<= ( uint8_t ) 0x01; 802a7fe: f89d 3003 ldrb.w r3, [sp, #3] 802a802: 005b lsls r3, r3, #1 802a804: f88d 3003 strb.w r3, [sp, #3] 802a808: 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 ) 802a80a: f89d 2003 ldrb.w r2, [sp, #3] 802a80e: 1e59 subs r1, r3, #1 802a810: 0612 lsls r2, r2, #24 802a812: d4f4 bmi.n 802a7fe } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802a814: 4a10 ldr r2, [pc, #64] ; (802a858 ) ucMaxPriorityValue <<= ( uint8_t ) 0x01; } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 802a816: 021b lsls r3, r3, #8 ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 802a818: f403 63e0 and.w r3, r3, #1792 ; 0x700 802a81c: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 802a81e: 4b0c ldr r3, [pc, #48] ; (802a850 ) 802a820: 9a01 ldr r2, [sp, #4] 802a822: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 802a824: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802a828: f442 0270 orr.w r2, r2, #15728640 ; 0xf00000 802a82c: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 802a830: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 802a834: f042 4270 orr.w r2, r2, #4026531840 ; 0xf0000000 802a838: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 802a83c: f7ff ffba bl 802a7b4 /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 802a840: 4b06 ldr r3, [pc, #24] ; (802a85c ) 802a842: 2200 movs r2, #0 802a844: 601a str r2, [r3, #0] /* Start the first task. */ prvPortStartFirstTask(); 802a846: f7ff feff bl 802a648 /* 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(); 802a84a: f7ff ff5b bl 802a704 802a84e: bf00 nop 802a850: e000e400 .word 0xe000e400 802a854: 20002ab8 .word 0x20002ab8 802a858: 20002abc .word 0x20002abc 802a85c: 200015e0 .word 0x200015e0 0802a860 : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 802a860: 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 ) ); 802a862: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 802a866: 2b0f cmp r3, #15 802a868: d908 bls.n 802a87c { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 802a86a: 4a0a ldr r2, [pc, #40] ; (802a894 ) 802a86c: 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 ); 802a86e: 4a0a ldr r2, [pc, #40] ; (802a898 ) 802a870: 7812 ldrb r2, [r2, #0] 802a872: 429a cmp r2, r3 802a874: d902 bls.n 802a87c 802a876: f7ff ff23 bl 802a6c0 802a87a: e7fe b.n 802a87a 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 ); 802a87c: 4b07 ldr r3, [pc, #28] ; (802a89c ) 802a87e: 681a ldr r2, [r3, #0] 802a880: 4b07 ldr r3, [pc, #28] ; (802a8a0 ) 802a882: 681b ldr r3, [r3, #0] 802a884: f402 62e0 and.w r2, r2, #1792 ; 0x700 802a888: 429a cmp r2, r3 802a88a: d902 bls.n 802a892 802a88c: f7ff ff18 bl 802a6c0 802a890: e7fe b.n 802a890 802a892: bd08 pop {r3, pc} 802a894: e000e3f0 .word 0xe000e3f0 802a898: 20002ab8 .word 0x20002ab8 802a89c: e000ed0c .word 0xe000ed0c 802a8a0: 20002abc .word 0x20002abc 0802a8a4 : xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 802a8a4: 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 ) 802a8a6: 4b0f ldr r3, [pc, #60] ; (802a8e4 ) 802a8a8: e000 b.n 802a8ac 802a8aa: 4613 mov r3, r2 802a8ac: 681a ldr r2, [r3, #0] 802a8ae: 4282 cmp r2, r0 802a8b0: d3fb bcc.n 802a8aa } /* 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 ) 802a8b2: 6859 ldr r1, [r3, #4] 802a8b4: 185c adds r4, r3, r1 802a8b6: 4284 cmp r4, r0 802a8b8: d103 bne.n 802a8c2 { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 802a8ba: 6840 ldr r0, [r0, #4] 802a8bc: 1841 adds r1, r0, r1 802a8be: 6059 str r1, [r3, #4] 802a8c0: 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 ) 802a8c2: 6841 ldr r1, [r0, #4] 802a8c4: 1844 adds r4, r0, r1 802a8c6: 4294 cmp r4, r2 802a8c8: d106 bne.n 802a8d8 { if( pxIterator->pxNextFreeBlock != pxEnd ) 802a8ca: 4c07 ldr r4, [pc, #28] ; (802a8e8 ) 802a8cc: 6824 ldr r4, [r4, #0] 802a8ce: 42a2 cmp r2, r4 802a8d0: d002 beq.n 802a8d8 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 802a8d2: 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; 802a8d4: 1861 adds r1, r4, r1 802a8d6: 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 ) 802a8d8: 4283 cmp r3, r0 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 802a8da: 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; 802a8dc: bf18 it ne 802a8de: 6018 strne r0, [r3, #0] 802a8e0: bd10 pop {r4, pc} 802a8e2: bf00 nop 802a8e4: 20002ac8 .word 0x20002ac8 802a8e8: 20002ac4 .word 0x20002ac4 0802a8ec : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 802a8ec: b5f8 push {r3, r4, r5, r6, r7, lr} 802a8ee: 4605 mov r5, r0 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; vTaskSuspendAll(); 802a8f0: f7ff f99e bl 8029c30 { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 802a8f4: 4b3a ldr r3, [pc, #232] ; (802a9e0 ) 802a8f6: 681b ldr r3, [r3, #0] 802a8f8: bb1b cbnz r3, 802a942 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; 802a8fa: 4a3a ldr r2, [pc, #232] ; (802a9e4 ) if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 802a8fc: 0756 lsls r6, r2, #29 802a8fe: d007 beq.n 802a910 { ulAddress += ( portBYTE_ALIGNMENT - 1 ); 802a900: 1dd3 adds r3, r2, #7 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802a902: f023 0307 bic.w r3, r3, #7 xTotalHeapSize -= ulAddress - ( uint32_t ) ucHeap; 802a906: f502 4270 add.w r2, r2, #61440 ; 0xf000 802a90a: 1ad1 subs r1, r2, r3 ulAddress = ( uint32_t ) ucHeap; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802a90c: 461a mov r2, r3 802a90e: e001 b.n 802a914 static void prvHeapInit( void ) { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 802a910: 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; 802a914: 1851 adds r1, r2, r1 ulAddress -= xHeapStructSize; 802a916: 3908 subs r1, #8 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 802a918: 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; 802a91c: 4832 ldr r0, [pc, #200] ; (802a9e8 ) xStart.xBlockSize = ( size_t ) 0; 802a91e: 2300 movs r3, #0 802a920: 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; 802a924: 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; 802a926: 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; 802a928: 1a8b subs r3, r1, r2 pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 802a92a: e882 000a stmia.w r2, {r1, r3} /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802a92e: 4a2f ldr r2, [pc, #188] ; (802a9ec ) /* 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; 802a930: 482b ldr r0, [pc, #172] ; (802a9e0 ) 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; 802a932: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802a934: 4a2e ldr r2, [pc, #184] ; (802a9f0 ) /* 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; 802a936: 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; 802a938: 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 ); 802a93a: 4b2e ldr r3, [pc, #184] ; (802a9f4 ) 802a93c: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 802a940: 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 ) 802a942: 4b2c ldr r3, [pc, #176] ; (802a9f4 ) 802a944: 681e ldr r6, [r3, #0] 802a946: 4235 tst r5, r6 802a948: d140 bne.n 802a9cc { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 802a94a: 2d00 cmp r5, #0 802a94c: d03f beq.n 802a9ce { xWantedSize += xHeapStructSize; 802a94e: 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 ) 802a952: 0758 lsls r0, r3, #29 { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 802a954: bf1c itt ne 802a956: f023 0307 bicne.w r3, r3, #7 802a95a: 3308 addne r3, #8 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 802a95c: 2b00 cmp r3, #0 802a95e: d033 beq.n 802a9c8 802a960: 4a23 ldr r2, [pc, #140] ; (802a9f0 ) 802a962: 6817 ldr r7, [r2, #0] 802a964: 42bb cmp r3, r7 802a966: d831 bhi.n 802a9cc { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; 802a968: 4a1f ldr r2, [pc, #124] ; (802a9e8 ) 802a96a: 6814 ldr r4, [r2, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802a96c: e001 b.n 802a972 802a96e: 4622 mov r2, r4 { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; 802a970: 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 ) ) 802a972: 6861 ldr r1, [r4, #4] 802a974: 4299 cmp r1, r3 802a976: d304 bcc.n 802a982 pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 802a978: 4819 ldr r0, [pc, #100] ; (802a9e0 ) 802a97a: 6800 ldr r0, [r0, #0] 802a97c: 4284 cmp r4, r0 802a97e: d104 bne.n 802a98a 802a980: e024 b.n 802a9cc { /* 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 ) ) 802a982: 6820 ldr r0, [r4, #0] 802a984: 2800 cmp r0, #0 802a986: d1f2 bne.n 802a96e 802a988: e7f6 b.n 802a978 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; 802a98a: 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 ); 802a98c: 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; 802a98e: 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 ) 802a990: 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 ); 802a992: 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 ) 802a994: 2a10 cmp r2, #16 802a996: d909 bls.n 802a9ac { /* 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 ); 802a998: 18e0 adds r0, r4, r3 configASSERT( ( ( ( uint32_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802a99a: 0741 lsls r1, r0, #29 802a99c: d002 beq.n 802a9a4 802a99e: f7ff fe8f bl 802a6c0 802a9a2: e7fe b.n 802a9a2 /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 802a9a4: 6042 str r2, [r0, #4] pxBlock->xBlockSize = xWantedSize; 802a9a6: 6063 str r3, [r4, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); 802a9a8: f7ff ff7c bl 802a8a4 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 802a9ac: 6862 ldr r2, [r4, #4] 802a9ae: 4910 ldr r1, [pc, #64] ; (802a9f0 ) 802a9b0: 1abb subs r3, r7, r2 802a9b2: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 802a9b4: 490d ldr r1, [pc, #52] ; (802a9ec ) 802a9b6: 6808 ldr r0, [r1, #0] 802a9b8: 4283 cmp r3, r0 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 802a9ba: bf38 it cc 802a9bc: 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; 802a9be: 4316 orrs r6, r2 pxBlock->pxNextFreeBlock = NULL; 802a9c0: 2300 movs r3, #0 802a9c2: e884 0048 stmia.w r4, {r3, r6} 802a9c6: e002 b.n 802a9ce /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 802a9c8: 461d mov r5, r3 802a9ca: e000 b.n 802a9ce 802a9cc: 2500 movs r5, #0 mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 802a9ce: f7ff f9cb bl 8029d68 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( uint32_t ) pvReturn ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 802a9d2: 076b lsls r3, r5, #29 802a9d4: d002 beq.n 802a9dc 802a9d6: f7ff fe73 bl 802a6c0 802a9da: e7fe b.n 802a9da return pvReturn; } 802a9dc: 4628 mov r0, r5 802a9de: bdf8 pop {r3, r4, r5, r6, r7, pc} 802a9e0: 20002ac4 .word 0x20002ac4 802a9e4: 10000000 .word 0x10000000 802a9e8: 20002ac8 .word 0x20002ac8 802a9ec: 20002ad0 .word 0x20002ad0 802a9f0: 20002ac0 .word 0x20002ac0 802a9f4: 20002ad4 .word 0x20002ad4 0802a9f8 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 802a9f8: b510 push {r4, lr} uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) 802a9fa: 4604 mov r4, r0 802a9fc: b310 cbz r0, 802aa44 /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 802a9fe: 4a12 ldr r2, [pc, #72] ; (802aa48 ) 802aa00: f850 3c04 ldr.w r3, [r0, #-4] 802aa04: 6812 ldr r2, [r2, #0] 802aa06: 421a tst r2, r3 802aa08: d102 bne.n 802aa10 802aa0a: f7ff fe59 bl 802a6c0 802aa0e: e7fe b.n 802aa0e configASSERT( pxLink->pxNextFreeBlock == NULL ); 802aa10: f850 1c08 ldr.w r1, [r0, #-8] 802aa14: b111 cbz r1, 802aa1c 802aa16: f7ff fe53 bl 802a6c0 802aa1a: e7fe b.n 802aa1a { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 802aa1c: ea23 0302 bic.w r3, r3, r2 802aa20: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 802aa24: f7ff f904 bl 8029c30 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802aa28: 4b08 ldr r3, [pc, #32] ; (802aa4c ) 802aa2a: f854 1c04 ldr.w r1, [r4, #-4] 802aa2e: 681a ldr r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802aa30: f1a4 0008 sub.w r0, r4, #8 pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 802aa34: 188a adds r2, r1, r2 802aa36: 601a str r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802aa38: f7ff ff34 bl 802a8a4 else { mtCOVERAGE_TEST_MARKER(); } } } 802aa3c: 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(); 802aa40: f7ff b992 b.w 8029d68 802aa44: bd10 pop {r4, pc} 802aa46: bf00 nop 802aa48: 20002ad4 .word 0x20002ad4 802aa4c: 20002ac0 .word 0x20002ac0 0802aa50 : /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { xTimerStart(users[user_id].LogoutTimer, 0); 802aa50: 4b07 ldr r3, [pc, #28] ; (802aa70 ) 802aa52: 2214 movs r2, #20 /** * @brief Обновление времени последней активности пользователя */ static void HTTP_UpdateUserLoginTime(uint8_t user_id) { 802aa54: b513 push {r0, r1, r4, lr} xTimerStart(users[user_id].LogoutTimer, 0); 802aa56: fb02 3000 mla r0, r2, r0, r3 802aa5a: 6904 ldr r4, [r0, #16] 802aa5c: f7ff f8f0 bl 8029c40 802aa60: 2300 movs r3, #0 802aa62: 4602 mov r2, r0 802aa64: 9300 str r3, [sp, #0] 802aa66: 4620 mov r0, r4 802aa68: 2101 movs r1, #1 802aa6a: f7ff fcd3 bl 802a414 } 802aa6e: bd1c pop {r2, r3, r4, pc} 802aa70: 2000fbfc .word 0x2000fbfc 0802aa74 : * @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) { 802aa74: 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) 802aa76: 4c09 ldr r4, [pc, #36] ; (802aa9c ) * @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) { 802aa78: 4606 mov r6, r0 802aa7a: 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)) 802aa7c: 4630 mov r0, r6 802aa7e: 6861 ldr r1, [r4, #4] 802aa80: f7f7 f8aa bl 8021bd8 802aa84: b928 cbnz r0, 802aa92 { file->data = f->data; 802aa86: 68a3 ldr r3, [r4, #8] 802aa88: 602b str r3, [r5, #0] file->len = f->len; 802aa8a: 68e3 ldr r3, [r4, #12] return 1; 802aa8c: 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; 802aa8e: 606b str r3, [r5, #4] return 1; 802aa90: 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) 802aa92: 6824 ldr r4, [r4, #0] 802aa94: 2c00 cmp r4, #0 802aa96: d1f1 bne.n 802aa7c file->data = f->data; file->len = f->len; return 1; } } return 0; 802aa98: 4620 mov r0, r4 } 802aa9a: bd70 pop {r4, r5, r6, pc} 802aa9c: 0803e24c .word 0x0803e24c 0802aaa0 : * @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) { 802aaa0: 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)); 802aaa2: 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) { 802aaa4: 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)); 802aaa6: f002 fe3b bl 802d720 if (hs == NULL) 802aaaa: 4601 mov r1, r0 802aaac: b1a0 cbz r0, 802aad8 { return ERR_MEM; } /* Initialize the structure. */ hs->file = NULL; 802aaae: 2500 movs r5, #0 802aab0: 6005 str r5, [r0, #0] hs->left = 0; 802aab2: 6045 str r5, [r0, #4] /* Tell TCP that this is the structure we wish to be passed for our callbacks. */ tcp_arg(pcb, hs); 802aab4: 4620 mov r0, r4 802aab6: f003 faa1 bl 802dffc /* Tell TCP that we wish to be informed of incoming data by a call to the http_recv() function. */ tcp_recv(pcb, http_recv); 802aaba: 4620 mov r0, r4 802aabc: 4908 ldr r1, [pc, #32] ; (802aae0 ) 802aabe: f003 fa9f bl 802e000 tcp_err(pcb, conn_err); 802aac2: 4620 mov r0, r4 802aac4: 4907 ldr r1, [pc, #28] ; (802aae4 ) 802aac6: f003 fa9f bl 802e008 tcp_poll(pcb, http_poll, 10); 802aaca: 4620 mov r0, r4 802aacc: 4906 ldr r1, [pc, #24] ; (802aae8 ) 802aace: 220a movs r2, #10 802aad0: f003 fa9f bl 802e012 return ERR_OK; 802aad4: 4628 mov r0, r5 802aad6: e000 b.n 802aada /* 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; 802aad8: 20ff movs r0, #255 ; 0xff tcp_err(pcb, conn_err); tcp_poll(pcb, http_poll, 10); return ERR_OK; } 802aada: b240 sxtb r0, r0 802aadc: bd38 pop {r3, r4, r5, pc} 802aade: bf00 nop 802aae0: 0802b7e1 .word 0x0802b7e1 802aae4: 0802ab2f .word 0x0802ab2f 802aae8: 0802ab17 .word 0x0802ab17 0802aaec : * @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) { 802aaec: 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) 802aaee: 684b ldr r3, [r1, #4] 802aaf0: f8b0 5066 ldrh.w r5, [r0, #102] ; 0x66 802aaf4: 429d cmp r5, r3 { len = tcp_sndbuf(pcb); } else { len = hs->left; 802aaf6: bf28 it cs 802aaf8: 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) { 802aafa: 460c mov r4, r1 } else { len = hs->left; } err = tcp_write(pcb, hs->file, len, 0); 802aafc: 462a mov r2, r5 802aafe: 6809 ldr r1, [r1, #0] 802ab00: 2300 movs r3, #0 802ab02: f004 fde0 bl 802f6c6 if (err == ERR_OK) 802ab06: b928 cbnz r0, 802ab14 { hs->file += len; 802ab08: 6823 ldr r3, [r4, #0] 802ab0a: 195b adds r3, r3, r5 802ab0c: 6023 str r3, [r4, #0] hs->left -= len; 802ab0e: 6863 ldr r3, [r4, #4] 802ab10: 1b5d subs r5, r3, r5 802ab12: 6065 str r5, [r4, #4] 802ab14: bd38 pop {r3, r4, r5, pc} 0802ab16 : * @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) { 802ab16: b508 push {r3, lr} if (arg == NULL) 802ab18: 4603 mov r3, r0 { tcp_close(pcb); 802ab1a: 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) 802ab1c: b913 cbnz r3, 802ab24 { tcp_close(pcb); 802ab1e: f003 fd0b bl 802e538 802ab22: e002 b.n 802ab2a } else { send_data(pcb, (struct http_state *)arg); 802ab24: 4619 mov r1, r3 802ab26: f7ff ffe1 bl 802aaec } return ERR_OK; } 802ab2a: 2000 movs r0, #0 802ab2c: bd08 pop {r3, pc} 0802ab2e : static void conn_err(void *arg, err_t err) { struct http_state *hs; hs = arg; mem_free(hs); 802ab2e: f002 bd2f b.w 802d590 0802ab32 : * @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) { 802ab32: b538 push {r3, r4, r5, lr} 802ab34: 4604 mov r4, r0 802ab36: 460d mov r5, r1 tcp_arg(pcb, NULL); 802ab38: 2100 movs r1, #0 802ab3a: f003 fa5f bl 802dffc tcp_sent(pcb, NULL); 802ab3e: 4620 mov r0, r4 802ab40: 2100 movs r1, #0 802ab42: f003 fa5f bl 802e004 tcp_recv(pcb, NULL); 802ab46: 4620 mov r0, r4 802ab48: 2100 movs r1, #0 802ab4a: f003 fa59 bl 802e000 mem_free(hs); 802ab4e: 4628 mov r0, r5 802ab50: f002 fd1e bl 802d590 tcp_close(pcb); 802ab54: 4620 mov r0, r4 } 802ab56: 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); 802ab5a: f003 bced b.w 802e538 0802ab5e : * @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) { 802ab5e: b508 push {r3, lr} 802ab60: 4603 mov r3, r0 802ab62: 4608 mov r0, r1 struct http_state *hs; hs = arg; if (hs->left > 0) 802ab64: 685a ldr r2, [r3, #4] { send_data(pcb, hs); 802ab66: 4619 mov r1, r3 { struct http_state *hs; hs = arg; if (hs->left > 0) 802ab68: b112 cbz r2, 802ab70 { send_data(pcb, hs); 802ab6a: f7ff ffbf bl 802aaec 802ab6e: e001 b.n 802ab74 } else { close_conn(pcb, hs); 802ab70: f7ff ffdf bl 802ab32 } return ERR_OK; } 802ab74: 2000 movs r0, #0 802ab76: bd08 pop {r3, pc} 0802ab78 : } /** * @brief >Callback таймера логаута пользователя */ void LogoutTimerCallback(TimerHandle_t pxTimer) { 802ab78: b51f push {r0, r1, r2, r3, r4, lr} uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); 802ab7a: f7ff fd63 bl 802a644 802ab7e: 4604 mov r4, r0 static void HTTP_ForceUserLogout(uint8_t user_id) { char cookie[MAX_WEB_COOKIE_LEN]; /* Flush user cookie by random value */ sprintf(cookie, "%X", (unsigned int)GetRandomNumber()); 802ab80: f7fb faa4 bl 80260cc 802ab84: 4906 ldr r1, [pc, #24] ; (802aba0 ) 802ab86: 4602 mov r2, r0 802ab88: 4668 mov r0, sp 802ab8a: f7fc fe09 bl 80277a0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802ab8e: 4b05 ldr r3, [pc, #20] ; (802aba4 ) 802ab90: b2e0 uxtb r0, r4 802ab92: 2214 movs r2, #20 802ab94: fb00 3002 mla r0, r0, r2, r3 802ab98: 4669 mov r1, sp 802ab9a: f7f7 f90b bl 8021db4 */ void LogoutTimerCallback(TimerHandle_t pxTimer) { uint8_t user_id = (uint8_t)pvTimerGetTimerID( pxTimer ); HTTP_ForceUserLogout(user_id); } 802ab9e: bd1f pop {r0, r1, r2, r3, r4, pc} 802aba0: 0803b0c8 .word 0x0803b0c8 802aba4: 2000fbfc .word 0x2000fbfc 0802aba8 : * @brief Initialize the HTTP server (start its thread) * @param none * @retval None */ void HTTP_Init() { 802aba8: b5f0 push {r4, r5, r6, r7, lr} 802abaa: b087 sub sp, #28 char buf[MAX_WEB_COOKIE_LEN]; uint8_t user_id; //sys_thread_new("HTTP", http_server_netconn_thread, NULL, 3000, 2); struct tcp_pcb *pcb; /*create new pcb*/ pcb = tcp_new(); 802abac: f003 fdf2 bl 802e794 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802abb0: 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(); 802abb2: 4604 mov r4, r0 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802abb4: 4913 ldr r1, [pc, #76] ; (802ac04 ) /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802abb6: 4f14 ldr r7, [pc, #80] ; (802ac08 ) sprintf(buf, "%X", (unsigned int)GetRandomNumber()); HTTP_SetUserCookie(buf, user_id); /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); 802abb8: 4e14 ldr r6, [pc, #80] ; (802ac0c ) //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); 802abba: f003 f94d bl 802de58 /* start listening on port 80 */ pcb = tcp_listen(pcb); 802abbe: 4620 mov r0, r4 802abc0: 21ff movs r1, #255 ; 0xff 802abc2: f003 f981 bl 802dec8 /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 802abc6: 4912 ldr r1, [pc, #72] ; (802ac10 ) 802abc8: f003 fa21 bl 802e00e 802abcc: 2400 movs r4, #0 for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802abce: f7fb fa7d bl 80260cc /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802abd2: 2514 movs r5, #20 pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802abd4: 4602 mov r2, r0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802abd6: fb05 7504 mla r5, r5, r4, r7 pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); 802abda: 490e ldr r1, [pc, #56] ; (802ac14 ) 802abdc: a802 add r0, sp, #8 802abde: f7fc fddf bl 80277a0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802abe2: a902 add r1, sp, #8 802abe4: 4628 mov r0, r5 802abe6: f7f7 f8e5 bl 8021db4 sprintf(buf, "%X", (unsigned int)GetRandomNumber()); HTTP_SetUserCookie(buf, user_id); /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); 802abea: 2200 movs r2, #0 802abec: 4623 mov r3, r4 802abee: 9600 str r6, [sp, #0] 802abf0: 4809 ldr r0, [pc, #36] ; (802ac18 ) 802abf2: 490a ldr r1, [pc, #40] ; (802ac1c ) 802abf4: f7ff fbee bl 802a3d4 802abf8: 3401 adds r4, #1 tcp_bind(pcb, IP_ADDR_ANY, 80); /* start listening on port 80 */ pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802abfa: 2c02 cmp r4, #2 /* Flush user cookie by random value */ sprintf(buf, "%X", (unsigned int)GetRandomNumber()); HTTP_SetUserCookie(buf, user_id); /* Create user logout timers */ users[user_id].LogoutTimer = 802abfc: 6128 str r0, [r5, #16] tcp_bind(pcb, IP_ADDR_ANY, 80); /* start listening on port 80 */ pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802abfe: d1e6 bne.n 802abce /* Create user logout timers */ users[user_id].LogoutTimer = xTimerCreate("LogoutTmr", WEB_LOGOUT_TIME, pdFALSE, ( void * ) user_id, LogoutTimerCallback); } } 802ac00: b007 add sp, #28 802ac02: bdf0 pop {r4, r5, r6, r7, pc} 802ac04: 080413b4 .word 0x080413b4 802ac08: 2000fbfc .word 0x2000fbfc 802ac0c: 0802ab79 .word 0x0802ab79 802ac10: 0802aaa1 .word 0x0802aaa1 802ac14: 0803b0c8 .word 0x0803b0c8 802ac18: 0803b0cb .word 0x0803b0cb 802ac1c: 001b7740 .word 0x001b7740 0802ac20 : /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ac20: b570 push {r4, r5, r6, lr} 802ac22: b08a sub sp, #40 ; 0x28 802ac24: 4606 mov r6, r0 802ac26: 460c mov r4, r1 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802ac28: 2214 movs r2, #20 802ac2a: 2100 movs r1, #0 802ac2c: 4668 mov r0, sp /** * @brief Запуск/останов теста UPS */ void HTTP_UPSTest(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ac2e: 461d mov r5, r3 char *valueLen = 0; char tempValue[20]; char tempValue2[20]; int8_t res = 0; memset(tempValue, 0, 20); 802ac30: f7f6 ff46 bl 8021ac0 memset(tempValue2, 0, 20); 802ac34: 2214 movs r2, #20 802ac36: 2100 movs r1, #0 802ac38: a805 add r0, sp, #20 802ac3a: f7f6 ff41 bl 8021ac0 strcpy(bufOut, HTTP_200_OK); 802ac3e: 492e ldr r1, [pc, #184] ; (802acf8 ) 802ac40: 4620 mov r0, r4 802ac42: f7f7 f8b7 bl 8021db4 value = strstr(bufIn, "func"); 802ac46: 4630 mov r0, r6 802ac48: 492c ldr r1, [pc, #176] ; (802acfc ) 802ac4a: f7f7 fb91 bl 8022370 valueLen = strpbrk(value, ":"); 802ac4e: 492c ldr r1, [pc, #176] ; (802ad00 ) 802ac50: f7f7 f9f8 bl 8022044 802ac54: 4606 mov r6, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802ac56: f7f7 f90b bl 8021e70 802ac5a: 1c71 adds r1, r6, #1 802ac5c: 1e82 subs r2, r0, #2 802ac5e: 4668 mov r0, sp 802ac60: f7f7 f9be bl 8021fe0 if (strcmp(tempValue, "\"stop\"") == 0){ 802ac64: 4668 mov r0, sp 802ac66: 4927 ldr r1, [pc, #156] ; (802ad04 ) 802ac68: f7f6 ffb6 bl 8021bd8 802ac6c: b978 cbnz r0, 802ac8e res = ups_metac_service_pdu(ups_cancel_test); 802ac6e: 2008 movs r0, #8 802ac70: f7fe f85e bl 8028d30 802ac74: b2c6 uxtb r6, r0 if(res == 1 || res == 0) 802ac76: 2e01 cmp r6, #1 802ac78: d803 bhi.n 802ac82 strcat(bufOut, "Тест остановлен!"); 802ac7a: 4620 mov r0, r4 802ac7c: 4922 ldr r1, [pc, #136] ; (802ad08 ) 802ac7e: f7f6 ff85 bl 8021b8c if(res == -1) 802ac82: b276 sxtb r6, r6 802ac84: 1c72 adds r2, r6, #1 802ac86: d131 bne.n 802acec strcat(bufOut, "Тест не удалось остановить!"); 802ac88: 4620 mov r0, r4 802ac8a: 4920 ldr r1, [pc, #128] ; (802ad0c ) 802ac8c: e02c b.n 802ace8 *lenBufOut = strlen(bufOut); } else if (strcmp(tempValue, "\"discharge\"") == 0){ 802ac8e: 4668 mov r0, sp 802ac90: 491f ldr r1, [pc, #124] ; (802ad10 ) 802ac92: f7f6 ffa1 bl 8021bd8 802ac96: b908 cbnz r0, 802ac9c res = ups_metac_service_pdu(ups_test_low_bat); 802ac98: 2002 movs r0, #2 802ac9a: e017 b.n 802accc strcat(bufOut, "Тест запущен!"); if(res == -1) strcat(bufOut, "Тест не удалось запустить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"time\"", 6) == 0){ 802ac9c: 4668 mov r0, sp 802ac9e: 491d ldr r1, [pc, #116] ; (802ad14 ) 802aca0: 2206 movs r2, #6 802aca2: f7f7 f947 bl 8021f34 802aca6: bb28 cbnz r0, 802acf4 valueLen = strpbrk(tempValue, ":"); 802aca8: 4915 ldr r1, [pc, #84] ; (802ad00 ) 802acaa: 4668 mov r0, sp 802acac: f7f7 f9ca bl 8022044 802acb0: 4606 mov r6, r0 strncpy(tempValue2, (valueLen+2), (strlen(valueLen)-2)); 802acb2: f7f7 f8dd bl 8021e70 802acb6: 1cb1 adds r1, r6, #2 802acb8: 1e82 subs r2, r0, #2 802acba: a805 add r0, sp, #20 802acbc: f7f7 f990 bl 8021fe0 TimeParam = atoi(tempValue2); 802acc0: a805 add r0, sp, #20 802acc2: f7f6 fddd bl 8021880 802acc6: 4b14 ldr r3, [pc, #80] ; (802ad18 ) 802acc8: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_test_time); 802acca: 2003 movs r0, #3 802accc: f7fe f830 bl 8028d30 802acd0: b2c6 uxtb r6, r0 if(res == 1 || res == 0) 802acd2: 2e01 cmp r6, #1 802acd4: d803 bhi.n 802acde strcat(bufOut, "Тест запущен!"); 802acd6: 4620 mov r0, r4 802acd8: 4910 ldr r1, [pc, #64] ; (802ad1c ) 802acda: f7f6 ff57 bl 8021b8c if(res == -1) 802acde: b276 sxtb r6, r6 802ace0: 1c73 adds r3, r6, #1 802ace2: d103 bne.n 802acec strcat(bufOut, "Тест не удалось запустить!"); 802ace4: 490e ldr r1, [pc, #56] ; (802ad20 ) 802ace6: 4620 mov r0, r4 802ace8: f7f6 ff50 bl 8021b8c *lenBufOut = strlen(bufOut); 802acec: 4620 mov r0, r4 802acee: f7f7 f8bf bl 8021e70 802acf2: 8028 strh r0, [r5, #0] } } 802acf4: b00a add sp, #40 ; 0x28 802acf6: bd70 pop {r4, r5, r6, pc} 802acf8: 0803e20d .word 0x0803e20d 802acfc: 0803b0d5 .word 0x0803b0d5 802ad00: 0804123b .word 0x0804123b 802ad04: 0803b0da .word 0x0803b0da 802ad08: 0803b0e1 .word 0x0803b0e1 802ad0c: 0803b100 .word 0x0803b100 802ad10: 0803b133 .word 0x0803b133 802ad14: 0803b189 .word 0x0803b189 802ad18: 2000296c .word 0x2000296c 802ad1c: 0803b13f .word 0x0803b13f 802ad20: 0803b158 .word 0x0803b158 0802ad24 : /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ad24: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ad28: b09a sub sp, #104 ; 0x68 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802ad2a: 2232 movs r2, #50 ; 0x32 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ad2c: 4605 mov r5, r0 802ad2e: 460c mov r4, r1 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802ad30: 4668 mov r0, sp 802ad32: 2100 movs r1, #0 /** * @brief Выклюение UPS */ void HTTP_UPSshutdown(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ad34: 461e mov r6, r3 char *valueLenEnd = 0; char tempValue[50]; char tempValue2[50]; int8_t res = 0; memset(tempValue, 0, 50); 802ad36: f7f6 fec3 bl 8021ac0 strcpy(bufOut, HTTP_200_OK); 802ad3a: 4940 ldr r1, [pc, #256] ; (802ae3c ) 802ad3c: 4620 mov r0, r4 802ad3e: f7f7 f839 bl 8021db4 value = strstr(bufIn, "func"); 802ad42: 4628 mov r0, r5 802ad44: 493e ldr r1, [pc, #248] ; (802ae40 ) 802ad46: f7f7 fb13 bl 8022370 valueLen = strpbrk(value, ":"); 802ad4a: 493e ldr r1, [pc, #248] ; (802ae44 ) 802ad4c: f7f7 f97a bl 8022044 802ad50: 4605 mov r5, r0 strncpy(tempValue, (valueLen+1), (strlen(valueLen)-2)); 802ad52: f7f7 f88d bl 8021e70 802ad56: 1c69 adds r1, r5, #1 802ad58: 1e82 subs r2, r0, #2 802ad5a: 4668 mov r0, sp 802ad5c: f7f7 f940 bl 8021fe0 if (strcmp(tempValue, "\"cancel\"") == 0){ 802ad60: 4668 mov r0, sp 802ad62: 4939 ldr r1, [pc, #228] ; (802ae48 ) 802ad64: f7f6 ff38 bl 8021bd8 802ad68: b978 cbnz r0, 802ad8a res = ups_metac_service_pdu(ups_cancel_shut_down); 802ad6a: 2007 movs r0, #7 802ad6c: f7fd ffe0 bl 8028d30 802ad70: b2c5 uxtb r5, r0 if(res == 1 || res == 0) 802ad72: 2d01 cmp r5, #1 802ad74: d803 bhi.n 802ad7e strcat(bufOut, "Выключение ИБП отменено!"); 802ad76: 4620 mov r0, r4 802ad78: 4934 ldr r1, [pc, #208] ; (802ae4c ) 802ad7a: f7f6 ff07 bl 8021b8c if(res == -1) 802ad7e: b26d sxtb r5, r5 802ad80: 1c68 adds r0, r5, #1 802ad82: d154 bne.n 802ae2e strcat(bufOut, "Выключение ИБП не удалось отменить!"); 802ad84: 4620 mov r0, r4 802ad86: 4932 ldr r1, [pc, #200] ; (802ae50 ) 802ad88: e04f b.n 802ae2a *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ 802ad8a: 4668 mov r0, sp 802ad8c: 4931 ldr r1, [pc, #196] ; (802ae54 ) 802ad8e: 2205 movs r2, #5 802ad90: f7f7 f8d0 bl 8021f34 802ad94: 4605 mov r5, r0 802ad96: 2800 cmp r0, #0 802ad98: d14d bne.n 802ae36 value = strstr(tempValue, "after"); 802ad9a: 492f ldr r1, [pc, #188] ; (802ae58 ) 802ad9c: 4668 mov r0, sp 802ad9e: f7f7 fae7 bl 8022370 valueLen = strpbrk(value, ":"); 802ada2: 4928 ldr r1, [pc, #160] ; (802ae44 ) if(res == -1) strcat(bufOut, "Выключение ИБП не удалось отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); 802ada4: 4680 mov r8, r0 valueLen = strpbrk(value, ":"); 802ada6: f7f7 f94d bl 8022044 valueLenEnd = strpbrk(value, ","); 802adaa: 492c ldr r1, [pc, #176] ; (802ae5c ) strcat(bufOut, "Выключение ИБП не удалось отменить!"); *lenBufOut = strlen(bufOut); } else if (strncmp(tempValue, "\"off\"", 5) == 0){ value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); 802adac: 4607 mov r7, r0 valueLenEnd = strpbrk(value, ","); 802adae: 4640 mov r0, r8 802adb0: f7f7 f948 bl 8022044 memset(tempValue2, 0, 50); 802adb4: 4629 mov r1, r5 802adb6: 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, ","); 802adb8: 4680 mov r8, r0 memset(tempValue2, 0, 50); 802adba: a80d add r0, sp, #52 ; 0x34 802adbc: f7f6 fe80 bl 8021ac0 strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); 802adc0: ebc7 0208 rsb r2, r7, r8 802adc4: 3a02 subs r2, #2 802adc6: 1cb9 adds r1, r7, #2 802adc8: a80d add r0, sp, #52 ; 0x34 802adca: f7f7 f909 bl 8021fe0 TimeParam = atoi(tempValue2); 802adce: a80d add r0, sp, #52 ; 0x34 802add0: f7f6 fd56 bl 8021880 802add4: 4b22 ldr r3, [pc, #136] ; (802ae60 ) value = strstr(tempValue, "to"); 802add6: 4923 ldr r1, [pc, #140] ; (802ae64 ) value = strstr(tempValue, "after"); valueLen = strpbrk(value, ":"); valueLenEnd = strpbrk(value, ","); memset(tempValue2, 0, 50); strncpy(tempValue2, (valueLen+2), (valueLenEnd - valueLen - 2)); TimeParam = atoi(tempValue2); 802add8: 8018 strh r0, [r3, #0] value = strstr(tempValue, "to"); 802adda: 4668 mov r0, sp 802addc: f7f7 fac8 bl 8022370 valueLen = strpbrk(value, ":"); 802ade0: 4918 ldr r1, [pc, #96] ; (802ae44 ) 802ade2: f7f7 f92f bl 8022044 memset(tempValue2, 0, 50); 802ade6: 4629 mov r1, r5 802ade8: 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, ":"); 802adea: 4607 mov r7, r0 memset(tempValue2, 0, 50); 802adec: a80d add r0, sp, #52 ; 0x34 802adee: f7f6 fe67 bl 8021ac0 strncpy(tempValue2, (valueLen+2), (strlen(valueLen) - 2)); 802adf2: 4638 mov r0, r7 802adf4: f7f7 f83c bl 8021e70 802adf8: 1cb9 adds r1, r7, #2 802adfa: 1e82 subs r2, r0, #2 802adfc: a80d add r0, sp, #52 ; 0x34 802adfe: f7f7 f8ef bl 8021fe0 TimeParam2 = atoi(tempValue2); 802ae02: a80d add r0, sp, #52 ; 0x34 802ae04: f7f6 fd3c bl 8021880 802ae08: 4b17 ldr r3, [pc, #92] ; (802ae68 ) 802ae0a: 8018 strh r0, [r3, #0] res = ups_metac_service_pdu(ups_shutdown_restore); 802ae0c: 2006 movs r0, #6 802ae0e: f7fd ff8f bl 8028d30 802ae12: b2c5 uxtb r5, r0 if(res == 1 || res == 0) 802ae14: 2d01 cmp r5, #1 802ae16: d803 bhi.n 802ae20 strcat(bufOut, "Перезагрузка ИБП!"); 802ae18: 4620 mov r0, r4 802ae1a: 4914 ldr r1, [pc, #80] ; (802ae6c ) 802ae1c: f7f6 feb6 bl 8021b8c if(res == -1) 802ae20: b26d sxtb r5, r5 802ae22: 1c69 adds r1, r5, #1 802ae24: d103 bne.n 802ae2e strcat(bufOut, "Отмена перезагрузки ИБП!"); 802ae26: 4912 ldr r1, [pc, #72] ; (802ae70 ) 802ae28: 4620 mov r0, r4 802ae2a: f7f6 feaf bl 8021b8c *lenBufOut = strlen(bufOut); 802ae2e: 4620 mov r0, r4 802ae30: f7f7 f81e bl 8021e70 802ae34: 8030 strh r0, [r6, #0] } } 802ae36: b01a add sp, #104 ; 0x68 802ae38: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802ae3c: 0803e20d .word 0x0803e20d 802ae40: 0803b0d5 .word 0x0803b0d5 802ae44: 0804123b .word 0x0804123b 802ae48: 0803b190 .word 0x0803b190 802ae4c: 0803b199 .word 0x0803b199 802ae50: 0803b1c7 .word 0x0803b1c7 802ae54: 0803b209 .word 0x0803b209 802ae58: 0803b20f .word 0x0803b20f 802ae5c: 0803b215 .word 0x0803b215 802ae60: 2000296c .word 0x2000296c 802ae64: 0803b217 .word 0x0803b217 802ae68: 20002936 .word 0x20002936 802ae6c: 0803b21a .word 0x0803b21a 802ae70: 0803b23b .word 0x0803b23b 0802ae74 : /** * @brief Проверка пароля для перехода в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802ae74: b500 push {lr} 802ae76: b093 sub sp, #76 ; 0x4c 802ae78: 4601 mov r1, r0 char tempStr[50]; strncpy(tempStr, bufIn, 50); 802ae7a: 2232 movs r2, #50 ; 0x32 802ae7c: a805 add r0, sp, #20 802ae7e: f7f7 f8af bl 8021fe0 char value[20]; uint8_t valueLen; memset(value, 0, 20); 802ae82: 4668 mov r0, sp 802ae84: 2100 movs r1, #0 802ae86: 2214 movs r2, #20 802ae88: f7f6 fe1a bl 8021ac0 //if (strcmp(BOOTLOADER_PASWORD, value) == 0) { // *bufOut = '1'; /* Запускаем задачу отложенной перезагрузки. Контроллер должен успеть отправить ответ серверу о статусе пароля */ HTTP_StartResetTask(true); 802ae8c: 2001 movs r0, #1 802ae8e: f001 fc17 bl 802c6c0 /* else *bufOut = '0';*/ //*lenBufOut = 1; } } 802ae92: b013 add sp, #76 ; 0x4c 802ae94: bd00 pop {pc} 802ae96: 0000 movs r0, r0 0802ae98 : /** * @brief * @retval None */ uint8_t GetParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802ae98: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ae9c: 4690 mov r8, r2 802ae9e: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802aea0: f7f7 fa66 bl 8022370 if (strPtr != 0) 802aea4: 4605 mov r5, r0 802aea6: b1e0 cbz r0, 802aee2 { beginValue = strpbrk(strPtr,"="); 802aea8: 490f ldr r1, [pc, #60] ; (802aee8 ) 802aeaa: f7f7 f8cb bl 8022044 endValue = strpbrk(strPtr,"&"); 802aeae: 490f ldr r1, [pc, #60] ; (802aeec ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802aeb0: 4606 mov r6, r0 endValue = strpbrk(strPtr,"&"); 802aeb2: 4628 mov r0, r5 802aeb4: f7f7 f8c6 bl 8022044 if (endValue == 0) 802aeb8: 4604 mov r4, r0 802aeba: b920 cbnz r0, 802aec6 endValue = strpbrk(strPtr," "); 802aebc: 4628 mov r0, r5 802aebe: 490c ldr r1, [pc, #48] ; (802aef0 ) 802aec0: f7f7 f8c0 bl 8022044 802aec4: 4604 mov r4, r0 len = endValue - beginValue - 1; 802aec6: 1ba5 subs r5, r4, r6 802aec8: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802aeca: 4640 mov r0, r8 802aecc: 1c71 adds r1, r6, #1 802aece: 462a mov r2, r5 802aed0: f7f7 f886 bl 8021fe0 *endValue = '0'; 802aed4: 2330 movs r3, #48 ; 0x30 802aed6: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802aed8: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr," "); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802aeda: 7033 strb r3, [r6, #0] *paramLen = len; 802aedc: 703d strb r5, [r7, #0] return 1; 802aede: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802aee2: 7038 strb r0, [r7, #0] return 0; } } 802aee4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802aee8: 0803b425 .word 0x0803b425 802aeec: 0803b269 .word 0x0803b269 802aef0: 08036e41 .word 0x08036e41 0802aef4 : /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802aef4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802aef8: b0a8 sub sp, #160 ; 0xa0 802aefa: 4604 mov r4, r0 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802aefc: 2214 movs r2, #20 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802aefe: 460d mov r5, r1 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802af00: a807 add r0, sp, #28 802af02: 2100 movs r1, #0 /** * @brief Проверка пароля для входа в Web * @retval None */ int HTTP_ConfirmWebPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802af04: 4698 mov r8, r3 char *strPtr = 0; char WebPassword[MAX_WEB_PASSWD_LEN]; char WebLogin[MAX_WEB_LOGIN_LEN]; char buf[40]; memset(login, 0, 20); 802af06: f7f6 fddb bl 8021ac0 memset(password, 0, 20); 802af0a: 2100 movs r1, #0 802af0c: 2214 movs r2, #20 802af0e: a80c add r0, sp, #48 ; 0x30 802af10: f7f6 fdd6 bl 8021ac0 memset(tempStr, 0, 50); 802af14: 2100 movs r1, #0 802af16: 2232 movs r2, #50 ; 0x32 802af18: a81b add r0, sp, #108 ; 0x6c 802af1a: f7f6 fdd1 bl 8021ac0 /* Get first 50 bytes of string */ strncpy(tempStr, bufIn, 49); 802af1e: 2231 movs r2, #49 ; 0x31 802af20: 4621 mov r1, r4 802af22: a81b add r0, sp, #108 ; 0x6c 802af24: f7f7 f85c bl 8021fe0 /* Add " " to the string in order GetParamValue() can be able to parse the param */ strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && 802af28: 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, " "); 802af2c: 4941 ldr r1, [pc, #260] ; (802b034 ) 802af2e: a81b add r0, sp, #108 ; 0x6c 802af30: f7f6 fe2c bl 8021b8c if (GetParamValue(tempStr, "login=", login, &valueLen) && 802af34: a81b add r0, sp, #108 ; 0x6c 802af36: 4940 ldr r1, [pc, #256] ; (802b038 ) 802af38: aa07 add r2, sp, #28 802af3a: 4633 mov r3, r6 802af3c: f7ff ffac bl 802ae98 802af40: b920 cbnz r0, 802af4c } } /* No valid login and pass found */ /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; 802af42: 4b3e ldr r3, [pc, #248] ; (802b03c ) 802af44: 2200 movs r2, #0 802af46: 701a strb r2, [r3, #0] /* Wrong login or pass, return */ return SEND_REQUIRED_NO; 802af48: 2001 movs r0, #1 802af4a: e06f b.n 802b02c /* 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)) 802af4c: a81b add r0, sp, #108 ; 0x6c 802af4e: 493c ldr r1, [pc, #240] ; (802b040 ) 802af50: aa0c add r2, sp, #48 ; 0x30 802af52: 4633 mov r3, r6 802af54: f7ff ffa0 bl 802ae98 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) && 802af58: 2800 cmp r0, #0 802af5a: d0f2 beq.n 802af42 802af5c: 2400 movs r4, #0 GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { GetUserLogin(user_id, WebLogin, &valueLen); 802af5e: 4637 mov r7, r6 802af60: 4620 mov r0, r4 802af62: a904 add r1, sp, #16 802af64: 463a mov r2, r7 802af66: f7fc feeb bl 8027d40 GetUserPassword(user_id, WebPassword, &valueLen); 802af6a: 4620 mov r0, r4 802af6c: a901 add r1, sp, #4 802af6e: 463a mov r2, r7 802af70: f7fc fefc bl 8027d6c /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802af74: a804 add r0, sp, #16 802af76: a907 add r1, sp, #28 802af78: 220b movs r2, #11 802af7a: f7f6 ffdb bl 8021f34 802af7e: 2800 cmp r0, #0 802af80: d14f bne.n 802b022 (strncmp(WebPassword, password, MAX_WEB_PASSWD_LEN) == 0)) { 802af82: a801 add r0, sp, #4 802af84: a90c add r1, sp, #48 ; 0x30 802af86: 220b movs r2, #11 802af88: f7f6 ffd4 bl 8021f34 GetUserLogin(user_id, WebLogin, &valueLen); GetUserPassword(user_id, WebPassword, &valueLen); /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802af8c: 4606 mov r6, r0 802af8e: 2800 cmp r0, #0 802af90: d147 bne.n 802b022 if (user_id >= 1) { } /* TODO replace global flag with user-pass-cookie */ Authenticated = true; 802af92: 4b2a ldr r3, [pc, #168] ; (802b03c ) 802af94: 2201 movs r2, #1 802af96: 701a strb r2, [r3, #0] /* Generate cookie */ sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); 802af98: f7fb f898 bl 80260cc 802af9c: 4929 ldr r1, [pc, #164] ; (802b044 ) 802af9e: 4602 mov r2, r0 802afa0: a81b add r0, sp, #108 ; 0x6c 802afa2: f7fc fbfd bl 80277a0 /** * @brief Установка Cookie пользователя */ static void HTTP_SetUserCookie(char *str, uint8_t user_id) { strcpy(users[user_id].cookie, str); 802afa6: 4b28 ldr r3, [pc, #160] ; (802b048 ) 802afa8: 2014 movs r0, #20 802afaa: fb00 3004 mla r0, r0, r4, r3 802afae: a91b add r1, sp, #108 ; 0x6c 802afb0: f7f6 ff00 bl 8021db4 sprintf(tempStr, "%X", (unsigned int)GetRandomNumber()); /* Set users cookie */ HTTP_SetUserCookie(tempStr, user_id); HTTP_UpdateUserLoginTime(user_id); 802afb4: 4620 mov r0, r4 802afb6: f7ff fd4b bl 802aa50 /* Send login and cookie back */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\nSet-Cookie: uname="); 802afba: 4924 ldr r1, [pc, #144] ; (802b04c ) 802afbc: 4628 mov r0, r5 802afbe: f7f6 fef9 bl 8021db4 strcat(bufOut, WebLogin); 802afc2: a904 add r1, sp, #16 802afc4: 4628 mov r0, r5 802afc6: f7f6 fde1 bl 8021b8c strcat(bufOut, "\r\nSet-Cookie: id="); 802afca: 4921 ldr r1, [pc, #132] ; (802b050 ) 802afcc: 4628 mov r0, r5 802afce: f7f6 fddd bl 8021b8c strcat(bufOut, tempStr); 802afd2: a91b add r1, sp, #108 ; 0x6c 802afd4: 4628 mov r0, r5 802afd6: f7f6 fdd9 bl 8021b8c sprintf(tempStr, "%d", user_id); 802afda: 4622 mov r2, r4 802afdc: 491d ldr r1, [pc, #116] ; (802b054 ) 802afde: a81b add r0, sp, #108 ; 0x6c 802afe0: f7fc fbde bl 80277a0 strcat(bufOut, "\r\nSet-Cookie: role="); 802afe4: 491c ldr r1, [pc, #112] ; (802b058 ) 802afe6: 4628 mov r0, r5 802afe8: f7f6 fdd0 bl 8021b8c strcat(bufOut, tempStr); 802afec: a91b add r1, sp, #108 ; 0x6c 802afee: 4628 mov r0, r5 802aff0: f7f6 fdcc bl 8021b8c strcat(bufOut, "\r\n\r\n"); 802aff4: 4919 ldr r1, [pc, #100] ; (802b05c ) 802aff6: 4628 mov r0, r5 802aff8: f7f6 fdc8 bl 8021b8c strcat(bufOut,"\r\n\r\n"); 802affc: 4918 ldr r1, [pc, #96] ; (802b060 ) 802affe: 4628 mov r0, r5 802b000: f7f6 fdc4 bl 8021b8c *lenBufOut = strlen(bufOut); 802b004: 4628 mov r0, r5 802b006: f7f6 ff33 bl 8021e70 switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802b00a: 2128 movs r1, #40 ; 0x28 strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); switch (user_id) { 802b00c: 2c01 cmp r4, #1 strcat(bufOut, "\r\nSet-Cookie: role="); strcat(bufOut, tempStr); strcat(bufOut, "\r\n\r\n"); strcat(bufOut,"\r\n\r\n"); *lenBufOut = strlen(bufOut); 802b00e: f8a8 0000 strh.w r0, [r8] switch (user_id) { case 0: snprintf(buf, sizeof(buf), "Администратор"); 802b012: bf14 ite ne 802b014: 4a13 ldrne r2, [pc, #76] ; (802b064 ) break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); 802b016: 4a14 ldreq r2, [pc, #80] ; (802b068 ) 802b018: a811 add r0, sp, #68 ; 0x44 802b01a: f7fc fba3 bl 8027764 break; } /* Запускаем задачу-таймер логаута. */ /* TODO отправить ответ серверу о статусе пароля */ return SEND_REQUIRED_YES; 802b01e: 4630 mov r0, r6 case 0: snprintf(buf, sizeof(buf), "Администратор"); break; case 1: snprintf(buf, sizeof(buf), "Пользователь"); break; 802b020: e004 b.n 802b02c strcat(tempStr, " "); if (GetParamValue(tempStr, "login=", login, &valueLen) && GetParamValue(tempStr, "password=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802b022: 3401 adds r4, #1 802b024: b2e4 uxtb r4, r4 802b026: 2c02 cmp r4, #2 802b028: d08b beq.n 802af42 802b02a: e799 b.n 802af60 /* TODO replace global flag with user-pass-cookie*/ Authenticated = false; /* Wrong login or pass, return */ return SEND_REQUIRED_NO; } 802b02c: b028 add sp, #160 ; 0xa0 802b02e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b032: bf00 nop 802b034: 08036e41 .word 0x08036e41 802b038: 0803b26b .word 0x0803b26b 802b03c: 20002ad9 .word 0x20002ad9 802b040: 0803b272 .word 0x0803b272 802b044: 0803b0c8 .word 0x0803b0c8 802b048: 2000fbfc .word 0x2000fbfc 802b04c: 0803b27c .word 0x0803b27c 802b050: 0803b2b8 .word 0x0803b2b8 802b054: 08036d34 .word 0x08036d34 802b058: 0803b2ca .word 0x0803b2ca 802b05c: 0803b6a5 .word 0x0803b6a5 802b060: 0803b2de .word 0x0803b2de 802b064: 0803b34a .word 0x0803b34a 802b068: 0803b365 .word 0x0803b365 0802b06c : /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802b06c: b530 push {r4, r5, lr} uint8_t valueLen = 0; 802b06e: 2500 movs r5, #0 /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802b070: b0a3 sub sp, #140 ; 0x8c 802b072: 4604 mov r4, r0 //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802b074: 2240 movs r2, #64 ; 0x40 802b076: 4629 mov r1, r5 802b078: a802 add r0, sp, #8 * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { uint8_t valueLen = 0; 802b07a: f88d 5007 strb.w r5, [sp, #7] //printf(buf); //ClearParamString(buf); memset(value, 0, len); 802b07e: f7f6 fd1f bl 8021ac0 memset(str, 0, MAX_WEB_PARAM_LEN); 802b082: 2240 movs r2, #64 ; 0x40 802b084: 4629 mov r1, r5 802b086: a812 add r0, sp, #72 ; 0x48 802b088: f7f6 fd1a bl 8021ac0 /* SNMP */ GetParamValue(buf, "read_community=", value, &valueLen); 802b08c: f10d 0307 add.w r3, sp, #7 802b090: 49a5 ldr r1, [pc, #660] ; (802b328 ) 802b092: aa02 add r2, sp, #8 802b094: 4620 mov r0, r4 802b096: f7ff feff bl 802ae98 SetReadCommunity(value); 802b09a: a802 add r0, sp, #8 802b09c: f7fc fff4 bl 8028088 memset(value, 0, len); 802b0a0: 2240 movs r2, #64 ; 0x40 802b0a2: 4629 mov r1, r5 802b0a4: a802 add r0, sp, #8 802b0a6: f7f6 fd0b bl 8021ac0 GetParamValue(buf, "write_community=", value, &valueLen); 802b0aa: f10d 0307 add.w r3, sp, #7 802b0ae: 499f ldr r1, [pc, #636] ; (802b32c ) 802b0b0: aa02 add r2, sp, #8 802b0b2: 4620 mov r0, r4 802b0b4: f7ff fef0 bl 802ae98 SetWriteCommunity(value); 802b0b8: a802 add r0, sp, #8 802b0ba: f7fc ffeb bl 8028094 memset(value, 0, len); 802b0be: 2240 movs r2, #64 ; 0x40 802b0c0: 4629 mov r1, r5 802b0c2: a802 add r0, sp, #8 802b0c4: f7f6 fcfc bl 8021ac0 GetParamValue(buf, "managerIP=", value, &valueLen); 802b0c8: f10d 0307 add.w r3, sp, #7 802b0cc: 4998 ldr r1, [pc, #608] ; (802b330 ) 802b0ce: aa02 add r2, sp, #8 802b0d0: 4620 mov r0, r4 802b0d2: f7ff fee1 bl 802ae98 SetManagerIp(value); 802b0d6: a802 add r0, sp, #8 802b0d8: f7fc ffe2 bl 80280a0 memset(value, 0, len); 802b0dc: 2240 movs r2, #64 ; 0x40 802b0de: 4629 mov r1, r5 802b0e0: a802 add r0, sp, #8 802b0e2: f7f6 fced bl 8021ac0 GetParamValue(buf, "managerIP2=", value, &valueLen); 802b0e6: f10d 0307 add.w r3, sp, #7 802b0ea: 4992 ldr r1, [pc, #584] ; (802b334 ) 802b0ec: aa02 add r2, sp, #8 802b0ee: 4620 mov r0, r4 802b0f0: f7ff fed2 bl 802ae98 SetManagerIp2(value); 802b0f4: a802 add r0, sp, #8 802b0f6: f7fc ffe1 bl 80280bc memset(value, 0, len); 802b0fa: 2240 movs r2, #64 ; 0x40 802b0fc: 4629 mov r1, r5 802b0fe: a802 add r0, sp, #8 802b100: f7f6 fcde bl 8021ac0 GetParamValue(buf, "managerIP3=", value, &valueLen); 802b104: f10d 0307 add.w r3, sp, #7 802b108: 498b ldr r1, [pc, #556] ; (802b338 ) 802b10a: aa02 add r2, sp, #8 802b10c: 4620 mov r0, r4 802b10e: f7ff fec3 bl 802ae98 SetManagerIp3(value); 802b112: a802 add r0, sp, #8 802b114: f7fc ffe0 bl 80280d8 memset(value, 0, len); 802b118: 2240 movs r2, #64 ; 0x40 802b11a: 4629 mov r1, r5 802b11c: a802 add r0, sp, #8 802b11e: f7f6 fccf bl 8021ac0 GetParamValue(buf, "managerIP4=", value, &valueLen); 802b122: f10d 0307 add.w r3, sp, #7 802b126: 4985 ldr r1, [pc, #532] ; (802b33c ) 802b128: aa02 add r2, sp, #8 802b12a: 4620 mov r0, r4 802b12c: f7ff feb4 bl 802ae98 SetManagerIp4(value); 802b130: a802 add r0, sp, #8 802b132: f7fc ffdf bl 80280f4 memset(value, 0, len); 802b136: 2240 movs r2, #64 ; 0x40 802b138: 4629 mov r1, r5 802b13a: a802 add r0, sp, #8 802b13c: f7f6 fcc0 bl 8021ac0 GetParamValue(buf, "managerIP5=", value, &valueLen); 802b140: f10d 0307 add.w r3, sp, #7 802b144: 497e ldr r1, [pc, #504] ; (802b340 ) 802b146: aa02 add r2, sp, #8 802b148: 4620 mov r0, r4 802b14a: f7ff fea5 bl 802ae98 SetManagerIp5(value); 802b14e: a802 add r0, sp, #8 802b150: f7fc ffde bl 8028110 memset(value, 0, len); 802b154: 2240 movs r2, #64 ; 0x40 802b156: 4629 mov r1, r5 802b158: a802 add r0, sp, #8 802b15a: f7f6 fcb1 bl 8021ac0 /* Сетевые параметры */ GetParamValue(buf, "dhcp=", value, &valueLen); 802b15e: 4979 ldr r1, [pc, #484] ; (802b344 ) 802b160: aa02 add r2, sp, #8 802b162: f10d 0307 add.w r3, sp, #7 802b166: 4620 mov r0, r4 802b168: f7ff fe96 bl 802ae98 SetDhcpStateStr(value); 802b16c: a802 add r0, sp, #8 802b16e: f7fc ff79 bl 8028064 if (strncmp(value, "on", 2) != 0) // Если dhcp off устанавливаем параметры 802b172: a802 add r0, sp, #8 802b174: 4974 ldr r1, [pc, #464] ; (802b348 ) 802b176: 2202 movs r2, #2 802b178: f7f6 fedc bl 8021f34 802b17c: 2800 cmp r0, #0 802b17e: d031 beq.n 802b1e4 { memset(value, 0, len); 802b180: 4629 mov r1, r5 802b182: 2240 movs r2, #64 ; 0x40 802b184: a802 add r0, sp, #8 802b186: f7f6 fc9b bl 8021ac0 GetParamValue(buf, "ipaddr=", value, &valueLen); 802b18a: f10d 0307 add.w r3, sp, #7 802b18e: 496f ldr r1, [pc, #444] ; (802b34c ) 802b190: aa02 add r2, sp, #8 802b192: 4620 mov r0, r4 802b194: f7ff fe80 bl 802ae98 SetIPStr(value); 802b198: a802 add r0, sp, #8 802b19a: f7fc ff51 bl 8028040 memset(value, 0, len); 802b19e: 4629 mov r1, r5 802b1a0: 2240 movs r2, #64 ; 0x40 802b1a2: a802 add r0, sp, #8 802b1a4: f7f6 fc8c bl 8021ac0 GetParamValue(buf, "gw=", value, &valueLen); 802b1a8: f10d 0307 add.w r3, sp, #7 802b1ac: 4968 ldr r1, [pc, #416] ; (802b350 ) 802b1ae: aa02 add r2, sp, #8 802b1b0: 4620 mov r0, r4 802b1b2: f7ff fe71 bl 802ae98 SetGatewayStr(value); 802b1b6: a802 add r0, sp, #8 802b1b8: f7fc ff48 bl 802804c memset(value, 0, len); 802b1bc: 4629 mov r1, r5 802b1be: 2240 movs r2, #64 ; 0x40 802b1c0: a802 add r0, sp, #8 802b1c2: f7f6 fc7d bl 8021ac0 GetParamValue(buf, "mask=", value, &valueLen); 802b1c6: 4963 ldr r1, [pc, #396] ; (802b354 ) 802b1c8: aa02 add r2, sp, #8 802b1ca: f10d 0307 add.w r3, sp, #7 802b1ce: 4620 mov r0, r4 802b1d0: f7ff fe62 bl 802ae98 SetMaskStr(value); 802b1d4: a802 add r0, sp, #8 802b1d6: f7fc ff3f bl 8028058 memset(value, 0, len); 802b1da: a802 add r0, sp, #8 802b1dc: 4629 mov r1, r5 802b1de: 2240 movs r2, #64 ; 0x40 802b1e0: f7f6 fc6e bl 8021ac0 } memset(value, 0, len); 802b1e4: 2100 movs r1, #0 802b1e6: 2240 movs r2, #64 ; 0x40 802b1e8: a802 add r0, sp, #8 802b1ea: f7f6 fc69 bl 8021ac0 /* параметры RADIUS*/ GetParamValue(buf, "rs_enabled=", value, &valueLen); 802b1ee: f10d 0307 add.w r3, sp, #7 802b1f2: 4959 ldr r1, [pc, #356] ; (802b358 ) 802b1f4: aa02 add r2, sp, #8 802b1f6: 4620 mov r0, r4 802b1f8: f7ff fe4e bl 802ae98 SetRDSEnableStateStr(value); 802b1fc: a802 add r0, sp, #8 802b1fe: f7fc ffd9 bl 80281b4 memset(value, 0, len); 802b202: 2100 movs r1, #0 802b204: 2240 movs r2, #64 ; 0x40 802b206: a802 add r0, sp, #8 802b208: f7f6 fc5a bl 8021ac0 GetParamValue(buf, "rs_server=", value, &valueLen); 802b20c: f10d 0307 add.w r3, sp, #7 802b210: 4952 ldr r1, [pc, #328] ; (802b35c ) 802b212: aa02 add r2, sp, #8 802b214: 4620 mov r0, r4 802b216: f7ff fe3f bl 802ae98 SetRDSIpStr(value); 802b21a: a802 add r0, sp, #8 802b21c: f7fc ffaa bl 8028174 memset(value, 0, len); 802b220: 2100 movs r1, #0 802b222: 2240 movs r2, #64 ; 0x40 802b224: a802 add r0, sp, #8 802b226: f7f6 fc4b bl 8021ac0 GetParamValue(buf, "rs_port=", value, &valueLen); 802b22a: f10d 0307 add.w r3, sp, #7 802b22e: 494c ldr r1, [pc, #304] ; (802b360 ) 802b230: aa02 add r2, sp, #8 802b232: 4620 mov r0, r4 802b234: f7ff fe30 bl 802ae98 SetRDSPortStr(value); 802b238: a802 add r0, sp, #8 802b23a: f7fc ffa1 bl 8028180 memset(value, 0, len); 802b23e: 2100 movs r1, #0 802b240: 2240 movs r2, #64 ; 0x40 802b242: a802 add r0, sp, #8 802b244: f7f6 fc3c bl 8021ac0 GetParamValue(buf, "rs_pwd=", value, &valueLen); 802b248: f10d 0307 add.w r3, sp, #7 802b24c: 4945 ldr r1, [pc, #276] ; (802b364 ) 802b24e: aa02 add r2, sp, #8 802b250: 4620 mov r0, r4 802b252: f7ff fe21 bl 802ae98 SetRDSPasswordkStr(value); 802b256: a802 add r0, sp, #8 802b258: f7fc ffa6 bl 80281a8 memset(value, 0, len); 802b25c: 2100 movs r1, #0 802b25e: 2240 movs r2, #64 ; 0x40 802b260: a802 add r0, sp, #8 802b262: f7f6 fc2d bl 8021ac0 GetParamValue(buf, "rs_key=", value, &valueLen); 802b266: f10d 0307 add.w r3, sp, #7 802b26a: 493f ldr r1, [pc, #252] ; (802b368 ) 802b26c: aa02 add r2, sp, #8 802b26e: 4620 mov r0, r4 802b270: f7ff fe12 bl 802ae98 SetRDSKeyAccesstStr(value); 802b274: a802 add r0, sp, #8 802b276: f7fc ff8d bl 8028194 memset(value, 0, len); 802b27a: 2100 movs r1, #0 802b27c: 2240 movs r2, #64 ; 0x40 802b27e: a802 add r0, sp, #8 802b280: f7f6 fc1e bl 8021ac0 // Параметры реле и сухих контактов GetParamValue(buf, "di1=", value, &valueLen); 802b284: f10d 0307 add.w r3, sp, #7 802b288: aa02 add r2, sp, #8 802b28a: 4938 ldr r1, [pc, #224] ; (802b36c ) 802b28c: 4620 mov r0, r4 802b28e: f7ff fe03 bl 802ae98 SetDINTypeActStr(value, 0); 802b292: 2100 movs r1, #0 802b294: a802 add r0, sp, #8 802b296: f7fd f883 bl 80283a0 memset(value, 0, len); 802b29a: 2100 movs r1, #0 802b29c: 2240 movs r2, #64 ; 0x40 802b29e: a802 add r0, sp, #8 802b2a0: f7f6 fc0e bl 8021ac0 GetParamValue(buf, "ro1=", value, &valueLen); 802b2a4: f10d 0307 add.w r3, sp, #7 802b2a8: aa02 add r2, sp, #8 802b2aa: 4931 ldr r1, [pc, #196] ; (802b370 ) 802b2ac: 4620 mov r0, r4 802b2ae: f7ff fdf3 bl 802ae98 SetROTypeActStr(value, 0); 802b2b2: a802 add r0, sp, #8 802b2b4: 2100 movs r1, #0 802b2b6: f7fd f891 bl 80283dc memset(value, 0, len); 802b2ba: 2100 movs r1, #0 802b2bc: 2240 movs r2, #64 ; 0x40 802b2be: a802 add r0, sp, #8 802b2c0: f7f6 fbfe bl 8021ac0 GetParamValue(buf, "ro2=", value, &valueLen); 802b2c4: f10d 0307 add.w r3, sp, #7 802b2c8: aa02 add r2, sp, #8 802b2ca: 492a ldr r1, [pc, #168] ; (802b374 ) 802b2cc: 4620 mov r0, r4 802b2ce: f7ff fde3 bl 802ae98 SetROTypeActStr(value, 1); 802b2d2: a802 add r0, sp, #8 802b2d4: 2101 movs r1, #1 802b2d6: f7fd f881 bl 80283dc memset(value, 0, len); 802b2da: 2100 movs r1, #0 802b2dc: 2240 movs r2, #64 ; 0x40 802b2de: a802 add r0, sp, #8 802b2e0: f7f6 fbee bl 8021ac0 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); 802b2e4: 4924 ldr r1, [pc, #144] ; (802b378 ) 802b2e6: aa02 add r2, sp, #8 802b2e8: f10d 0307 add.w r3, sp, #7 802b2ec: 4620 mov r0, r4 802b2ee: f7ff fdd3 bl 802ae98 SetSntpStateStr(value); 802b2f2: a802 add r0, sp, #8 802b2f4: f7fc ffd8 bl 80282a8 if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802b2f8: a802 add r0, sp, #8 802b2fa: 4920 ldr r1, [pc, #128] ; (802b37c ) 802b2fc: 2201 movs r2, #1 802b2fe: f7f6 fe19 bl 8021f34 802b302: 4605 mov r5, r0 { memset(value, 0, len); 802b304: a802 add r0, sp, #8 // Параметры даты и времени GetParamValue(buf, "ntp=", value, &valueLen); SetSntpStateStr(value); if (strncmp(value, "1", 1) == 0) // Если ntp on устанавливаем параметры 802b306: 2d00 cmp r5, #0 802b308: d13c bne.n 802b384 { memset(value, 0, len); 802b30a: 4629 mov r1, r5 802b30c: 2240 movs r2, #64 ; 0x40 802b30e: f7f6 fbd7 bl 8021ac0 GetParamValue(buf, "ntpservip=", value, &valueLen); 802b312: 4620 mov r0, r4 802b314: 491a ldr r1, [pc, #104] ; (802b380 ) 802b316: aa02 add r2, sp, #8 802b318: f10d 0307 add.w r3, sp, #7 802b31c: f7ff fdbc bl 802ae98 SetSntpServerIpStr(value); 802b320: a802 add r0, sp, #8 802b322: f7fc ffe1 bl 80282e8 802b326: e051 b.n 802b3cc 802b328: 0803b37e .word 0x0803b37e 802b32c: 0803b38e .word 0x0803b38e 802b330: 0803b39f .word 0x0803b39f 802b334: 0803b3aa .word 0x0803b3aa 802b338: 0803b3b6 .word 0x0803b3b6 802b33c: 0803b3c2 .word 0x0803b3c2 802b340: 0803b3ce .word 0x0803b3ce 802b344: 0803b3da .word 0x0803b3da 802b348: 08036d73 .word 0x08036d73 802b34c: 0803b3e0 .word 0x0803b3e0 802b350: 0803b3e8 .word 0x0803b3e8 802b354: 0803b3ec .word 0x0803b3ec 802b358: 0803b3f2 .word 0x0803b3f2 802b35c: 0803b3fe .word 0x0803b3fe 802b360: 0803b409 .word 0x0803b409 802b364: 0803b412 .word 0x0803b412 802b368: 0803b41a .word 0x0803b41a 802b36c: 0803b422 .word 0x0803b422 802b370: 0803b427 .word 0x0803b427 802b374: 0803b42c .word 0x0803b42c 802b378: 0803b431 .word 0x0803b431 802b37c: 08036e2f .word 0x08036e2f 802b380: 0803b436 .word 0x0803b436 memset(value, 0, len); } else if (strncmp(value, "0", 1) == 0){ 802b384: 4929 ldr r1, [pc, #164] ; (802b42c ) 802b386: 2201 movs r2, #1 802b388: f7f6 fdd4 bl 8021f34 802b38c: 4605 mov r5, r0 802b38e: bb10 cbnz r0, 802b3d6 GetParamValue(buf, "date=", value, &valueLen); 802b390: f10d 0307 add.w r3, sp, #7 802b394: 4926 ldr r1, [pc, #152] ; (802b430 ) 802b396: aa02 add r2, sp, #8 802b398: 4620 mov r0, r4 802b39a: f7ff fd7d bl 802ae98 SetDateStr(value); 802b39e: a802 add r0, sp, #8 802b3a0: f7fc ff1a bl 80281d8 memset(value, 0, len); 802b3a4: 4629 mov r1, r5 802b3a6: 2240 movs r2, #64 ; 0x40 802b3a8: a802 add r0, sp, #8 802b3aa: f7f6 fb89 bl 8021ac0 GetParamValue(buf, "time=", value, &valueLen); 802b3ae: 4921 ldr r1, [pc, #132] ; (802b434 ) 802b3b0: aa02 add r2, sp, #8 802b3b2: f10d 0307 add.w r3, sp, #7 802b3b6: 4620 mov r0, r4 802b3b8: f7ff fd6e bl 802ae98 url_decode(str, sizeof(str), value); 802b3bc: a812 add r0, sp, #72 ; 0x48 802b3be: 2140 movs r1, #64 ; 0x40 802b3c0: aa02 add r2, sp, #8 802b3c2: f7fd fd4d bl 8028e60 SetTimeStr(str); 802b3c6: a812 add r0, sp, #72 ; 0x48 802b3c8: f7fc ff3e bl 8028248 memset(value, 0, len); 802b3cc: a802 add r0, sp, #8 802b3ce: 4629 mov r1, r5 802b3d0: 2240 movs r2, #64 ; 0x40 802b3d2: f7f6 fb75 bl 8021ac0 } GetParamValue(buf, "utc=", value, &valueLen); 802b3d6: 4918 ldr r1, [pc, #96] ; (802b438 ) 802b3d8: aa02 add r2, sp, #8 802b3da: f10d 0307 add.w r3, sp, #7 802b3de: 4620 mov r0, r4 802b3e0: f7ff fd5a bl 802ae98 SetSntpTimeZoneStr(value); 802b3e4: a802 add r0, sp, #8 802b3e6: f7fc ff85 bl 80282f4 memset(value, 0, len); 802b3ea: 2100 movs r1, #0 802b3ec: 2240 movs r2, #64 ; 0x40 802b3ee: a802 add r0, sp, #8 802b3f0: f7f6 fb66 bl 8021ac0 /* Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся */ if (GetStateWebReinit() == true) 802b3f4: f00a f978 bl 80356e8 802b3f8: b1a0 cbz r0, 802b424 { SetWebReinitFlag(true); 802b3fa: 2001 movs r0, #1 802b3fc: f7fc fe14 bl 8028028 HTTP_SaveSettings(); 802b400: f001 f955 bl 802c6ae /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802b404: f240 30f2 movw r0, #1010 ; 0x3f2 802b408: f7fe fd4c bl 8029ea4 802b40c: f3bf 8f4f dsb sy (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 802b410: 4a0a ldr r2, [pc, #40] ; (802b43c ) 802b412: 4b0b ldr r3, [pc, #44] ; (802b440 ) 802b414: 68d1 ldr r1, [r2, #12] 802b416: f401 61e0 and.w r1, r1, #1792 ; 0x700 802b41a: 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) | 802b41c: 60d3 str r3, [r2, #12] 802b41e: f3bf 8f4f dsb sy 802b422: e7fe b.n 802b422 NVIC_SystemReset(); } HTTP_SaveSettings(); 802b424: f001 f943 bl 802c6ae } 802b428: b023 add sp, #140 ; 0x8c 802b42a: bd30 pop {r4, r5, pc} 802b42c: 08036dd2 .word 0x08036dd2 802b430: 0803b458 .word 0x0803b458 802b434: 0803b441 .word 0x0803b441 802b438: 0803b447 .word 0x0803b447 802b43c: e000ed00 .word 0xe000ed00 802b440: 05fa0004 .word 0x05fa0004 0802b444 : /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b444: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b448: 4606 mov r6, r0 802b44a: b088 sub sp, #32 802b44c: 460c mov r4, r1 802b44e: 4690 mov r8, r2 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802b450: 4631 mov r1, r6 802b452: 221e movs r2, #30 802b454: 4668 mov r0, sp /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b456: 461f mov r7, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802b458: f7f6 fdc2 bl 8021fe0 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802b45c: 4668 mov r0, sp 802b45e: 490e ldr r1, [pc, #56] ; (802b498 ) 802b460: f7f6 fdf0 bl 8022044 802b464: 4605 mov r5, r0 802b466: b970 cbnz r0, 802b486 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802b468: 4629 mov r1, r5 802b46a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802b46e: 4620 mov r0, r4 802b470: f7f6 fb26 bl 8021ac0 HTTP_GetSettings(bufOut); 802b474: 4620 mov r0, r4 802b476: f000 fe53 bl 802c120 //printf(bufOut); *lenBufOut = strlen(bufOut); 802b47a: 4620 mov r0, r4 802b47c: f7f6 fcf8 bl 8021e70 802b480: 8038 strh r0, [r7, #0] return SEND_REQUIRED_YES; 802b482: 4628 mov r0, r5 802b484: e004 b.n 802b490 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { HTTP_SetSettings(bufIn, lenBufIn); 802b486: 4630 mov r0, r6 802b488: 4641 mov r1, r8 802b48a: f7ff fdef bl 802b06c return SEND_REQUIRED_NO; 802b48e: 2001 movs r0, #1 } } 802b490: b008 add sp, #32 802b492: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b496: bf00 nop 802b498: 0803b44c .word 0x0803b44c 0802b49c : /** * @brief * @retval None */ uint8_t GetCookieValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 802b49c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b4a0: 4690 mov r8, r2 802b4a2: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 802b4a4: f7f6 ff64 bl 8022370 if (strPtr != 0) 802b4a8: 4605 mov r5, r0 802b4aa: b1e0 cbz r0, 802b4e6 { beginValue = strpbrk(strPtr,"="); 802b4ac: 490f ldr r1, [pc, #60] ; (802b4ec ) 802b4ae: f7f6 fdc9 bl 8022044 endValue = strpbrk(strPtr,";"); 802b4b2: 490f ldr r1, [pc, #60] ; (802b4f0 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 802b4b4: 4606 mov r6, r0 endValue = strpbrk(strPtr,";"); 802b4b6: 4628 mov r0, r5 802b4b8: f7f6 fdc4 bl 8022044 if (endValue == 0) 802b4bc: 4604 mov r4, r0 802b4be: b920 cbnz r0, 802b4ca endValue = strpbrk(strPtr,"\n"); 802b4c0: 4628 mov r0, r5 802b4c2: 490c ldr r1, [pc, #48] ; (802b4f4 ) 802b4c4: f7f6 fdbe bl 8022044 802b4c8: 4604 mov r4, r0 len = endValue - beginValue - 1; 802b4ca: 1ba5 subs r5, r4, r6 802b4cc: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 802b4ce: 4640 mov r0, r8 802b4d0: 1c71 adds r1, r6, #1 802b4d2: 462a mov r2, r5 802b4d4: f7f6 fd84 bl 8021fe0 *endValue = '0'; 802b4d8: 2330 movs r3, #48 ; 0x30 802b4da: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 802b4dc: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr,"\n"); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 802b4de: 7033 strb r3, [r6, #0] *paramLen = len; 802b4e0: 703d strb r5, [r7, #0] return 1; 802b4e2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 802b4e6: 7038 strb r0, [r7, #0] return 0; } } 802b4e8: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b4ec: 0803b425 .word 0x0803b425 802b4f0: 0803b44e .word 0x0803b44e 802b4f4: 0803b6a8 .word 0x0803b6a8 0802b4f8 : } } */ void ClearParamString(char *inBuf) { 802b4f8: b510 push {r4, lr} uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802b4fa: 4908 ldr r1, [pc, #32] ; (802b51c ) } } */ void ClearParamString(char *inBuf) { 802b4fc: 4604 mov r4, r0 uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802b4fe: f7f6 ff37 bl 8022370 if (str != 0) 802b502: b148 cbz r0, 802b518 { len = str - inBuf; 802b504: 1b02 subs r2, r0, r4 memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 802b506: b292 uxth r2, r2 802b508: f5c2 62bb rsb r2, r2, #1496 ; 0x5d8 802b50c: 2100 movs r1, #0 802b50e: 3203 adds r2, #3 } } 802b510: 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); 802b514: f7f6 bad4 b.w 8021ac0 802b518: bd10 pop {r4, pc} 802b51a: bf00 nop 802b51c: 0803b450 .word 0x0803b450 0802b520 : /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b520: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802b522: 2500 movs r5, #0 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b524: b087 sub sp, #28 802b526: 4606 mov r6, r0 802b528: 460c mov r4, r1 uint8_t valueLen = 0; char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802b52a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802b52e: 4608 mov r0, r1 802b530: 4629 mov r1, r5 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b532: 461f mov r7, r3 uint8_t valueLen = 0; 802b534: f88d 5003 strb.w r5, [sp, #3] char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 802b538: f7f6 fac2 bl 8021ac0 ClearParamString(bufIn); 802b53c: 4630 mov r0, r6 802b53e: f7ff ffdb bl 802b4f8 memset(value, 0, 20); 802b542: 4629 mov r1, r5 802b544: 2214 movs r2, #20 802b546: a801 add r0, sp, #4 802b548: f7f6 faba bl 8021ac0 GetParamValue(bufIn, "prodate=", value, &valueLen); 802b54c: aa01 add r2, sp, #4 802b54e: f10d 0303 add.w r3, sp, #3 802b552: 490b ldr r1, [pc, #44] ; (802b580 ) 802b554: 4630 mov r0, r6 802b556: f7ff fc9f bl 802ae98 printf(value); printf("\r\n"); */ /* Устанавливаем дату производства */ SETTINGS_SetProDate(value, valueLen); 802b55a: f89d 1003 ldrb.w r1, [sp, #3] 802b55e: a801 add r0, sp, #4 802b560: f7fd f96c bl 802883c /* Устанавливаем дату следующей профилактики +1 год */ RTC_SetProfTime(value); 802b564: a801 add r0, sp, #4 802b566: f7fb f8eb bl 8026740 /* Пока отправляем true */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\nTrue"); 802b56a: 4906 ldr r1, [pc, #24] ; (802b584 ) 802b56c: 4620 mov r0, r4 802b56e: f7f6 fc21 bl 8021db4 *lenBufOut = strlen(bufOut); 802b572: 4620 mov r0, r4 802b574: f7f6 fc7c bl 8021e70 802b578: 8038 strh r0, [r7, #0] // TEST_SetServerFlag(); } 802b57a: b007 add sp, #28 802b57c: bdf0 pop {r4, r5, r6, r7, pc} 802b57e: bf00 nop 802b580: 0803b455 .word 0x0803b455 802b584: 0803b45e .word 0x0803b45e 0802b588 : * @param *str - входная строка * @param sim1 - символ который надо заменить * @param sim2 - символ на который надо заменить */ void HTTP_ReplaceSimbol(char *str, char sim1, char sim2) { 802b588: b570 push {r4, r5, r6, lr} 802b58a: 4604 mov r4, r0 802b58c: 460d mov r5, r1 802b58e: 4616 mov r6, r2 uint16_t len = strlen(str); 802b590: f7f6 fc6e bl 8021e70 for (uint16_t i = 0; i < len; i++) 802b594: 4623 mov r3, r4 * @param sim1 - символ который надо заменить * @param sim2 - символ на который надо заменить */ void HTTP_ReplaceSimbol(char *str, char sim1, char sim2) { uint16_t len = strlen(str); 802b596: b280 uxth r0, r0 for (uint16_t i = 0; i < len; i++) 802b598: e005 b.n 802b5a6 { if (*str == sim1) 802b59a: f813 2b01 ldrb.w r2, [r3], #1 802b59e: 42aa cmp r2, r5 *str = sim2; 802b5a0: bf08 it eq 802b5a2: f803 6c01 strbeq.w r6, [r3, #-1] */ void HTTP_ReplaceSimbol(char *str, char sim1, char sim2) { uint16_t len = strlen(str); for (uint16_t i = 0; i < len; i++) 802b5a6: 1b1a subs r2, r3, r4 802b5a8: b292 uxth r2, r2 802b5aa: 4282 cmp r2, r0 802b5ac: d3f5 bcc.n 802b59a { if (*str == sim1) *str = sim2; str++; } } 802b5ae: bd70 pop {r4, r5, r6, pc} 0802b5b0 : /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802b5b0: b530 push {r4, r5, lr} 802b5b2: b09f sub sp, #124 ; 0x7c uint8_t valueLen = 0; 802b5b4: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 802b5b6: 4605 mov r5, r0 uint8_t valueLen = 0; 802b5b8: f88d 4007 strb.w r4, [sp, #7] const uint8_t len = 110; char value[110]; ClearParamString(buf); 802b5bc: f7ff ff9c bl 802b4f8 memset(value, 0, len); 802b5c0: 4621 mov r1, r4 802b5c2: 226e movs r2, #110 ; 0x6e 802b5c4: a802 add r0, sp, #8 802b5c6: f7f6 fa7b bl 8021ac0 /* Владелец */ GetParamValue(buf, "owner=", value, &valueLen); 802b5ca: f10d 0307 add.w r3, sp, #7 802b5ce: aa02 add r2, sp, #8 802b5d0: 4628 mov r0, r5 802b5d2: 491e ldr r1, [pc, #120] ; (802b64c ) 802b5d4: f7ff fc60 bl 802ae98 HTTP_ReplaceSimbol(value, '+', ' '); 802b5d8: 212b movs r1, #43 ; 0x2b 802b5da: 2220 movs r2, #32 802b5dc: a802 add r0, sp, #8 802b5de: f7ff ffd3 bl 802b588 SetOwner(value); 802b5e2: a802 add r0, sp, #8 802b5e4: f7fc fda2 bl 802812c memset(value, 0, len); 802b5e8: 4621 mov r1, r4 802b5ea: 226e movs r2, #110 ; 0x6e 802b5ec: a802 add r0, sp, #8 802b5ee: f7f6 fa67 bl 8021ac0 /* Владелец */ GetParamValue(buf, "sysLocation=", value, &valueLen); 802b5f2: f10d 0307 add.w r3, sp, #7 802b5f6: aa02 add r2, sp, #8 802b5f8: 4628 mov r0, r5 802b5fa: 4915 ldr r1, [pc, #84] ; (802b650 ) 802b5fc: f7ff fc4c bl 802ae98 HTTP_ReplaceSimbol(value, '+', ' '); 802b600: 212b movs r1, #43 ; 0x2b 802b602: 2220 movs r2, #32 802b604: a802 add r0, sp, #8 802b606: f7ff ffbf bl 802b588 SetLocation(value); 802b60a: a802 add r0, sp, #8 802b60c: f7fc fd9e bl 802814c memset(value, 0, len); 802b610: 4621 mov r1, r4 802b612: 226e movs r2, #110 ; 0x6e 802b614: a802 add r0, sp, #8 802b616: f7f6 fa53 bl 8021ac0 /* Комментарий */ GetParamValue(buf, "comment=", value, &valueLen); 802b61a: f10d 0307 add.w r3, sp, #7 802b61e: aa02 add r2, sp, #8 802b620: 4628 mov r0, r5 802b622: 490c ldr r1, [pc, #48] ; (802b654 ) 802b624: f7ff fc38 bl 802ae98 HTTP_ReplaceSimbol(value, '+', ' '); 802b628: 212b movs r1, #43 ; 0x2b 802b62a: 2220 movs r2, #32 802b62c: a802 add r0, sp, #8 802b62e: f7ff ffab bl 802b588 SetComment(value); 802b632: a802 add r0, sp, #8 802b634: f7fc fd98 bl 8028168 memset(value, 0, len); 802b638: 4621 mov r1, r4 802b63a: 226e movs r2, #110 ; 0x6e 802b63c: a802 add r0, sp, #8 802b63e: f7f6 fa3f bl 8021ac0 HTTP_SaveSettings(); 802b642: f001 f834 bl 802c6ae } 802b646: b01f add sp, #124 ; 0x7c 802b648: bd30 pop {r4, r5, pc} 802b64a: bf00 nop 802b64c: 0803b48e .word 0x0803b48e 802b650: 0803b495 .word 0x0803b495 802b654: 0803b4a2 .word 0x0803b4a2 0802b658 : /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b658: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b65c: 4606 mov r6, r0 802b65e: b088 sub sp, #32 802b660: 460c mov r4, r1 802b662: 4690 mov r8, r2 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802b664: 4631 mov r1, r6 802b666: 221e movs r2, #30 802b668: 4668 mov r0, sp /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b66a: 461f mov r7, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 802b66c: f7f6 fcb8 bl 8021fe0 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802b670: 4668 mov r0, sp 802b672: 490e ldr r1, [pc, #56] ; (802b6ac ) 802b674: f7f6 fce6 bl 8022044 802b678: 4605 mov r5, r0 802b67a: b970 cbnz r0, 802b69a { memset(bufOut, 0, SEND_BUF_MAX_LEN); 802b67c: 4629 mov r1, r5 802b67e: f44f 62fa mov.w r2, #2000 ; 0x7d0 802b682: 4620 mov r0, r4 802b684: f7f6 fa1c bl 8021ac0 HTTP_GetInfo(bufOut); 802b688: 4620 mov r0, r4 802b68a: f000 ff2b bl 802c4e4 *lenBufOut = strlen(bufOut); 802b68e: 4620 mov r0, r4 802b690: f7f6 fbee bl 8021e70 802b694: 8038 strh r0, [r7, #0] return SEND_REQUIRED_YES; 802b696: 4628 mov r0, r5 802b698: e004 b.n 802b6a4 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { HTTP_SetInfo(bufIn, lenBufIn); 802b69a: 4630 mov r0, r6 802b69c: 4641 mov r1, r8 802b69e: f7ff ff87 bl 802b5b0 return SEND_REQUIRED_NO; 802b6a2: 2001 movs r0, #1 /* HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; */ } } 802b6a4: b008 add sp, #32 802b6a6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b6aa: bf00 nop 802b6ac: 0803b44c .word 0x0803b44c 0802b6b0 : /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b6b0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802b6b4: b0b0 sub sp, #192 ; 0xc0 802b6b6: 4605 mov r5, r0 802b6b8: 460c mov r4, r1 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802b6ba: 2214 movs r2, #20 802b6bc: 2100 movs r1, #0 802b6be: a80a add r0, sp, #40 ; 0x28 /** * @brief Смена пароля пользователя * @retval None */ int HTTP_ChangeUserPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802b6c0: 461e mov r6, r3 uint8_t valueLen, valueLen2, user_id; char WebLogin[MAX_WEB_LOGIN_LEN]; (void)lenBufIn; memset(login, 0, 20); 802b6c2: f7f6 f9fd bl 8021ac0 memset(password, 0, 20); 802b6c6: 2100 movs r1, #0 802b6c8: 2214 movs r2, #20 802b6ca: a80f add r0, sp, #60 ; 0x3c 802b6cc: f7f6 f9f8 bl 8021ac0 memset(tempStr, 0, 50); memset(value, 0, 20); 802b6d0: af05 add r7, sp, #20 (void)lenBufIn; memset(login, 0, 20); memset(password, 0, 20); memset(tempStr, 0, 50); 802b6d2: 2100 movs r1, #0 802b6d4: 2232 movs r2, #50 ; 0x32 802b6d6: a814 add r0, sp, #80 ; 0x50 802b6d8: f7f6 f9f2 bl 8021ac0 memset(value, 0, 20); 802b6dc: 2100 movs r1, #0 802b6de: 2214 movs r2, #20 802b6e0: 4638 mov r0, r7 802b6e2: f7f6 f9ed bl 8021ac0 ClearParamString(bufIn); 802b6e6: 4628 mov r0, r5 802b6e8: f7ff ff06 bl 802b4f8 strncpy(tempStr, bufIn, 110); 802b6ec: 226e movs r2, #110 ; 0x6e 802b6ee: 4629 mov r1, r5 802b6f0: a814 add r0, sp, #80 ; 0x50 802b6f2: f7f6 fc75 bl 8021fe0 strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802b6f6: f10d 0806 add.w r8, sp, #6 ClearParamString(bufIn); strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); 802b6fa: 4931 ldr r1, [pc, #196] ; (802b7c0 ) 802b6fc: 4620 mov r0, r4 802b6fe: f7f6 fb59 bl 8021db4 if (GetParamValue(tempStr, "username=", login, &valueLen) && 802b702: a814 add r0, sp, #80 ; 0x50 802b704: 492f ldr r1, [pc, #188] ; (802b7c4 ) 802b706: aa0a add r2, sp, #40 ; 0x28 802b708: 4643 mov r3, r8 802b70a: f7ff fbc5 bl 802ae98 802b70e: 2800 cmp r0, #0 802b710: d04a beq.n 802b7a8 GetParamValue(tempStr, "oldpass=", password, &valueLen)) 802b712: a814 add r0, sp, #80 ; 0x50 802b714: 492c ldr r1, [pc, #176] ; (802b7c8 ) 802b716: aa0f add r2, sp, #60 ; 0x3c 802b718: 4643 mov r3, r8 802b71a: f7ff fbbd bl 802ae98 strncpy(tempStr, bufIn, 110); strcpy(bufOut, HTTP_200_OK); if (GetParamValue(tempStr, "username=", login, &valueLen) && 802b71e: 2800 cmp r0, #0 802b720: d042 beq.n 802b7a8 802b722: 2500 movs r5, #0 GetParamValue(tempStr, "oldpass=", password, &valueLen)) { for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { memset(value, 0, 20); 802b724: 2100 movs r1, #0 802b726: 2214 movs r2, #20 802b728: 4638 mov r0, r7 802b72a: f7f6 f9c9 bl 8021ac0 memset(WebLogin, 0, MAX_WEB_LOGIN_LEN); 802b72e: 2100 movs r1, #0 802b730: 220b movs r2, #11 802b732: a802 add r0, sp, #8 802b734: f7f6 f9c4 bl 8021ac0 GetUserLogin(user_id, WebLogin, &valueLen); 802b738: 4628 mov r0, r5 802b73a: a902 add r1, sp, #8 802b73c: 4642 mov r2, r8 802b73e: f7fc faff bl 8027d40 GetUserPassword(user_id, value, &valueLen2); 802b742: 4628 mov r0, r5 802b744: 4639 mov r1, r7 802b746: f10d 0207 add.w r2, sp, #7 802b74a: f7fc fb0f bl 8027d6c /* Check login and password */ if ((strncmp(WebLogin, login, MAX_WEB_LOGIN_LEN) == 0) && 802b74e: a802 add r0, sp, #8 802b750: a90a add r1, sp, #40 ; 0x28 802b752: 220b movs r2, #11 802b754: f7f6 fbee bl 8021f34 802b758: b9f8 cbnz r0, 802b79a (memcmp(password, value, 11) == 0)) 802b75a: 4639 mov r1, r7 802b75c: a80f add r0, sp, #60 ; 0x3c 802b75e: 220b movs r2, #11 802b760: f7f6 f8c2 bl 80218e8 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) && 802b764: 4601 mov r1, r0 802b766: b9c0 cbnz r0, 802b79a (memcmp(password, value, 11) == 0)) { memset(password, 0, 20); 802b768: 2214 movs r2, #20 802b76a: a80f add r0, sp, #60 ; 0x3c 802b76c: f7f6 f9a8 bl 8021ac0 if (GetParamValue(tempStr, "newpass=", password, &valueLen)) 802b770: a814 add r0, sp, #80 ; 0x50 802b772: 4916 ldr r1, [pc, #88] ; (802b7cc ) 802b774: aa0f add r2, sp, #60 ; 0x3c 802b776: 4643 mov r3, r8 802b778: f7ff fb8e bl 802ae98 802b77c: b1a0 cbz r0, 802b7a8 { memcpy(sSettings.sAuth[user_id].password, password, 11); 802b77e: 4b14 ldr r3, [pc, #80] ; (802b7d0 ) 802b780: 2217 movs r2, #23 802b782: fb02 3005 mla r0, r2, r5, r3 802b786: a90f add r1, sp, #60 ; 0x3c 802b788: 220b movs r2, #11 802b78a: 3008 adds r0, #8 802b78c: f7f6 f8de bl 802194c HTTP_SaveSettings(); 802b790: f000 ff8d bl 802c6ae strcat(bufOut, "Пароль успешно изменён"); 802b794: 4620 mov r0, r4 802b796: 490f ldr r1, [pc, #60] ; (802b7d4 ) 802b798: e008 b.n 802b7ac 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++) 802b79a: 3501 adds r5, #1 802b79c: b2ed uxtb r5, r5 802b79e: 2d02 cmp r5, #2 802b7a0: d1c0 bne.n 802b724 *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } } } strcat(bufOut, "Введён неверный пароль!"); 802b7a2: 4620 mov r0, r4 802b7a4: 490c ldr r1, [pc, #48] ; (802b7d8 ) 802b7a6: e001 b.n 802b7ac *lenBufOut = strlen(bufOut); return SEND_REQUIRED_YES; } else { strcat(bufOut, "Введены некорректные данные!"); 802b7a8: 490c ldr r1, [pc, #48] ; (802b7dc ) 802b7aa: 4620 mov r0, r4 802b7ac: f7f6 f9ee bl 8021b8c *lenBufOut = strlen(bufOut); 802b7b0: 4620 mov r0, r4 802b7b2: f7f6 fb5d bl 8021e70 802b7b6: 8030 strh r0, [r6, #0] return SEND_REQUIRED_YES; } } 802b7b8: 2000 movs r0, #0 802b7ba: b030 add sp, #192 ; 0xc0 802b7bc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802b7c0: 0803e20d .word 0x0803e20d 802b7c4: 0803b4ab .word 0x0803b4ab 802b7c8: 0803b4b5 .word 0x0803b4b5 802b7cc: 0803b4be .word 0x0803b4be 802b7d0: 2000ec9c .word 0x2000ec9c 802b7d4: 0803b4c7 .word 0x0803b4c7 802b7d8: 0803b528 .word 0x0803b528 802b7dc: 0803b4f2 .word 0x0803b4f2 0802b7e0 : * @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) { 802b7e0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802b7e4: b09d sub sp, #116 ; 0x74 802b7e6: 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; 802b7e8: 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) { 802b7ea: 4604 mov r4, r0 802b7ec: 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; 802b7ee: f88d 200a strb.w r2, [sp, #10] 802b7f2: f88d 200b strb.w r2, [sp, #11] struct fs_file file = {0, 0}; 802b7f6: 9205 str r2, [sp, #20] 802b7f8: 9206 str r2, [sp, #24] hs = arg; if (err == ERR_OK && p != NULL) 802b7fa: 2b00 cmp r3, #0 802b7fc: f040 8330 bne.w 802be60 { tcp_recved(pcb, p->tot_len); 802b800: 4608 mov r0, r1 uint8_t nameLen = 0, idLen = 0; struct fs_file file = {0, 0}; hs = arg; if (err == ERR_OK && p != NULL) 802b802: 2f00 cmp r7, #0 802b804: f000 8329 beq.w 802be5a { tcp_recved(pcb, p->tot_len); 802b808: 8939 ldrh r1, [r7, #8] 802b80a: f002 fbc5 bl 802df98 if (hs->file == NULL) 802b80e: f8d4 8000 ldr.w r8, [r4] 802b812: f1b8 0f00 cmp.w r8, #0 802b816: f040 831c bne.w 802be52 printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); 802b81a: f8df a2fc ldr.w sl, [pc, #764] ; 802bb18 { tcp_recved(pcb, p->tot_len); if (hs->file == NULL) { data = p->payload; 802b81e: 687e ldr r6, [r7, #4] /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802b820: 893a ldrh r2, [r7, #8] 802b822: f8df 92f0 ldr.w r9, [pc, #752] ; 802bb14 memcpy(receiveBuf, p->payload , receivedBufLen); 802b826: 4650 mov r0, sl 802b828: 4631 mov r1, r6 /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802b82a: f8a9 2000 strh.w r2, [r9] memcpy(receiveBuf, p->payload , receivedBufLen); 802b82e: f7f6 f88d bl 802194c receiveBuf[receivedBufLen] = '\0'; 802b832: f8b9 3000 ldrh.w r3, [r9] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802b836: 49a7 ldr r1, [pc, #668] ; (802bad4 ) printf(printBuf); */ receivedBufLen = p->tot_len; memcpy(receiveBuf, p->payload , receivedBufLen); receiveBuf[receivedBufLen] = '\0'; 802b838: f80a 8003 strb.w r8, [sl, r3] // printf("receive %s \r\n", receiveBuf); /* Get cookie "uname" value */ CookiePtr = strstr(receiveBuf, "uname="); 802b83c: 4650 mov r0, sl 802b83e: f7f6 fd97 bl 8022370 strncpy(CookieBuf, CookiePtr, 50); 802b842: f10d 093c add.w r9, 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="); 802b846: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802b848: 2232 movs r2, #50 ; 0x32 802b84a: 4648 mov r0, r9 802b84c: f7f6 fbc8 bl 8021fe0 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(name, 0, MAX_WEB_COOKIE_LEN); 802b850: 4641 mov r1, r8 802b852: 2210 movs r2, #16 802b854: a807 add r0, sp, #28 802b856: f7f6 f933 bl 8021ac0 GetCookieValue(CookieBuf, "uname=", name, &nameLen); 802b85a: f10d 030a add.w r3, sp, #10 802b85e: aa07 add r2, sp, #28 802b860: 499c ldr r1, [pc, #624] ; (802bad4 ) 802b862: 4648 mov r0, r9 802b864: f7ff fe1a bl 802b49c //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802b868: 4650 mov r0, sl 802b86a: 499b ldr r1, [pc, #620] ; (802bad8 ) 802b86c: f7f6 fd80 bl 8022370 strncpy(CookieBuf, CookiePtr, 50); //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802b870: f10d 0b2c add.w fp, sp, #44 ; 0x2c GetCookieValue(CookieBuf, "uname=", name, &nameLen); //printf("********CookieBuf2= %s\r\n", CookieBuf); //printf("********uname= %s\r\n", name); /* Get cookie "id" value */ CookiePtr = strstr(receiveBuf, "id="); 802b874: 4601 mov r1, r0 strncpy(CookieBuf, CookiePtr, 50); 802b876: 2232 movs r2, #50 ; 0x32 802b878: 4648 mov r0, r9 802b87a: f7f6 fbb1 bl 8021fe0 //printf("********CookieBuf1= %s\r\n", CookieBuf); memset(id, 0, MAX_WEB_COOKIE_LEN); 802b87e: 4641 mov r1, r8 802b880: 2210 movs r2, #16 802b882: 4658 mov r0, fp 802b884: f7f6 f91c bl 8021ac0 GetCookieValue(CookieBuf, "id=", id, &idLen); 802b888: 465a mov r2, fp 802b88a: f10d 030b add.w r3, sp, #11 802b88e: 4648 mov r0, r9 802b890: 4991 ldr r1, [pc, #580] ; (802bad8 ) 802b892: f7ff fe03 bl 802b49c /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; 802b896: 4b91 ldr r3, [pc, #580] ; (802badc ) 802b898: 22ff movs r2, #255 ; 0xff 802b89a: 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); 802b89c: 4b90 ldr r3, [pc, #576] ; (802bae0 ) uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { HTTP_GetUserCookie(user_id, CookieBuf, &idLen); 802b89e: 46ca mov sl, r9 /** * @brief Чтение Cookie пользователя */ static void HTTP_GetUserCookie(uint8_t user_id, char *str, uint8_t *len) { sprintf(str, "%s", users[user_id].cookie); 802b8a0: 2214 movs r2, #20 802b8a2: fb02 3208 mla r2, r2, r8, r3 802b8a6: 498f ldr r1, [pc, #572] ; (802bae4 ) 802b8a8: 9301 str r3, [sp, #4] 802b8aa: 4650 mov r0, sl 802b8ac: f7fb ff78 bl 80277a0 *len = strlen(str); 802b8b0: 4650 mov r0, sl 802b8b2: f7f6 fadd bl 8021e70 802b8b6: 4602 mov r2, r0 802b8b8: 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 ) { 802b8bc: b2d2 uxtb r2, r2 802b8be: 4658 mov r0, fp 802b8c0: 4651 mov r1, sl 802b8c2: f7f6 fb37 bl 8021f34 802b8c6: fa5f f988 uxtb.w r9, r8 802b8ca: 4a87 ldr r2, [pc, #540] ; (802bae8 ) 802b8cc: 9b01 ldr r3, [sp, #4] 802b8ce: b940 cbnz r0, 802b8e2 GetUserLevelInt(user_id, &seclevel); 802b8d0: 4648 mov r0, r9 802b8d2: 4982 ldr r1, [pc, #520] ; (802badc ) 802b8d4: 9201 str r2, [sp, #4] 802b8d6: f7fc fa5f bl 8027d98 Authenticated = true; 802b8da: 9a01 ldr r2, [sp, #4] 802b8dc: 2301 movs r3, #1 802b8de: 7013 strb r3, [r2, #0] break; 802b8e0: e00a b.n 802b8f8 } Authenticated = false; 802b8e2: 2100 movs r1, #0 802b8e4: 7011 strb r1, [r2, #0] 802b8e6: f108 0801 add.w r8, r8, #1 seclevel = 0xFF; 802b8ea: 4a7c ldr r2, [pc, #496] ; (802badc ) 802b8ec: 21ff movs r1, #255 ; 0xff /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802b8ee: f1b8 0f02 cmp.w r8, #2 GetUserLevelInt(user_id, &seclevel); Authenticated = true; break; } Authenticated = false; seclevel = 0xFF; 802b8f2: 7011 strb r1, [r2, #0] /* Id of currently logged-in user */ uint8_t user_id; /* Level of currently logged-in user */ seclevel = 0xFF; for (user_id = 0; user_id < MAX_WEB_USERS; user_id++) { 802b8f4: d1d4 bne.n 802b8a0 802b8f6: 46c1 mov r9, r8 } Authenticated = false; seclevel = 0xFF; } if ( Authenticated == false ) 802b8f8: 4b7b ldr r3, [pc, #492] ; (802bae8 ) { if (strncmp(data, "GET /main.css", 13) == 0) // + 802b8fa: 497c ldr r1, [pc, #496] ; (802baec ) } Authenticated = false; seclevel = 0xFF; } if ( Authenticated == false ) 802b8fc: 781b ldrb r3, [r3, #0] { if (strncmp(data, "GET /main.css", 13) == 0) // + 802b8fe: 4630 mov r0, r6 802b900: 220d movs r2, #13 } Authenticated = false; seclevel = 0xFF; } if ( Authenticated == false ) 802b902: 2b00 cmp r3, #0 802b904: f040 812e bne.w 802bb64 { if (strncmp(data, "GET /main.css", 13) == 0) // + 802b908: f7f6 fb14 bl 8021f34 802b90c: b900 cbnz r0, 802b910 802b90e: e12c b.n 802bb6a 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) // + 802b910: 4630 mov r0, r6 802b912: 4977 ldr r1, [pc, #476] ; (802baf0 ) 802b914: 220e movs r2, #14 802b916: f7f6 fb0d bl 8021f34 802b91a: b900 cbnz r0, 802b91e 802b91c: e12d b.n 802bb7a 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) // ? 802b91e: 4630 mov r0, r6 802b920: 4974 ldr r1, [pc, #464] ; (802baf4 ) 802b922: 2210 movs r2, #16 802b924: f7f6 fb06 bl 8021f34 802b928: b900 cbnz r0, 802b92c 802b92a: e12e b.n 802bb8a 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) 802b92c: 4630 mov r0, r6 802b92e: 4972 ldr r1, [pc, #456] ; (802baf8 ) 802b930: 220c movs r2, #12 802b932: f7f6 faff bl 8021f34 802b936: b900 cbnz r0, 802b93a 802b938: e137 b.n 802bbaa 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)) 802b93a: 4630 mov r0, r6 802b93c: 496f ldr r1, [pc, #444] ; (802bafc ) 802b93e: 220f movs r2, #15 802b940: f7f6 faf8 bl 8021f34 802b944: b120 cbz r0, 802b950 802b946: 4b6e ldr r3, [pc, #440] ; (802bb00 ) 802b948: 681b ldr r3, [r3, #0] 802b94a: 2b00 cmp r3, #0 802b94c: f000 80a8 beq.w 802baa0 { uint32_t i=0,size=0, S=1; int32_t j=0; char sizestring[6], *ptr; ContentLengthOffset =0; 802b950: 4a6c ldr r2, [pc, #432] ; (802bb04 ) 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); 802b952: 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; 802b956: 2300 movs r3, #0 802b958: 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) 802b95e: eb06 0008 add.w r0, r6, r8 802b962: 4969 ldr r1, [pc, #420] ; (802bb08 ) 802b964: 2210 movs r2, #16 802b966: f7f6 fae5 bl 8021f34 802b96a: b920 cbnz r0, 802b976 { ContentLengthOffset = i+16; 802b96c: 4b65 ldr r3, [pc, #404] ; (802bb04 ) 802b96e: f108 0210 add.w r2, r8, #16 802b972: 601a str r2, [r3, #0] 802b974: e003 b.n 802b97e 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) 802b97e: 4b61 ldr r3, [pc, #388] ; (802bb04 ) 802b980: 681a ldr r2, [r3, #0] 802b982: 4618 mov r0, r3 802b984: b90a cbnz r2, 802b98a * @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; 802b986: 2200 movs r2, #0 802b988: e023 b.n 802b9d2 } /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); 802b98a: eb06 0c02 add.w ip, r6, r2 } } /* read Content-Length value */ if (ContentLengthOffset) { i=0; 802b98e: 2300 movs r3, #0 802b990: e004 b.n 802b99c ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) { sizestring[i] = *(ptr+i); 802b992: f10d 0e0c add.w lr, sp, #12 802b996: f803 100e strb.w r1, [r3, lr] i++; 802b99a: 3301 adds r3, #1 /* read Content-Length value */ if (ContentLengthOffset) { i=0; ptr = (char*)(data + ContentLengthOffset); while(*(ptr+i)!=0x0d) 802b99c: f81c 1003 ldrb.w r1, [ip, r3] 802b9a0: 290d cmp r1, #13 802b9a2: eb03 0e02 add.w lr, r3, r2 802b9a6: d1f4 bne.n 802b992 802b9a8: f8c0 e000 str.w lr, [r0] { sizestring[i] = *(ptr+i); i++; ContentLengthOffset++; } if (i>0) 802b9ac: 2b00 cmp r3, #0 802b9ae: d0ea beq.n 802b986 { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802b9b0: 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; 802b9b2: 2101 movs r1, #1 802b9b4: 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; 802b9b6: 200a movs r0, #10 802b9b8: e009 b.n 802b9ce if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) { size += (sizestring[j]-0x30)*S; 802b9ba: f10d 0e0c add.w lr, sp, #12 802b9be: f813 e00e ldrb.w lr, [r3, lr] 802b9c2: f1ae 0e30 sub.w lr, lr, #48 ; 0x30 802b9c6: fb01 220e mla r2, r1, lr, r2 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802b9ca: 3b01 subs r3, #1 { size += (sizestring[j]-0x30)*S; S=S*10; 802b9cc: 4341 muls r1, r0 ContentLengthOffset++; } if (i>0) { /* transform string data into numeric format */ for(j=i-1;j>=0;j--) 802b9ce: 2b00 cmp r3, #0 802b9d0: daf3 bge.n 802b9ba 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); 802b9d2: f8df 8150 ldr.w r8, [pc, #336] ; 802bb24 //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802b9d6: 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); 802b9d8: f8c8 2000 str.w r2, [r8] //printf("Content-length: %d\r\n", (int)post_data_count); if (post_data_count < MAX_POST_REQ_LEN) { 802b9dc: d857 bhi.n 802ba8e memset(post_req_data, 0, MAX_POST_REQ_LEN); 802b9de: 484b ldr r0, [pc, #300] ; (802bb0c ) /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802b9e0: f8df 9130 ldr.w r9, [pc, #304] ; 802bb14 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); 802b9e4: 2100 movs r1, #0 802b9e6: f44f 7280 mov.w r2, #256 ; 0x100 802b9ea: f7f6 f869 bl 8021ac0 /* parse packet for "\r\n\r\n" */ for (i = 0; i < receivedBufLen; i++) 802b9ee: f04f 0800 mov.w r8, #0 802b9f2: e00b b.n 802ba0c { if (strncmp ((char*)(data+i), "\r\n\r\n", 4) == 0) 802b9f4: eb06 0008 add.w r0, r6, r8 802b9f8: 4945 ldr r1, [pc, #276] ; (802bb10 ) 802b9fa: 2204 movs r2, #4 802b9fc: f7f6 fa9a bl 8021f34 802ba00: b910 cbnz r0, 802ba08 { offset = i+4; 802ba02: f108 0804 add.w r8, r8, #4 //printf("offset: %d\r\n", (int)offset); break; 802ba06: e007 b.n 802ba18 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++) 802ba08: f108 0801 add.w r8, r8, #1 802ba0c: f8b9 3000 ldrh.w r3, [r9] 802ba10: 4598 cmp r8, r3 802ba12: d3ef bcc.n 802b9f4 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; 802ba14: f04f 0800 mov.w r8, #0 //printf("offset: %d\r\n", (int)offset); break; } } req_data_received = receivedBufLen - offset; 802ba18: 4b3e ldr r3, [pc, #248] ; (802bb14 ) 802ba1a: f8b3 a000 ldrh.w sl, [r3] 802ba1e: ebc8 0a0a rsb sl, r8, sl //printf("req data received: %d\r\n", (int)req_data_received); /* Check if "\r\n\r\n" was found */ if (offset != 0) { 802ba22: f1b8 0f00 cmp.w r8, #0 802ba26: d015 beq.n 802ba54 /* if data was splited in two packets */ if (req_data_received < post_data_count) { 802ba28: f8df 90f8 ldr.w r9, [pc, #248] ; 802bb24 /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802ba2c: 4837 ldr r0, [pc, #220] ; (802bb0c ) /* 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) { 802ba2e: f8d9 2000 ldr.w r2, [r9] 802ba32: 4592 cmp sl, r2 802ba34: d20b bcs.n 802ba4e /* Copy request data to buffer */ snprintf(post_req_data, req_data_received, "%s", receiveBuf); 802ba36: 4b38 ldr r3, [pc, #224] ; (802bb18 ) 802ba38: 4a2a ldr r2, [pc, #168] ; (802bae4 ) 802ba3a: 4651 mov r1, sl 802ba3c: f7fb fe92 bl 8027764 //printf("copied: %d\r\n", (int)req_data_received); post_data_count -= req_data_received; 802ba40: f8d9 3000 ldr.w r3, [r9] 802ba44: ebca 0303 rsb r3, sl, r3 802ba48: f8c9 3000 str.w r3, [r9] 802ba4c: e201 b.n 802be52 } /* if data received completely */ else { strncat(post_req_data, (char *)(data + offset), post_data_count); 802ba4e: eb06 0108 add.w r1, r6, r8 802ba52: e02b b.n 802baac /* request was fragmented before "\r\n\r\n" */ else { //printf("no data found!\r\n"); /* wait next packet */ log_post_reqn++; 802ba54: 4e2a ldr r6, [pc, #168] ; (802bb00 ) 802ba56: 6833 ldr r3, [r6, #0] 802ba58: 3301 adds r3, #1 /* wait max 2 requests */ if (log_post_reqn > 1) { 802ba5a: 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++; 802ba5c: 6033 str r3, [r6, #0] /* wait max 2 requests */ if (log_post_reqn > 1) { 802ba5e: f240 81f8 bls.w 802be52 /* Redirect to login page */ fs_open("/login.html", &file); 802ba62: a905 add r1, sp, #20 802ba64: 482d ldr r0, [pc, #180] ; (802bb1c ) 802ba66: f7ff f805 bl 802aa74 hs->file = file.data; 802ba6a: 9b05 ldr r3, [sp, #20] 802ba6c: 6023 str r3, [r4, #0] hs->left = file.len; 802ba6e: 9b06 ldr r3, [sp, #24] send_data(pcb, hs); 802ba70: 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; 802ba72: 6063 str r3, [r4, #4] send_data(pcb, hs); 802ba74: 4621 mov r1, r4 802ba76: f7ff f839 bl 802aaec tcp_sent(pcb, http_sent); 802ba7a: 4628 mov r0, r5 802ba7c: 4928 ldr r1, [pc, #160] ; (802bb20 ) 802ba7e: f002 fac1 bl 802e004 /* End reqest */ post_data_count = 0; 802ba82: 4b28 ldr r3, [pc, #160] ; (802bb24 ) log_post_reqn = 0; 802ba84: 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; 802ba88: f8c3 8000 str.w r8, [r3] 802ba8c: e1e1 b.n 802be52 log_post_reqn = 0; } } } else { printf("Too long POST request!\r\n"); 802ba8e: 4826 ldr r0, [pc, #152] ; (802bb28 ) 802ba90: f7fb fe3a bl 8027708 /* Ignore request */ post_data_count = 0; log_post_reqn = 0; 802ba94: 4a1a ldr r2, [pc, #104] ; (802bb00 ) } } else { printf("Too long POST request!\r\n"); /* Ignore request */ post_data_count = 0; 802ba96: 2300 movs r3, #0 802ba98: f8c8 3000 str.w r3, [r8] log_post_reqn = 0; 802ba9c: 6013 str r3, [r2, #0] 802ba9e: e05f b.n 802bb60 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (post_data_count > 0) 802baa0: 4b20 ldr r3, [pc, #128] ; (802bb24 ) 802baa2: 681a ldr r2, [r3, #0] 802baa4: 2a00 cmp r2, #0 802baa6: d05b beq.n 802bb60 { strncat(post_req_data, data, post_data_count); 802baa8: 4818 ldr r0, [pc, #96] ; (802bb0c ) 802baaa: 4631 mov r1, r6 802baac: f7f6 fa10 bl 8021ed0 //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) { 802bab0: 4816 ldr r0, [pc, #88] ; (802bb0c ) 802bab2: f8df 807c ldr.w r8, [pc, #124] ; 802bb30 802bab6: 4e1d ldr r6, [pc, #116] ; (802bb2c ) 802bab8: f7f6 f9da bl 8021e70 802babc: 4641 mov r1, r8 802babe: b282 uxth r2, r0 802bac0: 4633 mov r3, r6 802bac2: 4812 ldr r0, [pc, #72] ; (802bb0c ) 802bac4: f7ff fa16 bl 802aef4 802bac8: bba0 cbnz r0, 802bb34 hs->file = sendBuf; 802baca: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 802bace: 8833 ldrh r3, [r6, #0] 802bad0: e037 b.n 802bb42 802bad2: bf00 nop 802bad4: 0803b2b1 .word 0x0803b2b1 802bad8: 0803b2c6 .word 0x0803b2c6 802badc: 200015e4 .word 0x200015e4 802bae0: 2000fbfc .word 0x2000fbfc 802bae4: 08036d46 .word 0x08036d46 802bae8: 20002ad9 .word 0x20002ad9 802baec: 0803b554 .word 0x0803b554 802baf0: 0803b562 .word 0x0803b562 802baf4: 0803b571 .word 0x0803b571 802baf8: 0803b582 .word 0x0803b582 802bafc: 0803b58f .word 0x0803b58f 802bb00: 2000fbf8 .word 0x2000fbf8 802bb04: 20002adc .word 0x20002adc 802bb08: 0803b064 .word 0x0803b064 802bb0c: 2000faf8 .word 0x2000faf8 802bb10: 0803b6a5 .word 0x0803b6a5 802bb14: 20002ae2 .word 0x20002ae2 802bb18: 2000f51c .word 0x2000f51c 802bb1c: 0803b59f .word 0x0803b59f 802bb20: 0802ab5f .word 0x0802ab5f 802bb24: 2000fc24 .word 0x2000fc24 802bb28: 0803b5ab .word 0x0803b5ab 802bb2c: 20002ae0 .word 0x20002ae0 802bb30: 2000ed4c .word 0x2000ed4c tcp_sent(pcb, http_sent); } else { /* Redirect to login page */ fs_open("/login.html", &file); 802bb34: 488e ldr r0, [pc, #568] ; (802bd70 ) 802bb36: a905 add r1, sp, #20 802bb38: f7fe ff9c bl 802aa74 hs->file = file.data; 802bb3c: 9b05 ldr r3, [sp, #20] 802bb3e: 6023 str r3, [r4, #0] hs->left = file.len; 802bb40: 9b06 ldr r3, [sp, #24] 802bb42: 6063 str r3, [r4, #4] send_data(pcb, hs); 802bb44: 4628 mov r0, r5 802bb46: 4621 mov r1, r4 802bb48: f7fe ffd0 bl 802aaec tcp_sent(pcb, http_sent); 802bb4c: 4628 mov r0, r5 802bb4e: 4989 ldr r1, [pc, #548] ; (802bd74 ) 802bb50: f002 fa58 bl 802e004 } /* End reqest */ post_data_count = 0; 802bb54: 4a88 ldr r2, [pc, #544] ; (802bd78 ) 802bb56: 2300 movs r3, #0 802bb58: 6013 str r3, [r2, #0] log_post_reqn = 0; 802bb5a: 4a88 ldr r2, [pc, #544] ; (802bd7c ) 802bb5c: 6013 str r3, [r2, #0] 802bb5e: e178 b.n 802be52 } else { fs_open("/login.html", &file); 802bb60: 4883 ldr r0, [pc, #524] ; (802bd70 ) 802bb62: e167 b.n 802be34 } else if ( Authenticated == true ) { if (strncmp(data, "GET /main.css", 13) == 0) // + 802bb64: f7f6 f9e6 bl 8021f34 802bb68: b908 cbnz r0, 802bb6e { fs_open("/main.css", &file); 802bb6a: 4885 ldr r0, [pc, #532] ; (802bd80 ) 802bb6c: e162 b.n 802be34 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) // + 802bb6e: 4630 mov r0, r6 802bb70: 4984 ldr r1, [pc, #528] ; (802bd84 ) 802bb72: 220e movs r2, #14 802bb74: f7f6 f9de bl 8021f34 802bb78: b908 cbnz r0, 802bb7e { fs_open("/rotek.png", &file); 802bb7a: 4883 ldr r0, [pc, #524] ; (802bd88 ) 802bb7c: e15a b.n 802be34 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) // ? 802bb7e: 4630 mov r0, r6 802bb80: 4982 ldr r1, [pc, #520] ; (802bd8c ) 802bb82: 2210 movs r2, #16 802bb84: f7f6 f9d6 bl 8021f34 802bb88: b908 cbnz r0, 802bb8e { fs_open("/favicon.ico", &file); 802bb8a: 4881 ldr r0, [pc, #516] ; (802bd90 ) 802bb8c: e152 b.n 802be34 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) // + 802bb8e: 4630 mov r0, r6 802bb90: 4980 ldr r1, [pc, #512] ; (802bd94 ) 802bb92: 220c movs r2, #12 802bb94: f7f6 f9ce bl 8021f34 802bb98: b908 cbnz r0, 802bb9e { fs_open("/main.js", &file); 802bb9a: 487f ldr r0, [pc, #508] ; (802bd98 ) 802bb9c: e14a b.n 802be34 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /role.js", 12) == 0) 802bb9e: 4630 mov r0, r6 802bba0: 497e ldr r1, [pc, #504] ; (802bd9c ) 802bba2: 220c movs r2, #12 802bba4: f7f6 f9c6 bl 8021f34 802bba8: b908 cbnz r0, 802bbae { fs_open("/role.js", &file); 802bbaa: 487d ldr r0, [pc, #500] ; (802bda0 ) 802bbac: e142 b.n 802be34 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.html", 18) == 0) // + 802bbae: 4630 mov r0, r6 802bbb0: 497c ldr r1, [pc, #496] ; (802bda4 ) 802bbb2: 2212 movs r2, #18 802bbb4: f7f6 f9be bl 8021f34 802bbb8: b918 cbnz r0, 802bbc2 { HTTP_UpdateUserLoginTime(user_id); 802bbba: 4648 mov r0, r9 802bbbc: f7fe ff48 bl 802aa50 802bbc0: e09c b.n 802bcfc hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /info.html", 14) == 0) // + 802bbc2: 4630 mov r0, r6 802bbc4: 4978 ldr r1, [pc, #480] ; (802bda8 ) 802bbc6: 220e movs r2, #14 802bbc8: f7f6 f9b4 bl 8021f34 802bbcc: b918 cbnz r0, 802bbd6 { HTTP_UpdateUserLoginTime(user_id); 802bbce: 4648 mov r0, r9 802bbd0: f7fe ff3e bl 802aa50 802bbd4: e064 b.n 802bca0 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) // + 802bbd6: 4630 mov r0, r6 802bbd8: 4974 ldr r1, [pc, #464] ; (802bdac ) 802bbda: 2210 movs r2, #16 802bbdc: f7f6 f9aa bl 8021f34 802bbe0: b940 cbnz r0, 802bbf4 { HTTP_GetParamsPage1(sendBuf); 802bbe2: 4e73 ldr r6, [pc, #460] ; (802bdb0 ) 802bbe4: 4630 mov r0, r6 802bbe6: f000 f971 bl 802becc hs->file = sendBuf; 802bbea: 6026 str r6, [r4, #0] hs->left = strlen(sendBuf); 802bbec: 4630 mov r0, r6 802bbee: f7f6 f93f bl 8021e70 802bbf2: e041 b.n 802bc78 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + 802bbf4: 4630 mov r0, r6 802bbf6: 496f ldr r1, [pc, #444] ; (802bdb4 ) 802bbf8: 2211 movs r2, #17 802bbfa: f7f6 f99b bl 8021f34 802bbfe: b980 cbnz r0, 802bc22 { SET_PAGE = SET_PAGE_PAGE2; 802bc00: 4b6d ldr r3, [pc, #436] ; (802bdb8 ) if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802bc02: f8df 81ac ldr.w r8, [pc, #428] ; 802bdb0 802bc06: 4e6d ldr r6, [pc, #436] ; (802bdbc ) 802bc08: 486d ldr r0, [pc, #436] ; (802bdc0 ) send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + { SET_PAGE = SET_PAGE_PAGE2; 802bc0a: 2202 movs r2, #2 802bc0c: 701a strb r2, [r3, #0] if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802bc0e: 4b6d ldr r3, [pc, #436] ; (802bdc4 ) 802bc10: 4641 mov r1, r8 802bc12: 881a ldrh r2, [r3, #0] 802bc14: 4633 mov r3, r6 802bc16: f7ff fc15 bl 802b444 802bc1a: 2800 cmp r0, #0 802bc1c: f040 8119 bne.w 802be52 802bc20: e100 b.n 802be24 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /settings.cgi", 18) == 0) 802bc22: 4630 mov r0, r6 802bc24: 4968 ldr r1, [pc, #416] ; (802bdc8 ) 802bc26: 2212 movs r2, #18 802bc28: f7f6 f984 bl 8021f34 802bc2c: 4680 mov r8, r0 802bc2e: bb28 cbnz r0, 802bc7c { strncat(&receiveBuf, " ", 1); 802bc30: 2201 movs r2, #1 802bc32: 4966 ldr r1, [pc, #408] ; (802bdcc ) 802bc34: 4862 ldr r0, [pc, #392] ; (802bdc0 ) HTTP_SetSettings(receiveBuf, receivedBufLen); memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802bc36: 4e5e ldr r6, [pc, #376] ; (802bdb0 ) tcp_sent(pcb, http_sent); }*/ } else if (strncmp(data, "POST /settings.cgi", 18) == 0) { strncat(&receiveBuf, " ", 1); 802bc38: f7f6 f94a bl 8021ed0 HTTP_SetSettings(receiveBuf, receivedBufLen); 802bc3c: 4b61 ldr r3, [pc, #388] ; (802bdc4 ) 802bc3e: 4860 ldr r0, [pc, #384] ; (802bdc0 ) 802bc40: 8819 ldrh r1, [r3, #0] 802bc42: f7ff fa13 bl 802b06c memset(sendBuf, 0, SEND_BUF_MAX_LEN); 802bc46: f44f 62fa mov.w r2, #2000 ; 0x7d0 802bc4a: 4641 mov r1, r8 802bc4c: 4630 mov r0, r6 802bc4e: f7f5 ff37 bl 8021ac0 strcpy(sendBuf, "HTTP/1.1 200 OK\r\n"); 802bc52: 495f ldr r1, [pc, #380] ; (802bdd0 ) 802bc54: 4630 mov r0, r6 802bc56: f7f6 f8ad bl 8021db4 strcat(sendBuf, "\r\n\r\n"); 802bc5a: 495e ldr r1, [pc, #376] ; (802bdd4 ) 802bc5c: 4630 mov r0, r6 802bc5e: f7f5 ff95 bl 8021b8c strcat(sendBuf,"\r\n\r\n"); 802bc62: 495d ldr r1, [pc, #372] ; (802bdd8 ) 802bc64: 4630 mov r0, r6 802bc66: f7f5 ff91 bl 8021b8c sendBufLoadLen = strlen(sendBuf); 802bc6a: 4630 mov r0, r6 802bc6c: f7f6 f900 bl 8021e70 802bc70: 4b52 ldr r3, [pc, #328] ; (802bdbc ) 802bc72: 8018 strh r0, [r3, #0] hs->file = sendBuf; 802bc74: 6026 str r6, [r4, #0] hs->left = sendBufLoadLen; 802bc76: b280 uxth r0, r0 802bc78: 6060 str r0, [r4, #4] 802bc7a: e0e2 b.n 802be42 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /info.cgi", 13) == 0) // + 802bc7c: 4630 mov r0, r6 802bc7e: 4957 ldr r1, [pc, #348] ; (802bddc ) 802bc80: 220d movs r2, #13 802bc82: f7f6 f957 bl 8021f34 802bc86: b968 cbnz r0, 802bca4 { if (HTTP_InfoPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 802bc88: 4b4e ldr r3, [pc, #312] ; (802bdc4 ) 802bc8a: f8df 8124 ldr.w r8, [pc, #292] ; 802bdb0 802bc8e: 4e4b ldr r6, [pc, #300] ; (802bdbc ) 802bc90: 881a ldrh r2, [r3, #0] 802bc92: 484b ldr r0, [pc, #300] ; (802bdc0 ) 802bc94: 4641 mov r1, r8 802bc96: 4633 mov r3, r6 802bc98: f7ff fcde bl 802b658 802bc9c: b900 cbnz r0, 802bca0 802bc9e: e0c1 b.n 802be24 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { fs_open("/info.html", &file); 802bca0: 484f ldr r0, [pc, #316] ; (802bde0 ) 802bca2: e0c7 b.n 802be34 send_data(pcb, hs); tcp_sent(pcb, http_sent); } } /* Тест АКБ ИБП */ else if (strncmp(data, "POST /bat_test.cgi", 18) == 0) 802bca4: 4630 mov r0, r6 802bca6: 494f ldr r1, [pc, #316] ; (802bde4 ) 802bca8: 2212 movs r2, #18 802bcaa: f7f6 f943 bl 8021f34 802bcae: b950 cbnz r0, 802bcc6 { HTTP_UPSTest(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802bcb0: f8df 80fc ldr.w r8, [pc, #252] ; 802bdb0 802bcb4: 4e41 ldr r6, [pc, #260] ; (802bdbc ) 802bcb6: 4b43 ldr r3, [pc, #268] ; (802bdc4 ) 802bcb8: 4841 ldr r0, [pc, #260] ; (802bdc0 ) 802bcba: 881a ldrh r2, [r3, #0] 802bcbc: 4641 mov r1, r8 802bcbe: 4633 mov r3, r6 802bcc0: f7fe ffae bl 802ac20 802bcc4: e0ae b.n 802be24 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Выключение ИБП */ else if (strncmp(data, "POST /ups_power.cgi", 19) == 0) 802bcc6: 4630 mov r0, r6 802bcc8: 4947 ldr r1, [pc, #284] ; (802bde8 ) 802bcca: 2213 movs r2, #19 802bccc: f7f6 f932 bl 8021f34 802bcd0: b950 cbnz r0, 802bce8 { HTTP_UPSshutdown(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802bcd2: f8df 80dc ldr.w r8, [pc, #220] ; 802bdb0 802bcd6: 4e39 ldr r6, [pc, #228] ; (802bdbc ) 802bcd8: 4b3a ldr r3, [pc, #232] ; (802bdc4 ) 802bcda: 4839 ldr r0, [pc, #228] ; (802bdc0 ) 802bcdc: 881a ldrh r2, [r3, #0] 802bcde: 4641 mov r1, r8 802bce0: 4633 mov r3, r6 802bce2: f7ff f81f bl 802ad24 802bce6: e09d b.n 802be24 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Сброс настроек и сохранине */ else if (strncmp(data, "GET /reset.cgi", 14) == 0) 802bce8: 4630 mov r0, r6 802bcea: 4940 ldr r1, [pc, #256] ; (802bdec ) 802bcec: 220e movs r2, #14 802bcee: f7f6 f921 bl 8021f34 802bcf2: b928 cbnz r0, 802bd00 { HTTP_ResetSettings(); 802bcf4: f000 fcd4 bl 802c6a0 HTTP_SaveSettings(); 802bcf8: f000 fcd9 bl 802c6ae fs_open("/settings.html", &file); 802bcfc: 483c ldr r0, [pc, #240] ; (802bdf0 ) 802bcfe: e099 b.n 802be34 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Перезагрузка контроллера */ else if (strncmp(data, "GET /reboot.cgi", 15) == 0) 802bd00: 4630 mov r0, r6 802bd02: 493c ldr r1, [pc, #240] ; (802bdf4 ) 802bd04: 220f movs r2, #15 802bd06: f7f6 f915 bl 8021f34 802bd0a: b910 cbnz r0, 802bd12 { HTTP_Reboot(); 802bd0c: f000 fcd1 bl 802c6b2 802bd10: e09f b.n 802be52 } /* Подтверждение новых сетевых настроек */ else if (strncmp(data, "GET /confirm.cgi", 16) == 0) 802bd12: 4630 mov r0, r6 802bd14: 4938 ldr r1, [pc, #224] ; (802bdf8 ) 802bd16: 2210 movs r2, #16 802bd18: f7f6 f90c bl 8021f34 802bd1c: b920 cbnz r0, 802bd28 { SetWebReinitFlag(false); 802bd1e: f7fc f983 bl 8028028 SetConfirmWebParamsFlag(); 802bd22: f7fc f987 bl 8028034 802bd26: e084 b.n 802be32 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Проверка пароля, переход в bootloader */ else if (strncmp(data, "POST /fw_update.cgi", 18) == 0) 802bd28: 4630 mov r0, r6 802bd2a: 4934 ldr r1, [pc, #208] ; (802bdfc ) 802bd2c: 2212 movs r2, #18 802bd2e: f7f6 f901 bl 8021f34 802bd32: b950 cbnz r0, 802bd4a { HTTP_ConfirmBootPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802bd34: f8df 8078 ldr.w r8, [pc, #120] ; 802bdb0 802bd38: 4e20 ldr r6, [pc, #128] ; (802bdbc ) 802bd3a: 4b22 ldr r3, [pc, #136] ; (802bdc4 ) 802bd3c: 4820 ldr r0, [pc, #128] ; (802bdc0 ) 802bd3e: 881a ldrh r2, [r3, #0] 802bd40: 4641 mov r1, r8 802bd42: 4633 mov r3, r6 802bd44: f7ff f896 bl 802ae74 802bd48: e06c b.n 802be24 hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Смена пароля пользователя */ else if (strncmp(data, "POST /changepwd.cgi", 19) == 0) 802bd4a: 4630 mov r0, r6 802bd4c: 492c ldr r1, [pc, #176] ; (802be00 ) 802bd4e: 2213 movs r2, #19 802bd50: f7f6 f8f0 bl 8021f34 802bd54: 2800 cmp r0, #0 802bd56: d155 bne.n 802be04 { HTTP_ChangeUserPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802bd58: f8df 8054 ldr.w r8, [pc, #84] ; 802bdb0 802bd5c: 4e17 ldr r6, [pc, #92] ; (802bdbc ) 802bd5e: 4b19 ldr r3, [pc, #100] ; (802bdc4 ) 802bd60: 4817 ldr r0, [pc, #92] ; (802bdc0 ) 802bd62: 881a ldrh r2, [r3, #0] 802bd64: 4641 mov r1, r8 802bd66: 4633 mov r3, r6 802bd68: f7ff fca2 bl 802b6b0 802bd6c: e05a b.n 802be24 802bd6e: bf00 nop 802bd70: 0803b59f .word 0x0803b59f 802bd74: 0802ab5f .word 0x0802ab5f 802bd78: 2000fc24 .word 0x2000fc24 802bd7c: 2000fbf8 .word 0x2000fbf8 802bd80: 0803b558 .word 0x0803b558 802bd84: 0803b562 .word 0x0803b562 802bd88: 0803b566 .word 0x0803b566 802bd8c: 0803b571 .word 0x0803b571 802bd90: 0803b575 .word 0x0803b575 802bd94: 0803b5c4 .word 0x0803b5c4 802bd98: 0803b5c8 .word 0x0803b5c8 802bd9c: 0803b582 .word 0x0803b582 802bda0: 0803b586 .word 0x0803b586 802bda4: 0803b5d1 .word 0x0803b5d1 802bda8: 0803b5e4 .word 0x0803b5e4 802bdac: 0803b5f3 .word 0x0803b5f3 802bdb0: 2000ed4c .word 0x2000ed4c 802bdb4: 0803b604 .word 0x0803b604 802bdb8: 20002ad8 .word 0x20002ad8 802bdbc: 20002ae0 .word 0x20002ae0 802bdc0: 2000f51c .word 0x2000f51c 802bdc4: 20002ae2 .word 0x20002ae2 802bdc8: 0803b616 .word 0x0803b616 802bdcc: 08036e41 .word 0x08036e41 802bdd0: 0803b629 .word 0x0803b629 802bdd4: 0803b6a5 .word 0x0803b6a5 802bdd8: 0803b63b .word 0x0803b63b 802bddc: 0803b6aa .word 0x0803b6aa 802bde0: 0803b5e8 .word 0x0803b5e8 802bde4: 0803b6b8 .word 0x0803b6b8 802bde8: 0803b6cb .word 0x0803b6cb 802bdec: 0803b6df .word 0x0803b6df 802bdf0: 0803b5d5 .word 0x0803b5d5 802bdf4: 0803b6ee .word 0x0803b6ee 802bdf8: 0803b6fe .word 0x0803b6fe 802bdfc: 0803b71b .word 0x0803b71b 802be00: 0803b72f .word 0x0803b72f hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // На производстве else if (strncmp(data, "GET /setProdate.cgi", 19) == 0) 802be04: 4630 mov r0, r6 802be06: 4918 ldr r1, [pc, #96] ; (802be68 ) 802be08: 2213 movs r2, #19 802be0a: f7f6 f893 bl 8021f34 802be0e: b968 cbnz r0, 802be2c { HTTP_Prodate(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 802be10: 4b16 ldr r3, [pc, #88] ; (802be6c ) 802be12: f8df 806c ldr.w r8, [pc, #108] ; 802be80 802be16: 4e16 ldr r6, [pc, #88] ; (802be70 ) 802be18: 881a ldrh r2, [r3, #0] 802be1a: 4816 ldr r0, [pc, #88] ; (802be74 ) 802be1c: 4641 mov r1, r8 802be1e: 4633 mov r3, r6 802be20: f7ff fb7e bl 802b520 hs->file = sendBuf; 802be24: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 802be28: 8833 ldrh r3, [r6, #0] 802be2a: e009 b.n 802be40 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { HTTP_UpdateUserLoginTime(user_id); 802be2c: 4648 mov r0, r9 802be2e: f7fe fe0f bl 802aa50 fs_open("/index.html", &file); // + 802be32: 4811 ldr r0, [pc, #68] ; (802be78 ) 802be34: a905 add r1, sp, #20 802be36: f7fe fe1d bl 802aa74 hs->file = file.data; 802be3a: 9b05 ldr r3, [sp, #20] 802be3c: 6023 str r3, [r4, #0] hs->left = file.len; 802be3e: 9b06 ldr r3, [sp, #24] 802be40: 6063 str r3, [r4, #4] send_data(pcb, hs); 802be42: 4628 mov r0, r5 802be44: 4621 mov r1, r4 802be46: f7fe fe51 bl 802aaec tcp_sent(pcb, http_sent); 802be4a: 4628 mov r0, r5 802be4c: 490b ldr r1, [pc, #44] ; (802be7c ) 802be4e: f002 f8d9 bl 802e004 } } } pbuf_free(p); 802be52: 4638 mov r0, r7 802be54: f001 fe0e bl 802da74 close_conn(pcb,hs); 802be58: 4628 mov r0, r5 } if (err == ERR_OK && p == NULL) { close_conn(pcb, hs); 802be5a: 4621 mov r1, r4 802be5c: f7fe fe69 bl 802ab32 } return ERR_OK; } 802be60: 2000 movs r0, #0 802be62: b01d add sp, #116 ; 0x74 802be64: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802be68: 0803b743 .word 0x0803b743 802be6c: 20002ae2 .word 0x20002ae2 802be70: 20002ae0 .word 0x20002ae0 802be74: 2000f51c .word 0x2000f51c 802be78: 0803b70f .word 0x0803b70f 802be7c: 0802ab5f .word 0x0802ab5f 802be80: 2000ed4c .word 0x2000ed4c 0802be84 : 802be84: f3bf 8f4f dsb sy (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 802be88: 4a04 ldr r2, [pc, #16] ; (802be9c ) 802be8a: 4b05 ldr r3, [pc, #20] ; (802bea0 ) 802be8c: 68d1 ldr r1, [r2, #12] 802be8e: f401 61e0 and.w r1, r1, #1792 ; 0x700 802be92: 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) | 802be94: 60d3 str r3, [r2, #12] 802be96: f3bf 8f4f dsb sy 802be9a: e7fe b.n 802be9a 802be9c: e000ed00 .word 0xe000ed00 802bea0: 05fa0004 .word 0x05fa0004 0802bea4 : /** * @brief */ void vTaskReboot(void * pvParameters) { 802bea4: b508 push {r3, lr} for (;;) { mode = *(bool*)pvParameters; if (mode) 802bea6: 7803 ldrb r3, [r0, #0] 802bea8: b133 cbz r3, 802beb8 { SetLoadMode(); 802beaa: f7fc f8b1 bl 8028010 */ void HTTP_SaveSettings(void) { // taskENTER_CRITICAL(); SETTINGS_Save(); 802beae: f7fc fc35 bl 802871c if (mode) { SetLoadMode(); HTTP_SaveSettings(); SNMP_SendUserTrap(FW_VERSION_UPDATE); 802beb2: 2001 movs r0, #1 802beb4: f009 fd60 bl 8035978 vTaskDelay(1010); NVIC_SystemReset(); } else { vTaskDelay(1000); 802beb8: f44f 707a mov.w r0, #1000 ; 0x3e8 802bebc: f7fd fff2 bl 8029ea4 /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 802bec0: f240 30f2 movw r0, #1010 ; 0x3f2 802bec4: f7fd ffee bl 8029ea4 NVIC_SystemReset(); 802bec8: f7ff ffdc bl 802be84 0802becc : /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802becc: b510 push {r4, lr} char str[40]; uint8_t len; memset(buf, 0, 1000); 802bece: f44f 727a mov.w r2, #1000 ; 0x3e8 /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 802bed2: b08c sub sp, #48 ; 0x30 802bed4: 4604 mov r4, r0 char str[40]; uint8_t len; memset(buf, 0, 1000); 802bed6: 2100 movs r1, #0 802bed8: f7f5 fdf2 bl 8021ac0 // Headers для поддержки saffari strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 802bedc: 4620 mov r0, r4 802bede: 497e ldr r1, [pc, #504] ; (802c0d8 ) 802bee0: f7f5 ff68 bl 8021db4 // Параметры UPS GetInputVoltageStr(str, &len); 802bee4: a802 add r0, sp, #8 802bee6: f10d 0107 add.w r1, sp, #7 802beea: f7fb fc9b bl 8027824 strcat(buf, "{\"AC\":\""); 802beee: 4620 mov r0, r4 802bef0: 497a ldr r1, [pc, #488] ; (802c0dc ) 802bef2: f7f5 fe4b bl 8021b8c strncat(buf, str, len); 802bef6: f89d 2007 ldrb.w r2, [sp, #7] 802befa: a902 add r1, sp, #8 802befc: 4620 mov r0, r4 802befe: f7f5 ffe7 bl 8021ed0 GetOutputVoltageStr(str, &len); 802bf02: a802 add r0, sp, #8 802bf04: f10d 0107 add.w r1, sp, #7 802bf08: f7fb fca2 bl 8027850 strcat(buf, "\",\"DC\":\""); 802bf0c: 4620 mov r0, r4 802bf0e: 4974 ldr r1, [pc, #464] ; (802c0e0 ) 802bf10: f7f5 fe3c bl 8021b8c strncat(buf, str, len); 802bf14: f89d 2007 ldrb.w r2, [sp, #7] 802bf18: a902 add r1, sp, #8 802bf1a: 4620 mov r0, r4 802bf1c: f7f5 ffd8 bl 8021ed0 GetInputFreqStr(str, &len); 802bf20: a802 add r0, sp, #8 802bf22: f10d 0107 add.w r1, sp, #7 802bf26: f7fb fc51 bl 80277cc strcat(buf, "\",\"in_freq\":\""); 802bf2a: 4620 mov r0, r4 802bf2c: 496d ldr r1, [pc, #436] ; (802c0e4 ) 802bf2e: f7f5 fe2d bl 8021b8c strncat(buf, str, len); 802bf32: f89d 2007 ldrb.w r2, [sp, #7] 802bf36: a902 add r1, sp, #8 802bf38: 4620 mov r0, r4 802bf3a: f7f5 ffc9 bl 8021ed0 GetOutputFreqStr(str, &len); 802bf3e: a802 add r0, sp, #8 802bf40: f10d 0107 add.w r1, sp, #7 802bf44: f7fb fc58 bl 80277f8 strcat(buf, "\",\"out_freq\":\""); 802bf48: 4620 mov r0, r4 802bf4a: 4967 ldr r1, [pc, #412] ; (802c0e8 ) 802bf4c: f7f5 fe1e bl 8021b8c strncat(buf, str, len); 802bf50: f89d 2007 ldrb.w r2, [sp, #7] 802bf54: a902 add r1, sp, #8 802bf56: 4620 mov r0, r4 802bf58: f7f5 ffba bl 8021ed0 GetPowerStr(str, &len); 802bf5c: a802 add r0, sp, #8 802bf5e: f10d 0107 add.w r1, sp, #7 802bf62: f7fb fc8b bl 802787c strcat(buf, "\",\"pwr\":\""); 802bf66: 4620 mov r0, r4 802bf68: 4960 ldr r1, [pc, #384] ; (802c0ec ) 802bf6a: f7f5 fe0f bl 8021b8c strncat(buf, str, len); 802bf6e: f89d 2007 ldrb.w r2, [sp, #7] 802bf72: a902 add r1, sp, #8 802bf74: 4620 mov r0, r4 802bf76: f7f5 ffab bl 8021ed0 GetLineFailBitStr(str, &len); 802bf7a: a802 add r0, sp, #8 802bf7c: f10d 0107 add.w r1, sp, #7 802bf80: f7fb fc1a bl 80277b8 strcat(buf, "\",\"line_fail\":\""); 802bf84: 4620 mov r0, r4 802bf86: 495a ldr r1, [pc, #360] ; (802c0f0 ) 802bf88: f7f5 fe00 bl 8021b8c strncat(buf, str, len); 802bf8c: f89d 2007 ldrb.w r2, [sp, #7] 802bf90: a902 add r1, sp, #8 802bf92: 4620 mov r0, r4 802bf94: f7f5 ff9c bl 8021ed0 GetLowBatteryBitStr(str, &len); 802bf98: a802 add r0, sp, #8 802bf9a: f10d 0107 add.w r1, sp, #7 802bf9e: f7fb fc10 bl 80277c2 strcat(buf, "\",\"low_battery\":\""); 802bfa2: 4620 mov r0, r4 802bfa4: 4953 ldr r1, [pc, #332] ; (802c0f4 ) 802bfa6: f7f5 fdf1 bl 8021b8c strncat(buf, str, len); 802bfaa: f89d 2007 ldrb.w r2, [sp, #7] 802bfae: a902 add r1, sp, #8 802bfb0: 4620 mov r0, r4 802bfb2: f7f5 ff8d bl 8021ed0 GetBatCapacityStr(str, &len); 802bfb6: a802 add r0, sp, #8 802bfb8: f10d 0107 add.w r1, sp, #7 802bfbc: f7fb fc70 bl 80278a0 strcat(buf, "\",\"bat_cap\":\""); 802bfc0: 4620 mov r0, r4 802bfc2: 494d ldr r1, [pc, #308] ; (802c0f8 ) 802bfc4: f7f5 fde2 bl 8021b8c strncat(buf, str, len); 802bfc8: f89d 2007 ldrb.w r2, [sp, #7] 802bfcc: a902 add r1, sp, #8 802bfce: 4620 mov r0, r4 802bfd0: f7f5 ff7e bl 8021ed0 GetInternalTempStr(str, &len); 802bfd4: a802 add r0, sp, #8 802bfd6: f10d 0107 add.w r1, sp, #7 802bfda: f7fb fc85 bl 80278e8 strcat(buf, "\",\"inner_temp\":\""); 802bfde: 4620 mov r0, r4 802bfe0: 4946 ldr r1, [pc, #280] ; (802c0fc ) 802bfe2: f7f5 fdd3 bl 8021b8c strncat(buf, str, len); 802bfe6: f89d 2007 ldrb.w r2, [sp, #7] 802bfea: a902 add r1, sp, #8 802bfec: 4620 mov r0, r4 802bfee: f7f5 ff6f bl 8021ed0 GetRuntimeStr(str, &len); 802bff2: a802 add r0, sp, #8 802bff4: f10d 0107 add.w r1, sp, #7 802bff8: f7fb fc64 bl 80278c4 strcat(buf, "\",\"bat_time_left\":\""); 802bffc: 4620 mov r0, r4 802bffe: 4940 ldr r1, [pc, #256] ; (802c100 ) 802c000: f7f5 fdc4 bl 8021b8c strncat(buf, str, len); 802c004: a902 add r1, sp, #8 802c006: f89d 2007 ldrb.w r2, [sp, #7] 802c00a: 4620 mov r0, r4 802c00c: f7f5 ff60 bl 8021ed0 GetDINStatusStr(str, &len, 0); 802c010: 2200 movs r2, #0 802c012: a802 add r0, sp, #8 802c014: f10d 0107 add.w r1, sp, #7 802c018: f7fb fd46 bl 8027aa8 strcat(buf, "\",\"di1\":\""); 802c01c: 4620 mov r0, r4 802c01e: 4939 ldr r1, [pc, #228] ; (802c104 ) 802c020: f7f5 fdb4 bl 8021b8c strncat(buf, str, len); 802c024: a902 add r1, sp, #8 802c026: f89d 2007 ldrb.w r2, [sp, #7] 802c02a: 4620 mov r0, r4 802c02c: f7f5 ff50 bl 8021ed0 GetDOUTStatusStr(str, &len, 0); 802c030: 2200 movs r2, #0 802c032: a802 add r0, sp, #8 802c034: f10d 0107 add.w r1, sp, #7 802c038: f7fb fd70 bl 8027b1c strcat(buf, "\",\"ro1\":\""); 802c03c: 4620 mov r0, r4 802c03e: 4932 ldr r1, [pc, #200] ; (802c108 ) 802c040: f7f5 fda4 bl 8021b8c strncat(buf, str, len); 802c044: a902 add r1, sp, #8 802c046: f89d 2007 ldrb.w r2, [sp, #7] 802c04a: 4620 mov r0, r4 802c04c: f7f5 ff40 bl 8021ed0 GetDOUTStatusStr(str, &len, 1); 802c050: 2201 movs r2, #1 802c052: a802 add r0, sp, #8 802c054: f10d 0107 add.w r1, sp, #7 802c058: f7fb fd60 bl 8027b1c strcat(buf, "\",\"ro2\":\""); 802c05c: 4620 mov r0, r4 802c05e: 492b ldr r1, [pc, #172] ; (802c10c ) 802c060: f7f5 fd94 bl 8021b8c strncat(buf, str, len); 802c064: f89d 2007 ldrb.w r2, [sp, #7] 802c068: a902 add r1, sp, #8 802c06a: 4620 mov r0, r4 802c06c: f7f5 ff30 bl 8021ed0 // Мониторинг // load_monitor (нагрузка, 0 - норма, 1 - fail) // temp_monitor (внутренняя температура, 0 - норма, 1 - fail) // connect_monitor (связь с UPSом, 0 - норма, 1 - fail) GetConnectMonitorStr(str, &len); 802c070: a802 add r0, sp, #8 802c072: f10d 0107 add.w r1, sp, #7 802c076: f7fb fc4d bl 8027914 strcat(buf, "\",\"connect_monitor\":\""); 802c07a: 4620 mov r0, r4 802c07c: 4924 ldr r1, [pc, #144] ; (802c110 ) 802c07e: f7f5 fd85 bl 8021b8c strncat(buf, str, len); 802c082: f89d 2007 ldrb.w r2, [sp, #7] 802c086: a902 add r1, sp, #8 802c088: 4620 mov r0, r4 802c08a: f7f5 ff21 bl 8021ed0 GetAlarmStr(str, &len); 802c08e: a802 add r0, sp, #8 802c090: f10d 0107 add.w r1, sp, #7 802c094: f7fb fc44 bl 8027920 strcat(buf, "\",\"alarm\":\""); 802c098: 4620 mov r0, r4 802c09a: 491e ldr r1, [pc, #120] ; (802c114 ) 802c09c: f7f5 fd76 bl 8021b8c strncat(buf, str, len); 802c0a0: f89d 2007 ldrb.w r2, [sp, #7] 802c0a4: a902 add r1, sp, #8 802c0a6: 4620 mov r0, r4 802c0a8: f7f5 ff12 bl 8021ed0 // Признак изменения сетевых настроек GetWebReinitFlag(str, &len); 802c0ac: a802 add r0, sp, #8 802c0ae: f10d 0107 add.w r1, sp, #7 802c0b2: f7fb ff93 bl 8027fdc strcat(buf, "\",\"netsettings_changed\":\""); 802c0b6: 4620 mov r0, r4 802c0b8: 4917 ldr r1, [pc, #92] ; (802c118 ) 802c0ba: f7f5 fd67 bl 8021b8c strncat(buf, str, len); 802c0be: a902 add r1, sp, #8 802c0c0: f89d 2007 ldrb.w r2, [sp, #7] 802c0c4: 4620 mov r0, r4 802c0c6: f7f5 ff03 bl 8021ed0 strncat(buf, "\"}", 2); 802c0ca: 4620 mov r0, r4 802c0cc: 4913 ldr r1, [pc, #76] ; (802c11c ) 802c0ce: 2202 movs r2, #2 802c0d0: f7f5 fefe bl 8021ed0 //printf(buf); } 802c0d4: b00c add sp, #48 ; 0x30 802c0d6: bd10 pop {r4, pc} 802c0d8: 08041037 .word 0x08041037 802c0dc: 08041063 .word 0x08041063 802c0e0: 0804106b .word 0x0804106b 802c0e4: 08041074 .word 0x08041074 802c0e8: 08041082 .word 0x08041082 802c0ec: 08041091 .word 0x08041091 802c0f0: 0804109b .word 0x0804109b 802c0f4: 080410ab .word 0x080410ab 802c0f8: 080410bd .word 0x080410bd 802c0fc: 080410cb .word 0x080410cb 802c100: 080410dc .word 0x080410dc 802c104: 080410f0 .word 0x080410f0 802c108: 080410fa .word 0x080410fa 802c10c: 08041104 .word 0x08041104 802c110: 0804110e .word 0x0804110e 802c114: 08041124 .word 0x08041124 802c118: 08041130 .word 0x08041130 802c11c: 0804114a .word 0x0804114a 0802c120 : /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802c120: 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"); 802c122: 49bf ldr r1, [pc, #764] ; (802c420 ) /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 802c124: b08a sub sp, #40 ; 0x28 802c126: 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"); 802c128: f7f5 fe44 bl 8021db4 /* SNMP */ GetReadCommunity(str, &len); 802c12c: a802 add r0, sp, #8 802c12e: f10d 0107 add.w r1, sp, #7 802c132: f7fb fe91 bl 8027e58 strcat(buf, "{\"read_community\":\""); 802c136: 4620 mov r0, r4 802c138: 49ba ldr r1, [pc, #744] ; (802c424 ) 802c13a: f7f5 fd27 bl 8021b8c strncat(buf, str, len); 802c13e: f89d 2007 ldrb.w r2, [sp, #7] 802c142: a902 add r1, sp, #8 802c144: 4620 mov r0, r4 802c146: f7f5 fec3 bl 8021ed0 GetWriteCommunity(str, &len); 802c14a: a802 add r0, sp, #8 802c14c: f10d 0107 add.w r1, sp, #7 802c150: f7fb fe92 bl 8027e78 strcat(buf, "\",\"write_community\":\""); 802c154: 4620 mov r0, r4 802c156: 49b4 ldr r1, [pc, #720] ; (802c428 ) 802c158: f7f5 fd18 bl 8021b8c strncat(buf, str, len); 802c15c: f89d 2007 ldrb.w r2, [sp, #7] 802c160: a902 add r1, sp, #8 802c162: 4620 mov r0, r4 802c164: f7f5 feb4 bl 8021ed0 GetManagerIp(str, &len); 802c168: a802 add r0, sp, #8 802c16a: f10d 0107 add.w r1, sp, #7 802c16e: f7fb fe93 bl 8027e98 strcat(buf, "\",\"managerIP\":\""); 802c172: 4620 mov r0, r4 802c174: 49ad ldr r1, [pc, #692] ; (802c42c ) 802c176: f7f5 fd09 bl 8021b8c strncat(buf, str, len); 802c17a: f89d 2007 ldrb.w r2, [sp, #7] 802c17e: a902 add r1, sp, #8 802c180: 4620 mov r0, r4 802c182: f7f5 fea5 bl 8021ed0 GetManagerIp2(str, &len); 802c186: a802 add r0, sp, #8 802c188: f10d 0107 add.w r1, sp, #7 802c18c: f7fb fe94 bl 8027eb8 strcat(buf, "\",\"managerIP2\":\""); 802c190: 4620 mov r0, r4 802c192: 49a7 ldr r1, [pc, #668] ; (802c430 ) 802c194: f7f5 fcfa bl 8021b8c strncat(buf, str, len); 802c198: f89d 2007 ldrb.w r2, [sp, #7] 802c19c: a902 add r1, sp, #8 802c19e: 4620 mov r0, r4 802c1a0: f7f5 fe96 bl 8021ed0 GetManagerIp3(str, &len); 802c1a4: a802 add r0, sp, #8 802c1a6: f10d 0107 add.w r1, sp, #7 802c1aa: f7fb fe95 bl 8027ed8 strcat(buf, "\",\"managerIP3\":\""); 802c1ae: 4620 mov r0, r4 802c1b0: 49a0 ldr r1, [pc, #640] ; (802c434 ) 802c1b2: f7f5 fceb bl 8021b8c strncat(buf, str, len); 802c1b6: f89d 2007 ldrb.w r2, [sp, #7] 802c1ba: a902 add r1, sp, #8 802c1bc: 4620 mov r0, r4 802c1be: f7f5 fe87 bl 8021ed0 GetManagerIp4(str, &len); 802c1c2: a802 add r0, sp, #8 802c1c4: f10d 0107 add.w r1, sp, #7 802c1c8: f7fb fe96 bl 8027ef8 strcat(buf, "\",\"managerIP4\":\""); 802c1cc: 4620 mov r0, r4 802c1ce: 499a ldr r1, [pc, #616] ; (802c438 ) 802c1d0: f7f5 fcdc bl 8021b8c strncat(buf, str, len); 802c1d4: f89d 2007 ldrb.w r2, [sp, #7] 802c1d8: a902 add r1, sp, #8 802c1da: 4620 mov r0, r4 802c1dc: f7f5 fe78 bl 8021ed0 GetManagerIp5(str, &len); 802c1e0: a802 add r0, sp, #8 802c1e2: f10d 0107 add.w r1, sp, #7 802c1e6: f7fb fe97 bl 8027f18 strcat(buf, "\",\"managerIP5\":\""); 802c1ea: 4620 mov r0, r4 802c1ec: 4993 ldr r1, [pc, #588] ; (802c43c ) 802c1ee: f7f5 fccd bl 8021b8c strncat(buf, str, len); 802c1f2: a902 add r1, sp, #8 802c1f4: f89d 2007 ldrb.w r2, [sp, #7] 802c1f8: 4620 mov r0, r4 802c1fa: f7f5 fe69 bl 8021ed0 /*Параметры реле и сухих контактов*/ GetDINTypeActStr(str, &len, 0); 802c1fe: 2200 movs r2, #0 802c200: a802 add r0, sp, #8 802c202: f10d 0107 add.w r1, sp, #7 802c206: f7fb fc3b bl 8027a80 strcat(buf, "\",\"di1\":\""); 802c20a: 4620 mov r0, r4 802c20c: 498c ldr r1, [pc, #560] ; (802c440 ) 802c20e: f7f5 fcbd bl 8021b8c strncat(buf, str, len); 802c212: a902 add r1, sp, #8 802c214: f89d 2007 ldrb.w r2, [sp, #7] 802c218: 4620 mov r0, r4 802c21a: f7f5 fe59 bl 8021ed0 GetROTypeActStr(str, &len, 0); 802c21e: 2200 movs r2, #0 802c220: a802 add r0, sp, #8 802c222: f10d 0107 add.w r1, sp, #7 802c226: f7fb fc65 bl 8027af4 strcat(buf, "\",\"ro1\":\""); 802c22a: 4620 mov r0, r4 802c22c: 4985 ldr r1, [pc, #532] ; (802c444 ) 802c22e: f7f5 fcad bl 8021b8c strncat(buf, str, len); 802c232: a902 add r1, sp, #8 802c234: f89d 2007 ldrb.w r2, [sp, #7] 802c238: 4620 mov r0, r4 802c23a: f7f5 fe49 bl 8021ed0 GetROTypeActStr(str, &len, 1); 802c23e: 2201 movs r2, #1 802c240: a802 add r0, sp, #8 802c242: f10d 0107 add.w r1, sp, #7 802c246: f7fb fc55 bl 8027af4 strcat(buf, "\",\"ro2\":\""); 802c24a: 4620 mov r0, r4 802c24c: 497e ldr r1, [pc, #504] ; (802c448 ) 802c24e: f7f5 fc9d bl 8021b8c strncat(buf, str, len); 802c252: f89d 2007 ldrb.w r2, [sp, #7] 802c256: a902 add r1, sp, #8 802c258: 4620 mov r0, r4 802c25a: f7f5 fe39 bl 8021ed0 /* WEB */ GetIpStr(str, &len); 802c25e: a802 add r0, sp, #8 802c260: f10d 0107 add.w r1, sp, #7 802c264: f7fb fda2 bl 8027dac strcat(buf, "\",\"ipaddr\":\""); 802c268: 4620 mov r0, r4 802c26a: 4978 ldr r1, [pc, #480] ; (802c44c ) 802c26c: f7f5 fc8e bl 8021b8c strncat(buf, str, len); 802c270: f89d 2007 ldrb.w r2, [sp, #7] 802c274: a902 add r1, sp, #8 802c276: 4620 mov r0, r4 802c278: f7f5 fe2a bl 8021ed0 GetGatewayStr(str, &len); 802c27c: a802 add r0, sp, #8 802c27e: f10d 0107 add.w r1, sp, #7 802c282: f7fb fda9 bl 8027dd8 strcat(buf, "\",\"gw\":\""); 802c286: 4620 mov r0, r4 802c288: 4971 ldr r1, [pc, #452] ; (802c450 ) 802c28a: f7f5 fc7f bl 8021b8c strncat(buf, str, len); 802c28e: f89d 2007 ldrb.w r2, [sp, #7] 802c292: a902 add r1, sp, #8 802c294: 4620 mov r0, r4 802c296: f7f5 fe1b bl 8021ed0 GetMaskStr(str, &len); 802c29a: a802 add r0, sp, #8 802c29c: f10d 0107 add.w r1, sp, #7 802c2a0: f7fb fdb0 bl 8027e04 strcat(buf, "\",\"mask\":\""); 802c2a4: 4620 mov r0, r4 802c2a6: 496b ldr r1, [pc, #428] ; (802c454 ) 802c2a8: f7f5 fc70 bl 8021b8c strncat(buf, str, len); 802c2ac: f89d 2007 ldrb.w r2, [sp, #7] 802c2b0: a902 add r1, sp, #8 802c2b2: 4620 mov r0, r4 802c2b4: f7f5 fe0c bl 8021ed0 GetDhcpStateStr(str, &len); 802c2b8: a802 add r0, sp, #8 802c2ba: f10d 0107 add.w r1, sp, #7 802c2be: f7fb fdb7 bl 8027e30 strcat(buf, "\",\"dhcp\":"); 802c2c2: 4620 mov r0, r4 802c2c4: 4964 ldr r1, [pc, #400] ; (802c458 ) 802c2c6: f7f5 fc61 bl 8021b8c strncat(buf, str, len); 802c2ca: f89d 2007 ldrb.w r2, [sp, #7] 802c2ce: a902 add r1, sp, #8 802c2d0: 4620 mov r0, r4 802c2d2: f7f5 fdfd bl 8021ed0 /* RADIUS */ GetRDSIpStr(str, &len); 802c2d6: a802 add r0, sp, #8 802c2d8: f10d 0107 add.w r1, sp, #7 802c2dc: f7fb fe2c bl 8027f38 strcat(buf, ",\"rs_server\":\""); 802c2e0: 4620 mov r0, r4 802c2e2: 495e ldr r1, [pc, #376] ; (802c45c ) 802c2e4: f7f5 fc52 bl 8021b8c strncat(buf, str, len); 802c2e8: f89d 2007 ldrb.w r2, [sp, #7] 802c2ec: a902 add r1, sp, #8 802c2ee: 4620 mov r0, r4 802c2f0: f7f5 fdee bl 8021ed0 GetRDSPortStr(str, &len); 802c2f4: a802 add r0, sp, #8 802c2f6: f10d 0107 add.w r1, sp, #7 802c2fa: f7fb fe2d bl 8027f58 strcat(buf, "\",\"rs_port\":\""); 802c2fe: 4620 mov r0, r4 802c300: 4957 ldr r1, [pc, #348] ; (802c460 ) 802c302: f7f5 fc43 bl 8021b8c strncat(buf, str, len); 802c306: f89d 2007 ldrb.w r2, [sp, #7] 802c30a: a902 add r1, sp, #8 802c30c: 4620 mov r0, r4 802c30e: f7f5 fddf bl 8021ed0 GetRDSPasswordkStr(str, &len); 802c312: a802 add r0, sp, #8 802c314: f10d 0107 add.w r1, sp, #7 802c318: f7fb fe42 bl 8027fa0 strcat(buf, "\",\"rs_pwd\":\""); 802c31c: 4620 mov r0, r4 802c31e: 4951 ldr r1, [pc, #324] ; (802c464 ) 802c320: f7f5 fc34 bl 8021b8c strncat(buf, str, len); 802c324: f89d 2007 ldrb.w r2, [sp, #7] 802c328: a902 add r1, sp, #8 802c32a: 4620 mov r0, r4 802c32c: f7f5 fdd0 bl 8021ed0 GetRDSKeyAccesstStr(str, &len); 802c330: a802 add r0, sp, #8 802c332: f10d 0107 add.w r1, sp, #7 802c336: f7fb fe21 bl 8027f7c strcat(buf, "\",\"rs_key\":\""); 802c33a: 4620 mov r0, r4 802c33c: 494a ldr r1, [pc, #296] ; (802c468 ) 802c33e: f7f5 fc25 bl 8021b8c strncat(buf, str, len); 802c342: f89d 2007 ldrb.w r2, [sp, #7] 802c346: a902 add r1, sp, #8 802c348: 4620 mov r0, r4 802c34a: f7f5 fdc1 bl 8021ed0 GetRDSEnableStateStr(str, &len); 802c34e: a802 add r0, sp, #8 802c350: f10d 0107 add.w r1, sp, #7 802c354: f7fb fe34 bl 8027fc0 strcat(buf, "\",\"rs_enabled\":"); 802c358: 4620 mov r0, r4 802c35a: 4944 ldr r1, [pc, #272] ; (802c46c ) 802c35c: f7f5 fc16 bl 8021b8c strncat(buf, str, len); 802c360: f89d 2007 ldrb.w r2, [sp, #7] 802c364: a902 add r1, sp, #8 802c366: 4620 mov r0, r4 802c368: f7f5 fdb2 bl 8021ed0 /* Параметры даты и времени */ GetDateStr(str, &len); 802c36c: a802 add r0, sp, #8 802c36e: f10d 0107 add.w r1, sp, #7 802c372: f7fb fae7 bl 8027944 strcat(buf, ",\"date\":\""); 802c376: 4620 mov r0, r4 802c378: 493d ldr r1, [pc, #244] ; (802c470 ) 802c37a: f7f5 fc07 bl 8021b8c strncat(buf, str, len); 802c37e: f89d 2007 ldrb.w r2, [sp, #7] 802c382: a902 add r1, sp, #8 802c384: 4620 mov r0, r4 802c386: f7f5 fda3 bl 8021ed0 GetTimeStr(str, &len); 802c38a: a802 add r0, sp, #8 802c38c: f10d 0107 add.w r1, sp, #7 802c390: f7fb faf6 bl 8027980 strcat(buf, "\",\"time\":\""); 802c394: 4620 mov r0, r4 802c396: 4937 ldr r1, [pc, #220] ; (802c474 ) 802c398: f7f5 fbf8 bl 8021b8c strncat(buf, str, len); 802c39c: f89d 2007 ldrb.w r2, [sp, #7] 802c3a0: a902 add r1, sp, #8 802c3a2: 4620 mov r0, r4 802c3a4: f7f5 fd94 bl 8021ed0 /* Параметры SNTP */ GetSntpStateStr(str, &len); 802c3a8: a802 add r0, sp, #8 802c3aa: f10d 0107 add.w r1, sp, #7 802c3ae: f7fb fb15 bl 80279dc strcat(buf, "\",\"ntp\":\""); 802c3b2: 4620 mov r0, r4 802c3b4: 4930 ldr r1, [pc, #192] ; (802c478 ) 802c3b6: f7f5 fbe9 bl 8021b8c strncat(buf, str, len); 802c3ba: f89d 2007 ldrb.w r2, [sp, #7] 802c3be: a902 add r1, sp, #8 802c3c0: 4620 mov r0, r4 802c3c2: f7f5 fd85 bl 8021ed0 GetSntpServerIpStr(str, &len); 802c3c6: a802 add r0, sp, #8 802c3c8: f10d 0107 add.w r1, sp, #7 802c3cc: f7fb fb20 bl 8027a10 strcat(buf, "\",\"ntpservip\":\""); 802c3d0: 4620 mov r0, r4 802c3d2: 492a ldr r1, [pc, #168] ; (802c47c ) 802c3d4: f7f5 fbda bl 8021b8c strncat(buf, str, len); 802c3d8: f89d 2007 ldrb.w r2, [sp, #7] 802c3dc: a902 add r1, sp, #8 802c3de: 4620 mov r0, r4 802c3e0: f7f5 fd76 bl 8021ed0 GetSntpTimeZoneStr(str, &len); 802c3e4: a802 add r0, sp, #8 802c3e6: f10d 0107 add.w r1, sp, #7 802c3ea: f7fb fb21 bl 8027a30 strcat(buf, "\",\"utc\":\""); 802c3ee: 4620 mov r0, r4 802c3f0: 4923 ldr r1, [pc, #140] ; (802c480 ) 802c3f2: f7f5 fbcb bl 8021b8c strncat(buf, str, len); 802c3f6: f89d 2007 ldrb.w r2, [sp, #7] 802c3fa: a902 add r1, sp, #8 802c3fc: 4620 mov r0, r4 802c3fe: f7f5 fd67 bl 8021ed0 GetUnixTimeStr(str, &len); 802c402: a802 add r0, sp, #8 802c404: f10d 0107 add.w r1, sp, #7 802c408: f7fb fad2 bl 80279b0 strcat(buf, "\",\"utm\":\""); 802c40c: 4620 mov r0, r4 802c40e: 491d ldr r1, [pc, #116] ; (802c484 ) 802c410: f7f5 fbbc bl 8021b8c strncat(buf, str, len); 802c414: f89d 2007 ldrb.w r2, [sp, #7] 802c418: a902 add r1, sp, #8 802c41a: 4620 mov r0, r4 802c41c: e034 b.n 802c488 802c41e: bf00 nop 802c420: 08041037 .word 0x08041037 802c424: 0804114d .word 0x0804114d 802c428: 08041161 .word 0x08041161 802c42c: 08041177 .word 0x08041177 802c430: 08041187 .word 0x08041187 802c434: 08041198 .word 0x08041198 802c438: 080411a9 .word 0x080411a9 802c43c: 080411ba .word 0x080411ba 802c440: 080410f0 .word 0x080410f0 802c444: 080410fa .word 0x080410fa 802c448: 08041104 .word 0x08041104 802c44c: 080411cb .word 0x080411cb 802c450: 080411d8 .word 0x080411d8 802c454: 080411e1 .word 0x080411e1 802c458: 080411ec .word 0x080411ec 802c45c: 080411f6 .word 0x080411f6 802c460: 08041205 .word 0x08041205 802c464: 08041213 .word 0x08041213 802c468: 08041220 .word 0x08041220 802c46c: 0804122d .word 0x0804122d 802c470: 0804123d .word 0x0804123d 802c474: 08041247 .word 0x08041247 802c478: 08041252 .word 0x08041252 802c47c: 0804125c .word 0x0804125c 802c480: 0804126c .word 0x0804126c 802c484: 08041276 .word 0x08041276 802c488: f7f5 fd22 bl 8021ed0 GetSntpLastDataStr(str, &len); 802c48c: a802 add r0, sp, #8 802c48e: f10d 0107 add.w r1, sp, #7 802c492: f7fb fae5 bl 8027a60 strcat(buf, "\",\"lastsynctime\":\""); 802c496: 4620 mov r0, r4 802c498: 490f ldr r1, [pc, #60] ; (802c4d8 ) 802c49a: f7f5 fb77 bl 8021b8c strncat(buf, str, len); 802c49e: f89d 2007 ldrb.w r2, [sp, #7] 802c4a2: a902 add r1, sp, #8 802c4a4: 4620 mov r0, r4 802c4a6: f7f5 fd13 bl 8021ed0 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802c4aa: a802 add r0, sp, #8 802c4ac: f10d 0107 add.w r1, sp, #7 802c4b0: f7fb fd94 bl 8027fdc strcat(buf, "\",\"netsettings_changed\":\""); 802c4b4: 4620 mov r0, r4 802c4b6: 4909 ldr r1, [pc, #36] ; (802c4dc ) 802c4b8: f7f5 fb68 bl 8021b8c strncat(buf, str, len); 802c4bc: a902 add r1, sp, #8 802c4be: f89d 2007 ldrb.w r2, [sp, #7] 802c4c2: 4620 mov r0, r4 802c4c4: f7f5 fd04 bl 8021ed0 strncat(buf, "\"}", 2); 802c4c8: 4620 mov r0, r4 802c4ca: 4905 ldr r1, [pc, #20] ; (802c4e0 ) 802c4cc: 2202 movs r2, #2 802c4ce: f7f5 fcff bl 8021ed0 //printf(buf); } 802c4d2: b00a add sp, #40 ; 0x28 802c4d4: bd10 pop {r4, pc} 802c4d6: bf00 nop 802c4d8: 08041280 .word 0x08041280 802c4dc: 08041130 .word 0x08041130 802c4e0: 0804114a .word 0x0804114a 0802c4e4 : * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802c4e4: 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"); 802c4e6: 4960 ldr r1, [pc, #384] ; (802c668 ) * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 802c4e8: b08c sub sp, #48 ; 0x30 802c4ea: 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"); 802c4ec: f7f5 fc62 bl 8021db4 GetWorkTimeStr(str, &len); 802c4f0: a802 add r0, sp, #8 802c4f2: f10d 0107 add.w r1, sp, #7 802c4f6: f7fb fb49 bl 8027b8c strcat(buf, "{\"uptime\":\""); 802c4fa: 4620 mov r0, r4 802c4fc: 495b ldr r1, [pc, #364] ; (802c66c ) 802c4fe: f7f5 fb45 bl 8021b8c strncat(buf, str, len); 802c502: f89d 2007 ldrb.w r2, [sp, #7] 802c506: a902 add r1, sp, #8 802c508: 4620 mov r0, r4 802c50a: f7f5 fce1 bl 8021ed0 GetModelStr(str, &len); 802c50e: a802 add r0, sp, #8 802c510: f10d 0107 add.w r1, sp, #7 802c514: f7fb fb60 bl 8027bd8 strcat(buf, "\",\"model\":\""); 802c518: 4620 mov r0, r4 802c51a: 4955 ldr r1, [pc, #340] ; (802c670 ) 802c51c: f7f5 fb36 bl 8021b8c strncat(buf, str, len); 802c520: f89d 2007 ldrb.w r2, [sp, #7] 802c524: a902 add r1, sp, #8 802c526: 4620 mov r0, r4 802c528: f7f5 fcd2 bl 8021ed0 GetProductionDataStr(str, &len); 802c52c: a802 add r0, sp, #8 802c52e: f10d 0107 add.w r1, sp, #7 802c532: f7fb fb63 bl 8027bfc strcat(buf, "\",\"prodate\":\""); 802c536: 4620 mov r0, r4 802c538: 494e ldr r1, [pc, #312] ; (802c674 ) 802c53a: f7f5 fb27 bl 8021b8c strncat(buf, str, len); 802c53e: f89d 2007 ldrb.w r2, [sp, #7] 802c542: a902 add r1, sp, #8 802c544: 4620 mov r0, r4 802c546: f7f5 fcc3 bl 8021ed0 GetVersionStr(str, &len); 802c54a: a802 add r0, sp, #8 802c54c: f10d 0107 add.w r1, sp, #7 802c550: f7fb fb66 bl 8027c20 strcat(buf, "\",\"fwversion\":\""); 802c554: 4620 mov r0, r4 802c556: 4948 ldr r1, [pc, #288] ; (802c678 ) 802c558: f7f5 fb18 bl 8021b8c strncat(buf, str, len); 802c55c: f89d 2007 ldrb.w r2, [sp, #7] 802c560: a902 add r1, sp, #8 802c562: 4620 mov r0, r4 802c564: f7f5 fcb4 bl 8021ed0 GetMacStr(str, &len); 802c568: a802 add r0, sp, #8 802c56a: f10d 0107 add.w r1, sp, #7 802c56e: f7fb fb69 bl 8027c44 strcat(buf, "\",\"macaddr\":\""); 802c572: 4620 mov r0, r4 802c574: 4941 ldr r1, [pc, #260] ; (802c67c ) 802c576: f7f5 fb09 bl 8021b8c strncat(buf, str, len); 802c57a: f89d 2007 ldrb.w r2, [sp, #7] 802c57e: a902 add r1, sp, #8 802c580: 4620 mov r0, r4 802c582: f7f5 fca5 bl 8021ed0 GetSerialNumberStr(str, &len); 802c586: a802 add r0, sp, #8 802c588: f10d 0107 add.w r1, sp, #7 802c58c: f7fb fb6c bl 8027c68 strcat(buf, "\",\"serno\":\""); 802c590: 4620 mov r0, r4 802c592: 493b ldr r1, [pc, #236] ; (802c680 ) 802c594: f7f5 fafa bl 8021b8c strncat(buf, str, len); 802c598: f89d 2007 ldrb.w r2, [sp, #7] 802c59c: a902 add r1, sp, #8 802c59e: 4620 mov r0, r4 802c5a0: f7f5 fc96 bl 8021ed0 GetOwnerStr(str, &len); 802c5a4: a802 add r0, sp, #8 802c5a6: f10d 0107 add.w r1, sp, #7 802c5aa: f7fb fb6f bl 8027c8c strcat(buf, "\",\"owner\":\""); 802c5ae: 4620 mov r0, r4 802c5b0: 4934 ldr r1, [pc, #208] ; (802c684 ) 802c5b2: f7f5 faeb bl 8021b8c strncat(buf, str, len); 802c5b6: f89d 2007 ldrb.w r2, [sp, #7] 802c5ba: a902 add r1, sp, #8 802c5bc: 4620 mov r0, r4 802c5be: f7f5 fc87 bl 8021ed0 GetLocationStr(str, &len); 802c5c2: a802 add r0, sp, #8 802c5c4: f10d 0107 add.w r1, sp, #7 802c5c8: f7fb fb72 bl 8027cb0 strcat(buf, "\",\"sysLocation\":\""); 802c5cc: 4620 mov r0, r4 802c5ce: 492e ldr r1, [pc, #184] ; (802c688 ) 802c5d0: f7f5 fadc bl 8021b8c strncat(buf, str, len); 802c5d4: f89d 2007 ldrb.w r2, [sp, #7] 802c5d8: a902 add r1, sp, #8 802c5da: 4620 mov r0, r4 802c5dc: f7f5 fc78 bl 8021ed0 GetCommentsStr(str, &len); 802c5e0: a802 add r0, sp, #8 802c5e2: f10d 0107 add.w r1, sp, #7 802c5e6: f7fb fb75 bl 8027cd4 strcat(buf, "\",\"comment\":\""); 802c5ea: 4620 mov r0, r4 802c5ec: 4927 ldr r1, [pc, #156] ; (802c68c ) 802c5ee: f7f5 facd bl 8021b8c strncat(buf, str, len); 802c5f2: f89d 2007 ldrb.w r2, [sp, #7] 802c5f6: a902 add r1, sp, #8 802c5f8: 4620 mov r0, r4 802c5fa: f7f5 fc69 bl 8021ed0 GetUPSModelStr(str, &len); 802c5fe: a802 add r0, sp, #8 802c600: f10d 0107 add.w r1, sp, #7 802c604: f7fb fb78 bl 8027cf8 strcat(buf, "\",\"ups_model\":\""); 802c608: 4620 mov r0, r4 802c60a: 4921 ldr r1, [pc, #132] ; (802c690 ) 802c60c: f7f5 fabe bl 8021b8c strncat(buf, str, len); 802c610: f89d 2007 ldrb.w r2, [sp, #7] 802c614: a902 add r1, sp, #8 802c616: 4620 mov r0, r4 802c618: f7f5 fc5a bl 8021ed0 GetUPSVersionStr(str, &len); 802c61c: a802 add r0, sp, #8 802c61e: f10d 0107 add.w r1, sp, #7 802c622: f7fb fb7b bl 8027d1c strcat(buf, "\",\"ups_fwversion\":\""); 802c626: 4620 mov r0, r4 802c628: 491a ldr r1, [pc, #104] ; (802c694 ) 802c62a: f7f5 faaf bl 8021b8c strncat(buf, str, len); 802c62e: f89d 2007 ldrb.w r2, [sp, #7] 802c632: a902 add r1, sp, #8 802c634: 4620 mov r0, r4 802c636: f7f5 fc4b bl 8021ed0 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 802c63a: a802 add r0, sp, #8 802c63c: f10d 0107 add.w r1, sp, #7 802c640: f7fb fccc bl 8027fdc strcat(buf, "\",\"netsettings_changed\":\""); 802c644: 4620 mov r0, r4 802c646: 4914 ldr r1, [pc, #80] ; (802c698 ) 802c648: f7f5 faa0 bl 8021b8c strncat(buf, str, len); 802c64c: a902 add r1, sp, #8 802c64e: f89d 2007 ldrb.w r2, [sp, #7] 802c652: 4620 mov r0, r4 802c654: f7f5 fc3c bl 8021ed0 strncat(buf, "\"}", 2); 802c658: 4620 mov r0, r4 802c65a: 4910 ldr r1, [pc, #64] ; (802c69c ) 802c65c: 2202 movs r2, #2 802c65e: f7f5 fc37 bl 8021ed0 } 802c662: b00c add sp, #48 ; 0x30 802c664: bd10 pop {r4, pc} 802c666: bf00 nop 802c668: 08041037 .word 0x08041037 802c66c: 08041293 .word 0x08041293 802c670: 0804129f .word 0x0804129f 802c674: 080412ab .word 0x080412ab 802c678: 080412b9 .word 0x080412b9 802c67c: 080412c9 .word 0x080412c9 802c680: 080412d7 .word 0x080412d7 802c684: 080412e3 .word 0x080412e3 802c688: 080412ef .word 0x080412ef 802c68c: 08041301 .word 0x08041301 802c690: 0804130f .word 0x0804130f 802c694: 0804131f .word 0x0804131f 802c698: 08041130 .word 0x08041130 802c69c: 0804114a .word 0x0804114a 0802c6a0 : /** * @brief Сброс настроек (всё кроме сетевых параметров) */ void HTTP_ResetSettings(void) { 802c6a0: b508 push {r3, lr} //taskENTER_CRITICAL(); SETTINGS_SetPartDefault(); 802c6a2: f7fc f89b bl 80287dc SETTINGS_Save(); //taskEXIT_CRITICAL(); } 802c6a6: e8bd 4008 ldmia.w sp!, {r3, lr} void HTTP_ResetSettings(void) { //taskENTER_CRITICAL(); SETTINGS_SetPartDefault(); SETTINGS_Save(); 802c6aa: f7fc b837 b.w 802871c 0802c6ae : */ void HTTP_SaveSettings(void) { // taskENTER_CRITICAL(); SETTINGS_Save(); 802c6ae: f7fc b835 b.w 802871c 0802c6b2 : /** * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { 802c6b2: b508 push {r3, lr} vTaskDelay(1010); 802c6b4: f240 30f2 movw r0, #1010 ; 0x3f2 802c6b8: f7fd fbf4 bl 8029ea4 NVIC_SystemReset(); 802c6bc: f7ff fbe2 bl 802be84 0802c6c0 : * bootloader и перезаписаны настройки * * false - обычная перезагрузка */ void HTTP_StartResetTask(bool fBootMode) { 802c6c0: b51f push {r0, r1, r2, r3, r4, lr} static bool temp; temp = fBootMode; 802c6c2: 4b07 ldr r3, [pc, #28] ; (802c6e0 ) xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802c6c4: 4907 ldr r1, [pc, #28] ; (802c6e4 ) */ void HTTP_StartResetTask(bool fBootMode) { static bool temp; temp = fBootMode; 802c6c6: 7018 strb r0, [r3, #0] xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 802c6c8: 2200 movs r2, #0 802c6ca: 9200 str r2, [sp, #0] 802c6cc: 9201 str r2, [sp, #4] 802c6ce: 9202 str r2, [sp, #8] 802c6d0: 9203 str r2, [sp, #12] 802c6d2: 4805 ldr r0, [pc, #20] ; (802c6e8 ) 802c6d4: 2280 movs r2, #128 ; 0x80 802c6d6: f7fd f94b bl 8029970 (void*)&temp, tskIDLE_PRIORITY, NULL); } 802c6da: b005 add sp, #20 802c6dc: bd00 pop {pc} 802c6de: bf00 nop 802c6e0: 20002ae4 .word 0x20002ae4 802c6e4: 08041333 .word 0x08041333 802c6e8: 0802bea5 .word 0x0802bea5 0802c6ec : tcpip_thread(void *arg) { struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802c6ec: 4b1e ldr r3, [pc, #120] ; (802c768 ) 802c6ee: 681b ldr r3, [r3, #0] * * @param arg unused argument */ static void tcpip_thread(void *arg) { 802c6f0: b507 push {r0, r1, r2, lr} struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 802c6f2: b113 cbz r3, 802c6fa tcpip_init_done(tcpip_init_done_arg); 802c6f4: 4a1d ldr r2, [pc, #116] ; (802c76c ) 802c6f6: 6810 ldr r0, [r2, #0] 802c6f8: 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); 802c6fa: 481d ldr r0, [pc, #116] ; (802c770 ) 802c6fc: a901 add r1, sp, #4 802c6fe: f003 fd0d bl 803011c LOCK_TCPIP_CORE(); switch (msg->type) { 802c702: 9b01 ldr r3, [sp, #4] 802c704: 781a ldrb r2, [r3, #0] 802c706: 2a05 cmp r2, #5 802c708: d8f7 bhi.n 802c6fa 802c70a: e8df f002 tbb [pc, r2] 802c70e: 0703 .short 0x0703 802c710: 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)); 802c714: 6898 ldr r0, [r3, #8] 802c716: 6803 ldr r3, [r0, #0] 802c718: 3004 adds r0, #4 802c71a: e7ed b.n 802c6f8 #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)) { 802c71c: 68d9 ldr r1, [r3, #12] ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802c71e: 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)) { 802c720: f891 202d ldrb.w r2, [r1, #45] ; 0x2d 802c724: f012 0f60 tst.w r2, #96 ; 0x60 802c728: d002 beq.n 802c730 ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 802c72a: f008 fb73 bl 8034e14 802c72e: e001 b.n 802c734 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif); 802c730: f004 f94e bl 80309d0 } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802c734: 2008 movs r0, #8 802c736: e00e b.n 802c756 #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); 802c738: f103 0008 add.w r0, r3, #8 802c73c: c807 ldmia r0, {r0, r1, r2} 802c73e: f003 fc1f bl 802ff80 802c742: e007 b.n 802c754 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); 802c744: 68d8 ldr r0, [r3, #12] 802c746: 6919 ldr r1, [r3, #16] 802c748: f003 fcc4 bl 80300d4 802c74c: e002 b.n 802c754 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); 802c74e: 689a ldr r2, [r3, #8] 802c750: 68d8 ldr r0, [r3, #12] 802c752: 4790 blx r2 memp_free(MEMP_TCPIP_MSG_API, msg); 802c754: 2007 movs r0, #7 802c756: 9901 ldr r1, [sp, #4] 802c758: f001 f882 bl 802d860 break; 802c75c: e7cd b.n 802c6fa 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); 802c75e: 689a ldr r2, [r3, #8] 802c760: 68d8 ldr r0, [r3, #12] 802c762: 4790 blx r2 break; 802c764: e7c9 b.n 802c6fa 802c766: bf00 nop 802c768: 20002af0 .word 0x20002af0 802c76c: 20002aec .word 0x20002aec 802c770: 20002ae8 .word 0x20002ae8 0802c774 : * 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) { 802c774: 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)) { 802c776: 4d0e ldr r5, [pc, #56] ; (802c7b0 ) 802c778: 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) { 802c77a: 4606 mov r6, r0 802c77c: 460f mov r7, r1 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 802c77e: b193 cbz r3, 802c7a6 return ERR_VAL; } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 802c780: 2008 movs r0, #8 802c782: f001 f857 bl 802d834 if (msg == NULL) { 802c786: 4604 mov r4, r0 802c788: b178 cbz r0, 802c7aa return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 802c78a: 2301 movs r3, #1 802c78c: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 802c78e: 6086 str r6, [r0, #8] msg->msg.inp.netif = inp; 802c790: 60c7 str r7, [r0, #12] if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { 802c792: 4621 mov r1, r4 802c794: 4628 mov r0, r5 802c796: f008 fd8b bl 80352b0 802c79a: b138 cbz r0, 802c7ac memp_free(MEMP_TCPIP_MSG_INPKT, msg); 802c79c: 2008 movs r0, #8 802c79e: 4621 mov r1, r4 802c7a0: f001 f85e bl 802d860 802c7a4: e001 b.n 802c7aa return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { return ERR_VAL; 802c7a6: 20fa movs r0, #250 ; 0xfa 802c7a8: e000 b.n 802c7ac } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { return ERR_MEM; 802c7aa: 20ff movs r0, #255 ; 0xff memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 802c7ac: b240 sxtb r0, r0 802c7ae: bdf8 pop {r3, r4, r5, r6, r7, pc} 802c7b0: 20002ae8 .word 0x20002ae8 0802c7b4 : * @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) { 802c7b4: b537 push {r0, r1, r2, r4, r5, lr} 802c7b6: 4604 mov r4, r0 802c7b8: 460d mov r5, r1 lwip_init(); 802c7ba: f000 feb3 bl 802d524 tcpip_init_done = initfunc; 802c7be: 4b09 ldr r3, [pc, #36] ; (802c7e4 ) tcpip_init_done_arg = arg; if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802c7c0: 4809 ldr r0, [pc, #36] ; (802c7e8 ) void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; 802c7c2: 601c str r4, [r3, #0] tcpip_init_done_arg = arg; 802c7c4: 4b09 ldr r3, [pc, #36] ; (802c7ec ) if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802c7c6: 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; 802c7c8: 601d str r5, [r3, #0] if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802c7ca: f008 fd63 bl 8035294 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); 802c7ce: 2303 movs r3, #3 802c7d0: 9300 str r3, [sp, #0] 802c7d2: 4907 ldr r1, [pc, #28] ; (802c7f0 ) 802c7d4: 4807 ldr r0, [pc, #28] ; (802c7f4 ) 802c7d6: 2200 movs r2, #0 802c7d8: f44f 73c8 mov.w r3, #400 ; 0x190 802c7dc: f008 fdd9 bl 8035392 } 802c7e0: bd3e pop {r1, r2, r3, r4, r5, pc} 802c7e2: bf00 nop 802c7e4: 20002af0 .word 0x20002af0 802c7e8: 20002ae8 .word 0x20002ae8 802c7ec: 20002aec .word 0x20002aec 802c7f0: 0802c6ed .word 0x0802c6ed 802c7f4: 0804133e .word 0x0804133e 0802c7f8 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802c7f8: 0a03 lsrs r3, r0, #8 802c7fa: ea43 2000 orr.w r0, r3, r0, lsl #8 } 802c7fe: b280 uxth r0, r0 802c800: 4770 bx lr 0802c802 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802c802: 0a03 lsrs r3, r0, #8 802c804: ea43 2000 orr.w r0, r3, r0, lsl #8 */ u16_t lwip_ntohs(u16_t n) { return lwip_htons(n); } 802c808: b280 uxth r0, r0 802c80a: 4770 bx lr 0802c80c : { return ((n & 0xff) << 24) | ((n & 0xff00) << 8) | ((n & 0xff0000UL) >> 8) | ((n & 0xff000000UL) >> 24); } 802c80c: ba00 rev r0, r0 802c80e: 4770 bx lr 0802c810 : * @return n in host byte order */ u32_t lwip_ntohl(u32_t n) { return lwip_htonl(n); 802c810: f7ff bffc b.w 802c80c 0802c814 : * 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) { 802c814: 7b03 ldrb r3, [r0, #12] 802c816: 428b cmp r3, r1 802c818: d003 beq.n 802c822 dhcp->state = new_state; dhcp->tries = 0; 802c81a: 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; 802c81c: 7301 strb r1, [r0, #12] dhcp->tries = 0; 802c81e: 7343 strb r3, [r0, #13] dhcp->request_timeout = 0; 802c820: 8343 strh r3, [r0, #26] 802c822: 4770 bx lr 0802c824 : */ 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; 802c824: 8b03 ldrh r3, [r0, #24] * DHCP message. * */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { 802c826: 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; 802c828: 6944 ldr r4, [r0, #20] 802c82a: 18e4 adds r4, r4, r3 802c82c: f884 10f0 strb.w r1, [r4, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802c830: 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; 802c832: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 802c834: fa11 f184 uxtah r1, r1, r4 802c838: 3302 adds r3, #2 802c83a: f881 20f0 strb.w r2, [r1, #240] ; 0xf0 802c83e: 8303 strh r3, [r0, #24] 802c840: bd10 pop {r4, pc} 0802c842 : */ 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; 802c842: 8b03 ldrh r3, [r0, #24] 802c844: 6942 ldr r2, [r0, #20] 802c846: 18d2 adds r2, r2, r3 802c848: 3301 adds r3, #1 802c84a: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802c84e: 8303 strh r3, [r0, #24] 802c850: 4770 bx lr 0802c852 : 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); 802c852: 8b03 ldrh r3, [r0, #24] 802c854: 6942 ldr r2, [r0, #20] 802c856: 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) { 802c858: 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); 802c85a: 0a0c lsrs r4, r1, #8 802c85c: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802c860: 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); 802c862: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 802c864: fa12 f284 uxtah r2, r2, r4 802c868: 3302 adds r3, #2 802c86a: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802c86e: 8303 strh r3, [r0, #24] 802c870: bd10 pop {r4, pc} 0802c872 : 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); 802c872: 8b03 ldrh r3, [r0, #24] 802c874: 6942 ldr r2, [r0, #20] 802c876: 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) { 802c878: 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); 802c87a: 0e0c lsrs r4, r1, #24 802c87c: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802c880: 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); 802c882: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 802c884: fa12 f284 uxtah r2, r2, r4 802c888: f3c1 4407 ubfx r4, r1, #16, #8 802c88c: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802c890: 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); 802c892: 1c9c adds r4, r3, #2 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 802c894: fa12 f284 uxtah r2, r2, r4 802c898: f3c1 2407 ubfx r4, r1, #8, #8 802c89c: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802c8a0: 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); 802c8a2: 1cdc adds r4, r3, #3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 802c8a4: fa12 f284 uxtah r2, r2, r4 802c8a8: 3304 adds r3, #4 802c8aa: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802c8ae: 8303 strh r3, [r0, #24] 802c8b0: bd10 pop {r4, pc} 0802c8b2 : * @param dhcp DHCP state structure */ static void dhcp_option_trailer(struct dhcp *dhcp) { LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); 802c8b2: b190 cbz r0, 802c8da 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; 802c8b4: 8b03 ldrh r3, [r0, #24] 802c8b6: 6942 ldr r2, [r0, #20] 802c8b8: 18d2 adds r2, r2, r3 802c8ba: 21ff movs r1, #255 ; 0xff 802c8bc: 3301 adds r3, #1 802c8be: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802c8c2: 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; 802c8c4: 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)) && 802c8c6: e005 b.n 802c8d4 (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802c8c8: 6942 ldr r2, [r0, #20] 802c8ca: 18d2 adds r2, r2, r3 802c8cc: 3301 adds r3, #1 802c8ce: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 802c8d2: 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)) && 802c8d4: 8b03 ldrh r3, [r0, #24] 802c8d6: 2b43 cmp r3, #67 ; 0x43 802c8d8: d9f6 bls.n 802c8c8 802c8da: 4770 bx lr 0802c8dc : * @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) { 802c8dc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c8e0: 460c mov r4, r1 802c8e2: 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;); 802c8e4: 4606 mov r6, r0 802c8e6: 2800 cmp r0, #0 802c8e8: f000 808e beq.w 802ca08 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802c8ec: 2900 cmp r1, #0 802c8ee: f000 808d beq.w 802ca0c 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); 802c8f2: 2000 movs r0, #0 802c8f4: f44f 719a mov.w r1, #308 ; 0x134 802c8f8: 4602 mov r2, r0 802c8fa: f001 f908 bl 802db0e 802c8fe: 6120 str r0, [r4, #16] if (dhcp->p_out == NULL) { 802c900: 2800 cmp r0, #0 802c902: f000 8085 beq.w 802ca10 } 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) { 802c906: 7b62 ldrb r2, [r4, #13] 802c908: 4b43 ldr r3, [pc, #268] ; (802ca18 ) 802c90a: b912 cbnz r2, 802c912 #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; 802c90c: 681a ldr r2, [r3, #0] 802c90e: 3201 adds r2, #1 802c910: 601a str r2, [r3, #0] #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802c912: 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; 802c914: 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; 802c916: 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; 802c918: 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; 802c91a: 6162 str r2, [r4, #20] dhcp->msg_out->op = DHCP_BOOTREQUEST; 802c91c: 7013 strb r3, [r2, #0] /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; 802c91e: 6962 ldr r2, [r4, #20] 802c920: 7053 strb r3, [r2, #1] dhcp->msg_out->hlen = netif->hwaddr_len; 802c922: 6963 ldr r3, [r4, #20] 802c924: f896 2026 ldrb.w r2, [r6, #38] ; 0x26 802c928: 709a strb r2, [r3, #2] dhcp->msg_out->hops = 0; 802c92a: 6963 ldr r3, [r4, #20] 802c92c: 2500 movs r5, #0 802c92e: 70dd strb r5, [r3, #3] dhcp->msg_out->xid = htonl(dhcp->xid); 802c930: 6820 ldr r0, [r4, #0] 802c932: f8d4 8014 ldr.w r8, [r4, #20] 802c936: f7ff ff69 bl 802c80c 802c93a: f8c8 0004 str.w r0, [r8, #4] dhcp->msg_out->secs = 0; 802c93e: 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) || 802c940: 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; 802c942: 721d strb r5, [r3, #8] 802c944: 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; 802c946: 729d strb r5, [r3, #10] 802c948: 72dd strb r5, [r3, #11] ip_addr_set_zero(&dhcp->msg_out->ciaddr); 802c94a: 731d strb r5, [r3, #12] 802c94c: 735d strb r5, [r3, #13] 802c94e: 739d strb r5, [r3, #14] 802c950: 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) || 802c952: d007 beq.n 802c964 802c954: 2f04 cmp r7, #4 802c956: d005 beq.n 802c964 802c958: 2f03 cmp r7, #3 802c95a: d105 bne.n 802c968 ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { 802c95c: 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! */ 802c95e: 3a04 subs r2, #4 802c960: 2a01 cmp r2, #1 802c962: d801 bhi.n 802c968 ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); 802c964: 6872 ldr r2, [r6, #4] 802c966: 60da str r2, [r3, #12] } ip_addr_set_zero(&dhcp->msg_out->yiaddr); 802c968: 2500 movs r5, #0 802c96a: 741d strb r5, [r3, #16] 802c96c: 745d strb r5, [r3, #17] 802c96e: 749d strb r5, [r3, #18] 802c970: 74dd strb r5, [r3, #19] ip_addr_set_zero(&dhcp->msg_out->siaddr); 802c972: 751d strb r5, [r3, #20] 802c974: 755d strb r5, [r3, #21] 802c976: 759d strb r5, [r3, #22] 802c978: 75dd strb r5, [r3, #23] ip_addr_set_zero(&dhcp->msg_out->giaddr); 802c97a: 761d strb r5, [r3, #24] 802c97c: 765d strb r5, [r3, #25] 802c97e: 769d strb r5, [r3, #26] 802c980: 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*/; 802c982: f896 1026 ldrb.w r1, [r6, #38] ; 0x26 802c986: 6962 ldr r2, [r4, #20] 802c988: b2ab uxth r3, r5 802c98a: 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) 802c98c: bf88 it hi 802c98e: 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*/; 802c990: 442a add r2, r5 802c992: bf8c ite hi 802c994: f893 3027 ldrbhi.w r3, [r3, #39] ; 0x27 802c998: 2300 movls r3, #0 802c99a: 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++) { 802c99c: 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*/; 802c99e: 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++) { 802c9a0: d1ef bne.n 802c982 802c9a2: 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; 802c9a4: 4619 mov r1, r3 802c9a6: 6962 ldr r2, [r4, #20] 802c9a8: 18d2 adds r2, r2, r3 802c9aa: 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++) { 802c9ac: 2b40 cmp r3, #64 ; 0x40 dhcp->msg_out->sname[i] = 0; 802c9ae: 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++) { 802c9b2: d1f8 bne.n 802c9a6 802c9b4: 2200 movs r2, #0 dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { dhcp->msg_out->file[i] = 0; 802c9b6: 4610 mov r0, r2 802c9b8: 6963 ldr r3, [r4, #20] 802c9ba: 1899 adds r1, r3, r2 802c9bc: 3201 adds r2, #1 802c9be: 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++) { 802c9c0: 2a80 cmp r2, #128 ; 0x80 dhcp->msg_out->file[i] = 0; 802c9c2: 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++) { 802c9c6: d1f7 bne.n 802c9b8 dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 802c9c8: 6962 ldr r2, [r4, #20] 802c9ca: f06f 007d mvn.w r0, #125 ; 0x7d 802c9ce: 2163 movs r1, #99 ; 0x63 802c9d0: f882 00ed strb.w r0, [r2, #237] ; 0xed 802c9d4: 2053 movs r0, #83 ; 0x53 802c9d6: f882 10ec strb.w r1, [r2, #236] ; 0xec 802c9da: f882 00ee strb.w r0, [r2, #238] ; 0xee 802c9de: f882 10ef strb.w r1, [r2, #239] ; 0xef dhcp->options_out_len = 0; 802c9e2: 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 */ 802c9e4: 6962 ldr r2, [r4, #20] 802c9e6: 18d2 adds r2, r2, r3 802c9e8: f882 30f0 strb.w r3, [r2, #240] ; 0xf0 802c9ec: 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++) { 802c9ee: 2b44 cmp r3, #68 ; 0x44 802c9f0: d1f8 bne.n 802c9e4 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); 802c9f2: 4620 mov r0, r4 802c9f4: 2135 movs r1, #53 ; 0x35 802c9f6: 2201 movs r2, #1 802c9f8: f7ff ff14 bl 802c824 dhcp_option_byte(dhcp, message_type); 802c9fc: 4620 mov r0, r4 802c9fe: 4639 mov r1, r7 802ca00: f7ff ff1f bl 802c842 return ERR_OK; 802ca04: 2000 movs r0, #0 802ca06: e004 b.n 802ca12 if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802ca08: 20f2 movs r0, #242 ; 0xf2 802ca0a: e002 b.n 802ca12 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 802ca0c: 20fa movs r0, #250 ; 0xfa 802ca0e: e000 b.n 802ca12 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; 802ca10: 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; } 802ca12: b240 sxtb r0, r0 802ca14: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802ca18: 200015e8 .word 0x200015e8 0802ca1c : * * @param dhcp the dhcp struct to free the request from */ static void dhcp_delete_msg(struct dhcp *dhcp) { 802ca1c: b510 push {r4, lr} LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); 802ca1e: 4604 mov r4, r0 802ca20: b130 cbz r0, 802ca30 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) { 802ca22: 6900 ldr r0, [r0, #16] 802ca24: b108 cbz r0, 802ca2a pbuf_free(dhcp->p_out); 802ca26: f001 f825 bl 802da74 } dhcp->p_out = NULL; 802ca2a: 2300 movs r3, #0 802ca2c: 6123 str r3, [r4, #16] dhcp->msg_out = NULL; 802ca2e: 6163 str r3, [r4, #20] 802ca30: bd10 pop {r4, pc} 802ca32: 0000 movs r0, r0 0802ca34 : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802ca34: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802ca36: 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); 802ca38: 2300 movs r3, #0 * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802ca3a: 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); 802ca3c: 6263 str r3, [r4, #36] ; 0x24 dhcp_set_state(dhcp, DHCP_SELECTING); 802ca3e: 4620 mov r0, r4 802ca40: 2106 movs r1, #6 802ca42: f7ff fee7 bl 802c814 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); 802ca46: 4628 mov r0, r5 802ca48: 4621 mov r1, r4 802ca4a: 2201 movs r2, #1 802ca4c: f7ff ff46 bl 802c8dc if (result == ERR_OK) { 802ca50: 4606 mov r6, r0 802ca52: 2800 cmp r0, #0 802ca54: d130 bne.n 802cab8 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); 802ca56: 2202 movs r2, #2 802ca58: 4620 mov r0, r4 802ca5a: 2139 movs r1, #57 ; 0x39 802ca5c: f7ff fee2 bl 802c824 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802ca60: 4620 mov r0, r4 802ca62: 8ca9 ldrh r1, [r5, #36] ; 0x24 802ca64: f7ff fef5 bl 802c852 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802ca68: 2204 movs r2, #4 802ca6a: 4620 mov r0, r4 802ca6c: 2137 movs r1, #55 ; 0x37 802ca6e: f7ff fed9 bl 802c824 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802ca72: 4620 mov r0, r4 802ca74: 2101 movs r1, #1 802ca76: f7ff fee4 bl 802c842 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802ca7a: 4620 mov r0, r4 802ca7c: 2103 movs r1, #3 802ca7e: f7ff fee0 bl 802c842 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802ca82: 4620 mov r0, r4 802ca84: 211c movs r1, #28 802ca86: f7ff fedc bl 802c842 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802ca8a: 2106 movs r1, #6 802ca8c: 4620 mov r0, r4 802ca8e: f7ff fed8 bl 802c842 dhcp_option_trailer(dhcp); 802ca92: 4620 mov r0, r4 802ca94: f7ff ff0d bl 802c8b2 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); 802ca98: 8b21 ldrh r1, [r4, #24] 802ca9a: 6920 ldr r0, [r4, #16] 802ca9c: 31f0 adds r1, #240 ; 0xf0 802ca9e: b289 uxth r1, r1 802caa0: f001 f80f bl 802dac2 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); 802caa4: 9500 str r5, [sp, #0] 802caa6: 6860 ldr r0, [r4, #4] 802caa8: 6921 ldr r1, [r4, #16] 802caaa: 4a0f ldr r2, [pc, #60] ; (802cae8 ) 802caac: 2343 movs r3, #67 ; 0x43 802caae: f003 fc81 bl 80303b4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); dhcp_delete_msg(dhcp); 802cab2: 4620 mov r0, r4 802cab4: f7ff ffb2 bl 802ca1c 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++; 802cab8: 7b63 ldrb r3, [r4, #13] 802caba: 3301 adds r3, #1 802cabc: 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; 802cabe: 2b05 cmp r3, #5 802cac0: bf98 it ls 802cac2: 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++; 802cac6: 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; 802cac8: bf9a itte ls 802caca: fa02 f303 lslls.w r3, r2, r3 802cace: b29b uxthls r3, r3 802cad0: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802cad4: f44f 72fa mov.w r2, #500 ; 0x1f4 802cad8: f203 13f3 addw r3, r3, #499 ; 0x1f3 802cadc: fb93 f3f2 sdiv r3, r3, r2 802cae0: 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; } 802cae2: 4630 mov r0, r6 802cae4: bd7c pop {r2, r3, r4, r5, r6, pc} 802cae6: bf00 nop 802cae8: 080413b0 .word 0x080413b0 0802caec : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802caec: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802caee: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802caf0: 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); 802caf2: 2104 movs r1, #4 802caf4: 4620 mov r0, r4 802caf6: f7ff fe8d bl 802c814 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802cafa: 4628 mov r0, r5 802cafc: 4621 mov r1, r4 802cafe: 2203 movs r2, #3 802cb00: f7ff feec bl 802c8dc if (result == ERR_OK) { 802cb04: 4606 mov r6, r0 802cb06: b9d8 cbnz r0, 802cb40 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802cb08: 2202 movs r2, #2 802cb0a: 4620 mov r0, r4 802cb0c: 2139 movs r1, #57 ; 0x39 802cb0e: f7ff fe89 bl 802c824 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802cb12: 8ca9 ldrh r1, [r5, #36] ; 0x24 802cb14: 4620 mov r0, r4 802cb16: f7ff fe9c bl 802c852 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(dhcp->server_ip_addr.addr)); #endif dhcp_option_trailer(dhcp); 802cb1a: 4620 mov r0, r4 802cb1c: f7ff fec9 bl 802c8b2 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802cb20: 8b21 ldrh r1, [r4, #24] 802cb22: 6920 ldr r0, [r4, #16] 802cb24: 31f0 adds r1, #240 ; 0xf0 802cb26: b289 uxth r1, r1 802cb28: f000 ffcb bl 802dac2 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802cb2c: 9500 str r5, [sp, #0] 802cb2e: 6860 ldr r0, [r4, #4] 802cb30: 6921 ldr r1, [r4, #16] 802cb32: 4a0e ldr r2, [pc, #56] ; (802cb6c ) 802cb34: 2343 movs r3, #67 ; 0x43 802cb36: f003 fc3d bl 80303b4 dhcp_delete_msg(dhcp); 802cb3a: 4620 mov r0, r4 802cb3c: f7ff ff6e bl 802ca1c 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++; 802cb40: 7b63 ldrb r3, [r4, #13] 802cb42: 3301 adds r3, #1 802cb44: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802cb46: 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++; 802cb48: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802cb4a: d804 bhi.n 802cb56 802cb4c: f44f 727a mov.w r2, #1000 ; 0x3e8 802cb50: 4353 muls r3, r2 802cb52: b29b uxth r3, r3 802cb54: e001 b.n 802cb5a 802cb56: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802cb5a: f44f 72fa mov.w r2, #500 ; 0x1f4 802cb5e: f203 13f3 addw r3, r3, #499 ; 0x1f3 802cb62: fb93 f3f2 sdiv r3, r3, r2 802cb66: 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; } 802cb68: 4630 mov r0, r6 802cb6a: bd7c pop {r2, r3, r4, r5, r6, pc} 802cb6c: 080413b0 .word 0x080413b0 0802cb70 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802cb70: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802cb72: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 802cb74: 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); 802cb76: 2103 movs r1, #3 802cb78: 4620 mov r0, r4 802cb7a: f7ff fe4b bl 802c814 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802cb7e: 4628 mov r0, r5 802cb80: 4621 mov r1, r4 802cb82: 2203 movs r2, #3 802cb84: f7ff feaa bl 802c8dc if (result == ERR_OK) { 802cb88: 4606 mov r6, r0 802cb8a: bb40 cbnz r0, 802cbde dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802cb8c: 2202 movs r2, #2 802cb8e: 4620 mov r0, r4 802cb90: 2139 movs r1, #57 ; 0x39 802cb92: f7ff fe47 bl 802c824 dhcp_option_short(dhcp, 576); 802cb96: 4620 mov r0, r4 802cb98: f44f 7110 mov.w r1, #576 ; 0x240 802cb9c: f7ff fe59 bl 802c852 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802cba0: 2204 movs r2, #4 802cba2: 2132 movs r1, #50 ; 0x32 802cba4: 4620 mov r0, r4 802cba6: f7ff fe3d bl 802c824 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802cbaa: 6a60 ldr r0, [r4, #36] ; 0x24 802cbac: f7ff fe30 bl 802c810 802cbb0: 4601 mov r1, r0 802cbb2: 4620 mov r0, r4 802cbb4: f7ff fe5d bl 802c872 dhcp_option_trailer(dhcp); 802cbb8: 4620 mov r0, r4 802cbba: f7ff fe7a bl 802c8b2 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802cbbe: 8b21 ldrh r1, [r4, #24] 802cbc0: 6920 ldr r0, [r4, #16] 802cbc2: 31f0 adds r1, #240 ; 0xf0 802cbc4: b289 uxth r1, r1 802cbc6: f000 ff7c bl 802dac2 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802cbca: 9500 str r5, [sp, #0] 802cbcc: 6860 ldr r0, [r4, #4] 802cbce: 6921 ldr r1, [r4, #16] 802cbd0: 4a0e ldr r2, [pc, #56] ; (802cc0c ) 802cbd2: 2343 movs r3, #67 ; 0x43 802cbd4: f003 fbee bl 80303b4 dhcp_delete_msg(dhcp); 802cbd8: 4620 mov r0, r4 802cbda: f7ff ff1f bl 802ca1c 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++; 802cbde: 7b63 ldrb r3, [r4, #13] 802cbe0: 3301 adds r3, #1 802cbe2: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802cbe4: 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++; 802cbe6: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802cbe8: d804 bhi.n 802cbf4 802cbea: f44f 727a mov.w r2, #1000 ; 0x3e8 802cbee: 4353 muls r3, r2 802cbf0: b29b uxth r3, r3 802cbf2: e001 b.n 802cbf8 802cbf4: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802cbf8: f44f 72fa mov.w r2, #500 ; 0x1f4 802cbfc: f203 13f3 addw r3, r3, #499 ; 0x1f3 802cc00: fb93 f3f2 sdiv r3, r3, r2 802cc04: 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; } 802cc06: 4630 mov r0, r6 802cc08: bd7c pop {r2, r3, r4, r5, r6, pc} 802cc0a: bf00 nop 802cc0c: 080413b0 .word 0x080413b0 0802cc10 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 802cc10: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802cc12: 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) { 802cc14: 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); 802cc16: 2101 movs r1, #1 802cc18: 4620 mov r0, r4 802cc1a: f7ff fdfb bl 802c814 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802cc1e: 4628 mov r0, r5 802cc20: 4621 mov r1, r4 802cc22: 2203 movs r2, #3 802cc24: f7ff fe5a bl 802c8dc if (result == ERR_OK) { 802cc28: 4606 mov r6, r0 802cc2a: 2800 cmp r0, #0 802cc2c: d148 bne.n 802ccc0 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802cc2e: 2202 movs r2, #2 802cc30: 4620 mov r0, r4 802cc32: 2139 movs r1, #57 ; 0x39 802cc34: f7ff fdf6 bl 802c824 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802cc38: 4620 mov r0, r4 802cc3a: 8ca9 ldrh r1, [r5, #36] ; 0x24 802cc3c: f7ff fe09 bl 802c852 /* MUST request the offered IP address */ dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802cc40: 2204 movs r2, #4 802cc42: 2132 movs r1, #50 ; 0x32 802cc44: 4620 mov r0, r4 802cc46: f7ff fded bl 802c824 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802cc4a: 6a60 ldr r0, [r4, #36] ; 0x24 802cc4c: f7ff fde0 bl 802c810 802cc50: 4601 mov r1, r0 802cc52: 4620 mov r0, r4 802cc54: f7ff fe0d bl 802c872 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); 802cc58: 2204 movs r2, #4 802cc5a: 2136 movs r1, #54 ; 0x36 802cc5c: 4620 mov r0, r4 802cc5e: f7ff fde1 bl 802c824 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->server_ip_addr))); 802cc62: 6a20 ldr r0, [r4, #32] 802cc64: f7ff fdd4 bl 802c810 802cc68: 4601 mov r1, r0 802cc6a: 4620 mov r0, r4 802cc6c: f7ff fe01 bl 802c872 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 802cc70: 2204 movs r2, #4 802cc72: 4620 mov r0, r4 802cc74: 2137 movs r1, #55 ; 0x37 802cc76: f7ff fdd5 bl 802c824 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 802cc7a: 4620 mov r0, r4 802cc7c: 2101 movs r1, #1 802cc7e: f7ff fde0 bl 802c842 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 802cc82: 4620 mov r0, r4 802cc84: 2103 movs r1, #3 802cc86: f7ff fddc bl 802c842 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 802cc8a: 4620 mov r0, r4 802cc8c: 211c movs r1, #28 802cc8e: f7ff fdd8 bl 802c842 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 802cc92: 2106 movs r1, #6 802cc94: 4620 mov r0, r4 802cc96: f7ff fdd4 bl 802c842 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ dhcp_option_trailer(dhcp); 802cc9a: 4620 mov r0, r4 802cc9c: f7ff fe09 bl 802c8b2 /* shrink the pbuf to the actual content length */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802cca0: 8b21 ldrh r1, [r4, #24] 802cca2: 6920 ldr r0, [r4, #16] 802cca4: 31f0 adds r1, #240 ; 0xf0 802cca6: b289 uxth r1, r1 802cca8: f000 ff0b bl 802dac2 /* send broadcast to any DHCP server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802ccac: 9500 str r5, [sp, #0] 802ccae: 6860 ldr r0, [r4, #4] 802ccb0: 6921 ldr r1, [r4, #16] 802ccb2: 4a0f ldr r2, [pc, #60] ; (802ccf0 ) 802ccb4: 2343 movs r3, #67 ; 0x43 802ccb6: f003 fb7d bl 80303b4 dhcp_delete_msg(dhcp); 802ccba: 4620 mov r0, r4 802ccbc: f7ff feae bl 802ca1c 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++; 802ccc0: 7b63 ldrb r3, [r4, #13] 802ccc2: 3301 adds r3, #1 802ccc4: b2db uxtb r3, r3 msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802ccc6: 2b05 cmp r3, #5 802ccc8: bf98 it ls 802ccca: 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++; 802ccce: 7363 strb r3, [r4, #13] msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802ccd0: bf9a itte ls 802ccd2: fa02 f303 lslls.w r3, r2, r3 802ccd6: b29b uxthls r3, r3 802ccd8: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802ccdc: f44f 72fa mov.w r2, #500 ; 0x1f4 802cce0: f203 13f3 addw r3, r3, #499 ; 0x1f3 802cce4: fb93 f3f2 sdiv r3, r3, r2 802cce8: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802ccea: 4630 mov r0, r6 802ccec: bd7c pop {r2, r3, r4, r5, r6, pc} 802ccee: bf00 nop 802ccf0: 080413b0 .word 0x080413b0 0802ccf4 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802ccf4: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif->dhcp; 802ccf6: 6a04 ldr r4, [r0, #32] * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802ccf8: 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); 802ccfa: 2108 movs r1, #8 802ccfc: 4620 mov r0, r4 802ccfe: f7ff fd89 bl 802c814 /* 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); 802cd02: 4628 mov r0, r5 802cd04: f104 0124 add.w r1, r4, #36 ; 0x24 802cd08: 2200 movs r2, #0 802cd0a: f007 ff63 bl 8034bd4 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++; 802cd0e: 7b63 ldrb r3, [r4, #13] 802cd10: 3301 adds r3, #1 802cd12: 7363 strb r3, [r4, #13] msecs = 500; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802cd14: 2301 movs r3, #1 802cd16: 8363 strh r3, [r4, #26] 802cd18: bd38 pop {r3, r4, r5, pc} 0802cd1a : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 802cd1a: 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;); 802cd1c: 4605 mov r5, r0 802cd1e: 2800 cmp r0, #0 802cd20: d059 beq.n 802cdd6 dhcp = netif->dhcp; 802cd22: 6a04 ldr r4, [r0, #32] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 802cd24: 2c00 cmp r4, #0 802cd26: d056 beq.n 802cdd6 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) { 802cd28: 6b63 ldr r3, [r4, #52] ; 0x34 802cd2a: 1c58 adds r0, r3, #1 802cd2c: d00d beq.n 802cd4a /* 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; 802cd2e: 223c movs r2, #60 ; 0x3c 802cd30: 331e adds r3, #30 802cd32: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t1_timeout = (u16_t)timeout; 802cd36: f64f 72ff movw r2, #65535 ; 0xffff 802cd3a: 4293 cmp r3, r2 802cd3c: bf28 it cs 802cd3e: 4613 movcs r3, r2 802cd40: b29b uxth r3, r3 802cd42: 83a3 strh r3, [r4, #28] if (dhcp->t1_timeout == 0) { 802cd44: b90b cbnz r3, 802cd4a dhcp->t1_timeout = 1; 802cd46: 2301 movs r3, #1 802cd48: 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) { 802cd4a: 6ba3 ldr r3, [r4, #56] ; 0x38 802cd4c: 1c59 adds r1, r3, #1 802cd4e: d00d beq.n 802cd6c 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; 802cd50: 223c movs r2, #60 ; 0x3c 802cd52: 331e adds r3, #30 802cd54: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t2_timeout = (u16_t)timeout; 802cd58: f64f 72ff movw r2, #65535 ; 0xffff 802cd5c: 4293 cmp r3, r2 802cd5e: bf28 it cs 802cd60: 4613 movcs r3, r2 802cd62: b29b uxth r3, r3 802cd64: 83e3 strh r3, [r4, #30] if (dhcp->t2_timeout == 0) { 802cd66: b90b cbnz r3, 802cd6c dhcp->t2_timeout = 1; 802cd68: 2301 movs r3, #1 802cd6a: 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)) { 802cd6c: 8be3 ldrh r3, [r4, #30] 802cd6e: 8ba2 ldrh r2, [r4, #28] 802cd70: 429a cmp r2, r3 802cd72: d302 bcc.n 802cd7a 802cd74: b10b cbz r3, 802cd7a dhcp->t1_timeout = 0; 802cd76: 2300 movs r3, #0 802cd78: 83a3 strh r3, [r4, #28] } if (dhcp->subnet_mask_given) { 802cd7a: 7ba3 ldrb r3, [r4, #14] 802cd7c: b10b cbz r3, 802cd82 /* copy offered network mask */ ip_addr_copy(sn_mask, dhcp->offered_sn_mask); 802cd7e: 6aa3 ldr r3, [r4, #40] ; 0x28 802cd80: e00b b.n 802cd9a } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 802cd82: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 if (first_octet <= 127) { 802cd86: 061a lsls r2, r3, #24 802cd88: d401 bmi.n 802cd8e ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 802cd8a: 23ff movs r3, #255 ; 0xff 802cd8c: e005 b.n 802cd9a } else if (first_octet >= 192) { 802cd8e: 2bbf cmp r3, #191 ; 0xbf ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 802cd90: bf8c ite hi 802cd92: f06f 437f mvnhi.w r3, #4278190080 ; 0xff000000 } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 802cd96: f64f 73ff movwls r3, #65535 ; 0xffff 802cd9a: 9300 str r3, [sp, #0] } } ip_addr_copy(gw_addr, dhcp->offered_gw_addr); 802cd9c: 6ae3 ldr r3, [r4, #44] ; 0x2c 802cd9e: 9301 str r3, [sp, #4] /* gateway address not given? */ if (ip_addr_isany(&gw_addr)) { 802cda0: b92b cbnz r3, 802cdae /* copy network address */ ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802cda2: 6a63 ldr r3, [r4, #36] ; 0x24 802cda4: 9a00 ldr r2, [sp, #0] 802cda6: 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)); 802cda8: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 802cdac: 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); 802cdae: 4628 mov r0, r5 802cdb0: f104 0124 add.w r1, r4, #36 ; 0x24 802cdb4: f000 fd6a bl 802d88c 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); 802cdb8: 4628 mov r0, r5 802cdba: 4669 mov r1, sp 802cdbc: f000 fda6 bl 802d90c 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); 802cdc0: a901 add r1, sp, #4 802cdc2: 4628 mov r0, r5 802cdc4: f000 fd9e bl 802d904 /* bring the interface up */ netif_set_up(netif); 802cdc8: 4628 mov r0, r5 802cdca: f000 fdf5 bl 802d9b8 /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); 802cdce: 4620 mov r0, r4 802cdd0: 210a movs r1, #10 802cdd2: f7ff fd1f bl 802c814 } 802cdd6: bd3e pop {r1, r2, r3, r4, r5, pc} 0802cdd8 : /** * 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) { 802cdd8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cddc: 4692 mov sl, r2 802cdde: 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) { 802cde0: 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; 802cde4: f8d0 8020 ldr.w r8, [r0, #32] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802cde8: 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) { 802cdea: 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) { 802cdec: 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) { 802cdee: f240 81b8 bls.w 802d162 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) { 802cdf2: 7813 ldrb r3, [r2, #0] 802cdf4: 2b02 cmp r3, #2 802cdf6: f040 81b4 bne.w 802d162 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++) { 802cdfa: f890 1026 ldrb.w r1, [r0, #38] ; 0x26 802cdfe: 2300 movs r3, #0 802ce00: e008 b.n 802ce14 /** * 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) 802ce02: 18e8 adds r0, r5, r3 802ce04: 3301 adds r3, #1 802ce06: 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]) { 802ce08: f890 0027 ldrb.w r0, [r0, #39] ; 0x27 802ce0c: 7ee4 ldrb r4, [r4, #27] 802ce0e: 4284 cmp r4, r0 802ce10: f040 81a7 bne.w 802d162 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++) { 802ce14: b2d8 uxtb r0, r3 802ce16: 4288 cmp r0, r1 802ce18: d3f3 bcc.n 802ce02 (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) { 802ce1a: 6850 ldr r0, [r2, #4] 802ce1c: f7ff fcf8 bl 802c810 802ce20: f8d8 3000 ldr.w r3, [r8] 802ce24: 4298 cmp r0, r3 802ce26: f040 819c bne.w 802d162 struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; /* clear received options */ dhcp_clear_all_options(dhcp); 802ce2a: 2100 movs r1, #0 802ce2c: 220a movs r2, #10 802ce2e: 489d ldr r0, [pc, #628] ; (802d0a4 ) 802ce30: f7f4 fe46 bl 8021ac0 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 802ce34: f8ba 300a ldrh.w r3, [sl, #10] 802ce38: 2b2b cmp r3, #43 ; 0x2b 802ce3a: f240 8192 bls.w 802d162 return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 802ce3e: 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; 802ce42: 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; 802ce46: 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; 802ce4a: f04f 0b00 mov.w fp, #0 #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802ce4e: 22f0 movs r2, #240 ; 0xf0 802ce50: e004 b.n 802ce5c 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; 802ce52: f04f 0b00 mov.w fp, #0 options_idx = DHCP_SNAME_OFS; options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 802ce56: 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; 802ce5a: 222c movs r2, #44 ; 0x2c #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 802ce5c: 4657 mov r7, sl 802ce5e: e009 b.n 802ce74 again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; options_idx_max -= q->len; q = q->next; 802ce60: 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; 802ce62: 1ad2 subs r2, r2, r3 options_idx_max -= q->len; 802ce64: 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; 802ce68: b292 uxth r2, r2 options_idx_max -= q->len; 802ce6a: 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)) { 802ce6e: 2f00 cmp r7, #0 802ce70: f000 8177 beq.w 802d162 802ce74: 897b ldrh r3, [r7, #10] 802ce76: 429a cmp r2, r3 802ce78: d2f2 bcs.n 802ce60 if (q == NULL) { return ERR_BUF; } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; 802ce7a: 6878 ldr r0, [r7, #4] 802ce7c: 9003 str r0, [sp, #12] 802ce7e: e0db b.n 802d038 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) { 802ce80: 897b ldrh r3, [r7, #10] 802ce82: 1c50 adds r0, r2, #1 802ce84: 4298 cmp r0, r3 802ce86: da03 bge.n 802ce90 len = options[offset + 1]; 802ce88: 9803 ldr r0, [sp, #12] 802ce8a: 1883 adds r3, r0, r2 802ce8c: 785b ldrb r3, [r3, #1] 802ce8e: e003 b.n 802ce98 } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); 802ce90: 683b ldr r3, [r7, #0] 802ce92: b10b cbz r3, 802ce98 802ce94: 685b ldr r3, [r3, #4] 802ce96: 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) { 802ce98: 2933 cmp r1, #51 ; 0x33 802ce9a: d038 beq.n 802cf0e 802ce9c: d807 bhi.n 802ceae 802ce9e: 2901 cmp r1, #1 802cea0: d019 beq.n 802ced6 802cea2: d311 bcc.n 802cec8 802cea4: 2903 cmp r1, #3 802cea6: d01d beq.n 802cee4 802cea8: 2906 cmp r1, #6 802ceaa: d155 bne.n 802cf58 802ceac: e021 b.n 802cef2 802ceae: 2936 cmp r1, #54 ; 0x36 802ceb0: d03d beq.n 802cf2e 802ceb2: d804 bhi.n 802cebe 802ceb4: 2934 cmp r1, #52 ; 0x34 802ceb6: d031 beq.n 802cf1c 802ceb8: 2935 cmp r1, #53 ; 0x35 802ceba: d14d bne.n 802cf58 802cebc: e035 b.n 802cf2a 802cebe: 293a cmp r1, #58 ; 0x3a 802cec0: d03c beq.n 802cf3c 802cec2: 293b cmp r1, #59 ; 0x3b 802cec4: d148 bne.n 802cf58 802cec6: e040 b.n 802cf4a /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ offset--; 802cec8: 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; 802ceca: 2300 movs r3, #0 /* will be increased below */ offset--; 802cecc: 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; 802cece: 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; 802ced2: 461e mov r6, r3 802ced4: e044 b.n 802cf60 /* will be increased below */ offset--; break; case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802ced6: 2b04 cmp r3, #4 802ced8: f040 8143 bne.w 802d162 802cedc: 461e mov r6, r3 802cede: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 802cee0: 2406 movs r4, #6 802cee2: e03d b.n 802cf60 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;); 802cee4: 2b03 cmp r3, #3 802cee6: f240 813c bls.w 802d162 802ceea: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_ROUTER; 802ceec: 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 */ 802ceee: 2604 movs r6, #4 802cef0: e036 b.n 802cf60 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;); 802cef2: 0799 lsls r1, r3, #30 802cef4: f040 8135 bne.w 802d162 /* limit number of DNS servers */ decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); 802cef8: 2b08 cmp r3, #8 802cefa: bf34 ite cc 802cefc: 461e movcc r6, r3 802cefe: 2608 movcs r6, #8 802cf00: b2f6 uxtb r6, r6 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 802cf02: 42b3 cmp r3, r6 802cf04: f0c0 812d bcc.w 802d162 802cf08: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_DNS_SERVER; 802cf0a: 2408 movs r4, #8 802cf0c: e028 b.n 802cf60 break; case(DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802cf0e: 2b04 cmp r3, #4 802cf10: f040 8127 bne.w 802d162 802cf14: 461e mov r6, r3 802cf16: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 802cf18: 2403 movs r4, #3 802cf1a: e021 b.n 802cf60 break; case(DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802cf1c: 2b01 cmp r3, #1 802cf1e: f040 8120 bne.w 802d162 802cf22: 461e mov r6, r3 802cf24: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802cf26: 2400 movs r4, #0 802cf28: e01a b.n 802cf60 break; case(DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802cf2a: 2b01 cmp r3, #1 802cf2c: e007 b.n 802cf3e decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; case(DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802cf2e: 2b04 cmp r3, #4 802cf30: f040 8117 bne.w 802d162 802cf34: 461e mov r6, r3 802cf36: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802cf38: 2402 movs r4, #2 802cf3a: e011 b.n 802cf60 break; case(DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802cf3c: 2b04 cmp r3, #4 802cf3e: f040 8110 bne.w 802d162 802cf42: 461e mov r6, r3 802cf44: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T1; 802cf46: 461c mov r4, r3 802cf48: e00a b.n 802cf60 break; case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802cf4a: 2b04 cmp r3, #4 802cf4c: f040 8109 bne.w 802d162 802cf50: 461e mov r6, r3 802cf52: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T2; 802cf54: 2405 movs r4, #5 802cf56: e003 b.n 802cf60 } 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) { 802cf58: 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; 802cf5a: 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; 802cf5e: 2600 movs r6, #0 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; 802cf60: 3102 adds r1, #2 802cf62: fa13 f381 uxtah r3, r3, r1 802cf66: b29b uxth r3, r3 802cf68: 9301 str r3, [sp, #4] if (decode_len > 0) { 802cf6a: 2e00 cmp r6, #0 802cf6c: d04f beq.n 802d00e 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; 802cf6e: 3202 adds r2, #2 802cf70: 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; 802cf72: 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; 802cf74: 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; 802cf76: 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) 802cf78: 4a4b ldr r2, [pc, #300] ; (802d0a8 ) LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 802cf7a: 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) 802cf7e: 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; 802cf82: 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) 802cf84: 9206 str r2, [sp, #24] 802cf86: 9302 str r3, [sp, #8] 802cf88: 9805 ldr r0, [sp, #20] 802cf8a: 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)) { 802cf8c: 4a45 ldr r2, [pc, #276] ; (802d0a4 ) /** * 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) 802cf8e: 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)) { 802cf90: 4844 ldr r0, [pc, #272] ; (802d0a4 ) 802cf92: 18a2 adds r2, r4, r2 802cf94: 9207 str r2, [sp, #28] 802cf96: 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) 802cf98: ebc1 0c06 rsb ip, r1, r6 802cf9c: b29b uxth r3, r3 802cf9e: 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)) { 802cfa2: 2a00 cmp r2, #0 802cfa4: d133 bne.n 802d00e copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); 802cfa6: f1bc 0f03 cmp.w ip, #3 802cfaa: bf94 ite ls 802cfac: 4662 movls r2, ip 802cfae: 2204 movhi r2, #4 802cfb0: 4638 mov r0, r7 802cfb2: 9904 ldr r1, [sp, #16] 802cfb4: f8cd c000 str.w ip, [sp] 802cfb8: f000 feaa bl 802dd10 if (decode_len > 4) { 802cfbc: f8dd c000 ldr.w ip, [sp] 802cfc0: f1bc 0f04 cmp.w ip, #4 802cfc4: d90f bls.n 802cfe6 /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 802cfc6: f01c 0f03 tst.w ip, #3 802cfca: f040 80ca bne.w 802d162 dhcp_got_option(dhcp, decode_idx); 802cfce: 9907 ldr r1, [sp, #28] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802cfd0: 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); 802cfd2: 2201 movs r2, #1 802cfd4: 700a strb r2, [r1, #0] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802cfd6: f7ff fc19 bl 802c80c 802cfda: 9b02 ldr r3, [sp, #8] 802cfdc: 9906 ldr r1, [sp, #24] decode_len -= 4; val_offset += 4; decode_idx++; 802cfde: 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)); 802cfe0: 50c8 str r0, [r1, r3] 802cfe2: 3304 adds r3, #4 802cfe4: e7cf b.n 802cf86 decode_len -= 4; val_offset += 4; decode_idx++; goto decode_next; } else if (decode_len == 4) { 802cfe6: d104 bne.n 802cff2 value = ntohl(value); 802cfe8: 9809 ldr r0, [sp, #36] ; 0x24 802cfea: f7ff fc11 bl 802c810 802cfee: 9009 str r0, [sp, #36] ; 0x24 802cff0: e006 b.n 802d000 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 802cff2: f1bc 0f01 cmp.w ip, #1 802cff6: f040 80b4 bne.w 802d162 value = ((u8_t*)&value)[0]; 802cffa: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 802cffe: 9309 str r3, [sp, #36] ; 0x24 } dhcp_got_option(dhcp, decode_idx); 802d000: 4a28 ldr r2, [pc, #160] ; (802d0a4 ) dhcp_set_option_value(dhcp, decode_idx, value); 802d002: 4829 ldr r0, [pc, #164] ; (802d0a8 ) 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); 802d004: 2301 movs r3, #1 802d006: 5513 strb r3, [r2, r4] dhcp_set_option_value(dhcp, decode_idx, value); 802d008: 9b09 ldr r3, [sp, #36] ; 0x24 802d00a: f840 3024 str.w r3, [r0, r4, lsl #2] } } if (offset >= q->len) { 802d00e: 897b ldrh r3, [r7, #10] 802d010: 9901 ldr r1, [sp, #4] 802d012: 4299 cmp r1, r3 802d014: d30f bcc.n 802d036 offset -= q->len; 802d016: 1aca subs r2, r1, r3 offset_max -= q->len; 802d018: 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; 802d01c: b292 uxth r2, r2 offset_max -= q->len; 802d01e: fa1f f989 uxth.w r9, r9 if ((offset < offset_max) && offset_max) { 802d022: 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; 802d024: 9201 str r2, [sp, #4] offset_max -= q->len; if ((offset < offset_max) && offset_max) { 802d026: d303 bcc.n 802d030 break; } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 802d028: 4a1e ldr r2, [pc, #120] ; (802d0a4 ) 802d02a: 7813 ldrb r3, [r2, #0] 802d02c: b963 cbnz r3, 802d048 802d02e: e09f b.n 802d170 } if (offset >= q->len) { offset -= q->len; offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; 802d030: 683f ldr r7, [r7, #0] LWIP_ASSERT("next pbuf was null", q); options = (u8_t*)q->payload; 802d032: 687b ldr r3, [r7, #4] 802d034: 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); 802d036: 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)) { 802d038: 9803 ldr r0, [sp, #12] 802d03a: 5c81 ldrb r1, [r0, r2] 802d03c: 29ff cmp r1, #255 ; 0xff 802d03e: d0f3 beq.n 802d028 802d040: 454a cmp r2, r9 802d042: f4ff af1d bcc.w 802ce80 802d046: e7ef b.n 802d028 } } } /* 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); 802d048: 4b17 ldr r3, [pc, #92] ; (802d0a8 ) dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802d04a: 4916 ldr r1, [pc, #88] ; (802d0a4 ) } } } /* 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); 802d04c: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802d04e: 2200 movs r2, #0 if (overload == DHCP_OVERLOAD_FILE) { 802d050: 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); 802d052: 700a strb r2, [r1, #0] if (overload == DHCP_OVERLOAD_FILE) { 802d054: f000 8093 beq.w 802d17e parse_file_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 802d058: 2b02 cmp r3, #2 802d05a: f43f aefa beq.w 802ce52 parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 802d05e: 2b03 cmp r3, #3 802d060: f040 8086 bne.w 802d170 802d064: e089 b.n 802d17a 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); 802d066: 4a10 ldr r2, [pc, #64] ; (802d0a8 ) 802d068: 7911 ldrb r1, [r2, #4] /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 802d06a: 2905 cmp r1, #5 802d06c: d140 bne.n 802d0f0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { 802d06e: f898 100c ldrb.w r1, [r8, #12] 802d072: 2901 cmp r1, #1 802d074: d135 bne.n 802d0e2 * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802d076: 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)) { 802d078: 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); 802d07a: f8c4 b028 str.w fp, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802d07e: 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)) { 802d082: b10b cbz r3, 802d088 /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 802d084: 68d3 ldr r3, [r2, #12] 802d086: 6323 str r3, [r4, #48] ; 0x30 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 802d088: 4b06 ldr r3, [pc, #24] ; (802d0a4 ) 802d08a: 791a ldrb r2, [r3, #4] 802d08c: b112 cbz r2, 802d094 /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 802d08e: 4a06 ldr r2, [pc, #24] ; (802d0a8 ) 802d090: 6912 ldr r2, [r2, #16] 802d092: e001 b.n 802d098 } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 802d094: 6b22 ldr r2, [r4, #48] ; 0x30 802d096: 0852 lsrs r2, r2, #1 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802d098: 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; 802d09a: 6362 str r2, [r4, #52] ; 0x34 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 802d09c: b133 cbz r3, 802d0ac /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 802d09e: 4b02 ldr r3, [pc, #8] ; (802d0a8 ) 802d0a0: 695b ldr r3, [r3, #20] 802d0a2: e004 b.n 802d0ae 802d0a4: 2000fc28 .word 0x2000fc28 802d0a8: 2000fc34 .word 0x2000fc34 } else { /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; 802d0ac: 6b23 ldr r3, [r4, #48] ; 0x30 802d0ae: 63a3 str r3, [r4, #56] ; 0x38 } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 802d0b0: 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)) { 802d0b2: 4a39 ldr r2, [pc, #228] ; (802d198 ) /* 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); 802d0b4: 691b ldr r3, [r3, #16] 802d0b6: 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)) { 802d0b8: 7993 ldrb r3, [r2, #6] 802d0ba: 4616 mov r6, r2 802d0bc: b12b cbz r3, 802d0ca /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802d0be: 4b37 ldr r3, [pc, #220] ; (802d19c ) 802d0c0: 6998 ldr r0, [r3, #24] 802d0c2: f7ff fba3 bl 802c80c dhcp->subnet_mask_given = 1; 802d0c6: 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))); 802d0c8: 62a0 str r0, [r4, #40] ; 0x28 dhcp->subnet_mask_given = 1; } else { dhcp->subnet_mask_given = 0; 802d0ca: 73a3 strb r3, [r4, #14] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 802d0cc: 79f3 ldrb r3, [r6, #7] 802d0ce: b123 cbz r3, 802d0da ip4_addr_set_u32(&dhcp->offered_gw_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 802d0d0: 4b32 ldr r3, [pc, #200] ; (802d19c ) 802d0d2: 69d8 ldr r0, [r3, #28] 802d0d4: f7ff fb9a bl 802c80c 802d0d8: 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); 802d0da: 4628 mov r0, r5 802d0dc: f7ff fe0a bl 802ccf4 802d0e0: e03f b.n 802d162 /* 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)) { 802d0e2: 3903 subs r1, #3 802d0e4: 2902 cmp r1, #2 802d0e6: d83c bhi.n 802d162 dhcp_bind(netif); 802d0e8: 4628 mov r0, r5 802d0ea: f7ff fe16 bl 802cd1a 802d0ee: e038 b.n 802d162 } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 802d0f0: 2906 cmp r1, #6 802d0f2: d121 bne.n 802d138 802d0f4: f898 300c ldrb.w r3, [r8, #12] 802d0f8: 2b05 cmp r3, #5 802d0fa: d832 bhi.n 802d162 802d0fc: f998 300c ldrsb.w r3, [r8, #12] 802d100: f04f 42b8 mov.w r2, #1543503872 ; 0x5c000000 802d104: 409a lsls r2, r3 802d106: d52c bpl.n 802d162 { 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); 802d108: 4628 mov r0, r5 * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802d10a: 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); 802d10c: f000 fc6e bl 802d9ec /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802d110: 4628 mov r0, r5 802d112: 4923 ldr r1, [pc, #140] ; (802d1a0 ) 802d114: f000 fbba bl 802d88c netif_set_gw(netif, IP_ADDR_ANY); 802d118: 4628 mov r0, r5 802d11a: 4921 ldr r1, [pc, #132] ; (802d1a0 ) 802d11c: f000 fbf2 bl 802d904 netif_set_netmask(netif, IP_ADDR_ANY); 802d120: 4628 mov r0, r5 802d122: 491f ldr r1, [pc, #124] ; (802d1a0 ) 802d124: f000 fbf2 bl 802d90c /* Change to a defined state */ dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802d128: 4620 mov r0, r4 802d12a: 210c movs r1, #12 802d12c: f7ff fb72 bl 802c814 /* We can immediately restart discovery */ dhcp_discover(netif); 802d130: 4628 mov r0, r5 802d132: f7ff fc7f bl 802ca34 802d136: e014 b.n 802d162 (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)) { 802d138: 2902 cmp r1, #2 802d13a: d112 bne.n 802d162 802d13c: f898 100c ldrb.w r1, [r8, #12] 802d140: 2906 cmp r1, #6 802d142: d10e bne.n 802d162 { 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)) { 802d144: 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; 802d146: 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; 802d14a: 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)) { 802d14c: b14b cbz r3, 802d162 ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 802d14e: 6890 ldr r0, [r2, #8] 802d150: f7ff fb5c bl 802c80c 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); 802d154: 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))); 802d156: 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); 802d158: 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); 802d15a: 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); 802d15c: 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); 802d15e: f7ff fd57 bl 802cc10 dhcp->request_timeout = 0; /* remember offered lease */ dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; 802d162: 2300 movs r3, #0 802d164: f8c8 3008 str.w r3, [r8, #8] pbuf_free(p); 802d168: 4650 mov r0, sl 802d16a: f000 fc83 bl 802da74 802d16e: e010 b.n 802d192 /* 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) { 802d170: f1bb 0f00 cmp.w fp, #0 802d174: f47f ae6d bne.w 802ce52 802d178: e005 b.n 802d186 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; 802d17a: 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; 802d17e: 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; 802d182: 226c movs r2, #108 ; 0x6c 802d184: e66a b.n 802ce5c 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)) { 802d186: 4b04 ldr r3, [pc, #16] ; (802d198 ) 802d188: 785a ldrb r2, [r3, #1] 802d18a: 2a00 cmp r2, #0 802d18c: f47f af6b bne.w 802d066 802d190: e7e7 b.n 802d162 dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; pbuf_free(p); } 802d192: b00b add sp, #44 ; 0x2c 802d194: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802d198: 2000fc28 .word 0x2000fc28 802d19c: 2000fc34 .word 0x2000fc34 802d1a0: 080413b4 .word 0x080413b4 0802d1a4 : * * @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) { 802d1a4: b537 push {r0, r1, r2, r4, r5, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 802d1a6: 4605 mov r5, r0 802d1a8: 2800 cmp r0, #0 802d1aa: d037 beq.n 802d21c 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)) { 802d1ac: 6a04 ldr r4, [r0, #32] 802d1ae: 2c00 cmp r4, #0 802d1b0: d034 beq.n 802d21c 802d1b2: 7b23 ldrb r3, [r4, #12] 802d1b4: 2b08 cmp r3, #8 802d1b6: d131 bne.n 802d21c 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)) { 802d1b8: 680a ldr r2, [r1, #0] 802d1ba: 6a63 ldr r3, [r4, #36] ; 0x24 802d1bc: 429a cmp r2, r3 802d1be: d12d bne.n 802d21c { 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); 802d1c0: 4620 mov r0, r4 802d1c2: 210c movs r1, #12 802d1c4: f7ff fb26 bl 802c814 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); 802d1c8: 4628 mov r0, r5 802d1ca: 4621 mov r1, r4 802d1cc: 2204 movs r2, #4 802d1ce: f7ff fb85 bl 802c8dc if (result == ERR_OK) { 802d1d2: b9f0 cbnz r0, 802d212 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 802d1d4: 2204 movs r2, #4 802d1d6: 2132 movs r1, #50 ; 0x32 802d1d8: 4620 mov r0, r4 802d1da: f7ff fb23 bl 802c824 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802d1de: 6a60 ldr r0, [r4, #36] ; 0x24 802d1e0: f7ff fb16 bl 802c810 802d1e4: 4601 mov r1, r0 802d1e6: 4620 mov r0, r4 802d1e8: f7ff fb43 bl 802c872 dhcp_option_trailer(dhcp); 802d1ec: 4620 mov r0, r4 802d1ee: f7ff fb60 bl 802c8b2 /* resize pbuf to reflect true size of options */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802d1f2: 8b21 ldrh r1, [r4, #24] 802d1f4: 6920 ldr r0, [r4, #16] 802d1f6: 31f0 adds r1, #240 ; 0xf0 802d1f8: b289 uxth r1, r1 802d1fa: f000 fc62 bl 802dac2 /* per section 4.4.4, broadcast DECLINE messages */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802d1fe: 9500 str r5, [sp, #0] 802d200: 6860 ldr r0, [r4, #4] 802d202: 6921 ldr r1, [r4, #16] 802d204: 4a06 ldr r2, [pc, #24] ; (802d220 ) 802d206: 2343 movs r3, #67 ; 0x43 802d208: f003 f8d4 bl 80303b4 dhcp_delete_msg(dhcp); 802d20c: 4620 mov r0, r4 802d20e: f7ff fc05 bl 802ca1c 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++; 802d212: 7b63 ldrb r3, [r4, #13] 802d214: 3301 adds r3, #1 802d216: 7363 strb r3, [r4, #13] msecs = 10*1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802d218: 2314 movs r3, #20 802d21a: 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); } } } 802d21c: bd3e pop {r1, r2, r3, r4, r5, pc} 802d21e: bf00 nop 802d220: 080413b0 .word 0x080413b0 0802d224 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802d224: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802d226: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 802d228: 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); 802d22a: 2105 movs r1, #5 802d22c: 4620 mov r0, r4 802d22e: f7ff faf1 bl 802c814 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802d232: 4628 mov r0, r5 802d234: 4621 mov r1, r4 802d236: 2203 movs r2, #3 802d238: f7ff fb50 bl 802c8dc if (result == ERR_OK) { 802d23c: 4606 mov r6, r0 802d23e: b9e0 cbnz r0, 802d27a dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802d240: 2202 movs r2, #2 802d242: 4620 mov r0, r4 802d244: 2139 movs r1, #57 ; 0x39 802d246: f7ff faed bl 802c824 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802d24a: 8ca9 ldrh r1, [r5, #36] ; 0x24 802d24c: 4620 mov r0, r4 802d24e: f7ff fb00 bl 802c852 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ /* append DHCP message trailer */ dhcp_option_trailer(dhcp); 802d252: 4620 mov r0, r4 802d254: f7ff fb2d bl 802c8b2 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802d258: 8b21 ldrh r1, [r4, #24] 802d25a: 6920 ldr r0, [r4, #16] 802d25c: 31f0 adds r1, #240 ; 0xf0 802d25e: b289 uxth r1, r1 802d260: f000 fc2f bl 802dac2 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802d264: 9500 str r5, [sp, #0] 802d266: 6860 ldr r0, [r4, #4] 802d268: 6921 ldr r1, [r4, #16] 802d26a: f104 0220 add.w r2, r4, #32 802d26e: 2343 movs r3, #67 ; 0x43 802d270: f003 f8a0 bl 80303b4 dhcp_delete_msg(dhcp); 802d274: 4620 mov r0, r4 802d276: f7ff fbd1 bl 802ca1c 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++; 802d27a: 7b63 ldrb r3, [r4, #13] 802d27c: 3301 adds r3, #1 802d27e: b2db uxtb r3, r3 /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 802d280: 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++; 802d282: 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; 802d284: d804 bhi.n 802d290 802d286: f44f 62fa mov.w r2, #2000 ; 0x7d0 802d28a: 4353 muls r3, r2 802d28c: b29b uxth r3, r3 802d28e: e001 b.n 802d294 802d290: f644 6320 movw r3, #20000 ; 0x4e20 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802d294: f44f 72fa mov.w r2, #500 ; 0x1f4 802d298: f203 13f3 addw r3, r3, #499 ; 0x1f3 802d29c: fb93 f3f2 sdiv r3, r3, r2 802d2a0: 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; } 802d2a2: 4630 mov r0, r6 802d2a4: bd7c pop {r2, r3, r4, r5, r6, pc} 802d2a6: 0000 movs r0, r0 0802d2a8 : /** * The DHCP timer that checks for lease renewal/rebind timeouts. */ void dhcp_coarse_tmr() { 802d2a8: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802d2aa: 4b15 ldr r3, [pc, #84] ; (802d300 ) 802d2ac: 4d15 ldr r5, [pc, #84] ; (802d304 ) 802d2ae: 681c ldr r4, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 802d2b0: e023 b.n 802d2fa /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802d2b2: 6a23 ldr r3, [r4, #32] 802d2b4: b303 cbz r3, 802d2f8 /* timer is active (non zero), and triggers (zeroes) now? */ if (netif->dhcp->t2_timeout-- == 1) { 802d2b6: 8bda ldrh r2, [r3, #30] 802d2b8: 1e51 subs r1, r2, #1 802d2ba: 2a01 cmp r2, #1 802d2bc: 83d9 strh r1, [r3, #30] 802d2be: d10b bne.n 802d2d8 802d2c0: 7b1a ldrb r2, [r3, #12] 802d2c2: 2a0a cmp r2, #10 802d2c4: d818 bhi.n 802d2f8 802d2c6: f993 300c ldrsb.w r3, [r3, #12] 802d2ca: fa15 f303 lsls.w r3, r5, r3 802d2ce: d513 bpl.n 802d2f8 /* 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); 802d2d0: 4620 mov r0, r4 802d2d2: f7ff fc0b bl 802caec 802d2d6: e00f b.n 802d2f8 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) { 802d2d8: 8b9a ldrh r2, [r3, #28] 802d2da: 1e51 subs r1, r2, #1 802d2dc: 2a01 cmp r2, #1 802d2de: 8399 strh r1, [r3, #28] 802d2e0: d10a bne.n 802d2f8 802d2e2: 7b1a ldrb r2, [r3, #12] 802d2e4: 2a0a cmp r2, #10 802d2e6: d807 bhi.n 802d2f8 802d2e8: f993 300c ldrsb.w r3, [r3, #12] 802d2ec: fa15 f303 lsls.w r3, r5, r3 802d2f0: d502 bpl.n 802d2f8 * 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); 802d2f2: 4620 mov r0, r4 802d2f4: f7ff ff96 bl 802d224 /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } /* proceed to next netif */ netif = netif->next; 802d2f8: 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) { 802d2fa: 2c00 cmp r4, #0 802d2fc: d1d9 bne.n 802d2b2 } } /* proceed to next netif */ netif = netif->next; } } 802d2fe: bd38 pop {r3, r4, r5, pc} 802d300: 20011070 .word 0x20011070 802d304: 44200000 .word 0x44200000 0802d308 : * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802d308: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802d30a: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 802d30c: 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); 802d30e: 2100 movs r1, #0 802d310: 4620 mov r0, r4 802d312: f7ff fa7f bl 802c814 /* clean old DHCP offer */ ip_addr_set_zero(&dhcp->server_ip_addr); 802d316: 2300 movs r3, #0 802d318: 6223 str r3, [r4, #32] ip_addr_set_zero(&dhcp->offered_ip_addr); 802d31a: 6263 str r3, [r4, #36] ; 0x24 ip_addr_set_zero(&dhcp->offered_sn_mask); 802d31c: 62a3 str r3, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 802d31e: 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; 802d320: 63a3 str r3, [r4, #56] ; 0x38 802d322: 6363 str r3, [r4, #52] ; 0x34 802d324: 6323 str r3, [r4, #48] ; 0x30 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); 802d326: 4628 mov r0, r5 802d328: 4621 mov r1, r4 802d32a: 2207 movs r2, #7 802d32c: f7ff fad6 bl 802c8dc if (result == ERR_OK) { 802d330: 4606 mov r6, r0 802d332: b998 cbnz r0, 802d35c dhcp_option_trailer(dhcp); 802d334: 4620 mov r0, r4 802d336: f7ff fabc bl 802c8b2 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 802d33a: 8b21 ldrh r1, [r4, #24] 802d33c: 6920 ldr r0, [r4, #16] 802d33e: 31f0 adds r1, #240 ; 0xf0 802d340: b289 uxth r1, r1 802d342: f000 fbbe bl 802dac2 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 802d346: 9500 str r5, [sp, #0] 802d348: 6860 ldr r0, [r4, #4] 802d34a: 6921 ldr r1, [r4, #16] 802d34c: f104 0220 add.w r2, r4, #32 802d350: 2343 movs r3, #67 ; 0x43 802d352: f003 f82f bl 80303b4 dhcp_delete_msg(dhcp); 802d356: 4620 mov r0, r4 802d358: f7ff fb60 bl 802ca1c 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++; 802d35c: 7b63 ldrb r3, [r4, #13] 802d35e: 3301 adds r3, #1 802d360: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802d362: 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++; 802d364: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802d366: d804 bhi.n 802d372 802d368: f44f 727a mov.w r2, #1000 ; 0x3e8 802d36c: 4353 muls r3, r2 802d36e: b29b uxth r3, r3 802d370: e001 b.n 802d376 802d372: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802d376: f44f 72fa mov.w r2, #500 ; 0x1f4 802d37a: f203 13f3 addw r3, r3, #499 ; 0x1f3 802d37e: fb93 f3f2 sdiv r3, r3, r2 802d382: 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); 802d384: 4628 mov r0, r5 802d386: f000 fb31 bl 802d9ec /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 802d38a: 4628 mov r0, r5 802d38c: 4906 ldr r1, [pc, #24] ; (802d3a8 ) 802d38e: f000 fa7d bl 802d88c netif_set_gw(netif, IP_ADDR_ANY); 802d392: 4628 mov r0, r5 802d394: 4904 ldr r1, [pc, #16] ; (802d3a8 ) 802d396: f000 fab5 bl 802d904 netif_set_netmask(netif, IP_ADDR_ANY); 802d39a: 4628 mov r0, r5 802d39c: 4902 ldr r1, [pc, #8] ; (802d3a8 ) 802d39e: f000 fab5 bl 802d90c return result; } 802d3a2: 4630 mov r0, r6 802d3a4: bd7c pop {r2, r3, r4, r5, r6, pc} 802d3a6: bf00 nop 802d3a8: 080413b4 .word 0x080413b4 0802d3ac : * 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() { 802d3ac: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 802d3ae: 4b26 ldr r3, [pc, #152] ; (802d448 ) /* 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--; 802d3b0: 2500 movs r5, #0 * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { struct netif *netif = netif_list; 802d3b2: 681c ldr r4, [r3, #0] /* loop through netif's */ while (netif != NULL) { 802d3b4: e044 b.n 802d440 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 802d3b6: 6a23 ldr r3, [r4, #32] 802d3b8: 2b00 cmp r3, #0 802d3ba: d040 beq.n 802d43e /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { 802d3bc: 8b5a ldrh r2, [r3, #26] 802d3be: 2a01 cmp r2, #1 802d3c0: d902 bls.n 802d3c8 netif->dhcp->request_timeout--; 802d3c2: 3a01 subs r2, #1 802d3c4: 835a strh r2, [r3, #26] 802d3c6: e03a b.n 802d43e } else if (netif->dhcp->request_timeout == 1) { 802d3c8: d139 bne.n 802d43e 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)) { 802d3ca: 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--; 802d3cc: 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)) { 802d3ce: 2a0c cmp r2, #12 802d3d0: d028 beq.n 802d424 802d3d2: 2a06 cmp r2, #6 802d3d4: d100 bne.n 802d3d8 802d3d6: e025 b.n 802d424 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) { 802d3d8: 2a01 cmp r2, #1 802d3da: d106 bne.n 802d3ea LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 802d3dc: 7b5b ldrb r3, [r3, #13] 802d3de: 2b05 cmp r3, #5 dhcp_select(netif); 802d3e0: 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) { 802d3e2: d81d bhi.n 802d420 dhcp_select(netif); 802d3e4: f7ff fc14 bl 802cc10 802d3e8: e029 b.n 802d43e 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) { 802d3ea: 2a08 cmp r2, #8 802d3ec: d109 bne.n 802d402 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 802d3ee: 7b5b ldrb r3, [r3, #13] 802d3f0: 2b01 cmp r3, #1 dhcp_check(netif); 802d3f2: 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) { 802d3f4: d802 bhi.n 802d3fc dhcp_check(netif); 802d3f6: f7ff fc7d bl 802ccf4 802d3fa: e020 b.n 802d43e /* 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); 802d3fc: f7ff fc8d bl 802cd1a 802d400: e01d b.n 802d43e } #endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) { 802d402: 2a05 cmp r2, #5 802d404: d103 bne.n 802d40e 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); 802d406: 4620 mov r0, r4 802d408: f7ff ff0c bl 802d224 802d40c: e017 b.n 802d43e /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { 802d40e: 2a04 cmp r2, #4 802d410: d10a bne.n 802d428 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 802d412: 7b5b ldrb r3, [r3, #13] 802d414: 2b08 cmp r3, #8 dhcp_rebind(netif); 802d416: 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) { 802d418: d802 bhi.n 802d420 dhcp_rebind(netif); 802d41a: f7ff fb67 bl 802caec 802d41e: e00e b.n 802d43e } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); 802d420: f7ff ff72 bl 802d308 dhcp_discover(netif); 802d424: 4620 mov r0, r4 802d426: e008 b.n 802d43a } } else if (dhcp->state == DHCP_REBOOTING) { 802d428: 2a03 cmp r2, #3 802d42a: d108 bne.n 802d43e if (dhcp->tries < REBOOT_TRIES) { 802d42c: 7b5b ldrb r3, [r3, #13] 802d42e: 2b01 cmp r3, #1 dhcp_reboot(netif); 802d430: 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) { 802d432: d802 bhi.n 802d43a dhcp_reboot(netif); 802d434: f7ff fb9c bl 802cb70 802d438: e001 b.n 802d43e } else { dhcp_discover(netif); 802d43a: f7ff fafb bl 802ca34 /* this client's request timeout triggered */ dhcp_timeout(netif); } } /* proceed to next network interface */ netif = netif->next; 802d43e: 6824 ldr r4, [r4, #0] void dhcp_fine_tmr() { struct netif *netif = netif_list; /* loop through netif's */ while (netif != NULL) { 802d440: 2c00 cmp r4, #0 802d442: d1b8 bne.n 802d3b6 } } /* proceed to next network interface */ netif = netif->next; } } 802d444: bd38 pop {r3, r4, r5, pc} 802d446: bf00 nop 802d448: 20011070 .word 0x20011070 0802d44c : * * @param netif The network interface to stop DHCP on */ void dhcp_stop(struct netif *netif) { 802d44c: b510 push {r4, lr} struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); 802d44e: b198 cbz r0, 802d478 dhcp = netif->dhcp; /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802d450: 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; 802d454: 6a04 ldr r4, [r0, #32] /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 802d456: f023 0308 bic.w r3, r3, #8 802d45a: 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) { 802d45e: b15c cbz r4, 802d478 autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ if (dhcp->pcb != NULL) { 802d460: 6860 ldr r0, [r4, #4] 802d462: b118 cbz r0, 802d46c udp_remove(dhcp->pcb); 802d464: f003 f852 bl 803050c dhcp->pcb = NULL; 802d468: 2300 movs r3, #0 802d46a: 6063 str r3, [r4, #4] } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 802d46c: 4620 mov r0, r4 802d46e: 2100 movs r1, #0 } } 802d470: 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); 802d474: f7ff b9ce b.w 802c814 802d478: bd10 pop {r4, pc} 802d47a: 0000 movs r0, r0 0802d47c : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 802d47c: b538 push {r3, r4, r5, lr} struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 802d47e: 4604 mov r4, r0 802d480: b908 cbnz r0, 802d486 802d482: 20f2 movs r0, #242 ; 0xf2 802d484: e047 b.n 802d516 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; 802d486: 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; 802d48a: 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; 802d48c: f023 0208 bic.w r2, r3, #8 /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802d490: f003 0320 and.w r3, r3, #32 802d494: 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; 802d496: f880 202d strb.w r2, [r0, #45] ; 0x2d /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 802d49a: 2b00 cmp r3, #0 802d49c: d0f1 beq.n 802d482 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) { 802d49e: 8c83 ldrh r3, [r0, #36] ; 0x24 802d4a0: f5b3 7f10 cmp.w r3, #576 ; 0x240 802d4a4: d200 bcs.n 802d4a8 802d4a6: e02e b.n 802d506 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) { 802d4a8: b935 cbnz r5, 802d4b8 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 802d4aa: 203c movs r0, #60 ; 0x3c 802d4ac: f000 f938 bl 802d720 if (dhcp == NULL) { 802d4b0: 4605 mov r5, r0 802d4b2: b340 cbz r0, 802d506 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; 802d4b4: 6220 str r0, [r4, #32] 802d4b6: e003 b.n 802d4c0 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) { 802d4b8: 6868 ldr r0, [r5, #4] 802d4ba: b108 cbz r0, 802d4c0 udp_remove(dhcp->pcb); 802d4bc: f003 f826 bl 803050c 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)); 802d4c0: 2100 movs r1, #0 802d4c2: 223c movs r2, #60 ; 0x3c 802d4c4: 4628 mov r0, r5 802d4c6: f7f4 fafb bl 8021ac0 /* dhcp_set_state(&dhcp, DHCP_OFF); */ /* allocate UDP PCB */ dhcp->pcb = udp_new(); 802d4ca: f003 f83b bl 8030544 802d4ce: 6068 str r0, [r5, #4] if (dhcp->pcb == NULL) { 802d4d0: b1c8 cbz r0, 802d506 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 802d4d2: 7a03 ldrb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802d4d4: 4911 ldr r1, [pc, #68] ; (802d51c ) 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); 802d4d6: f043 0320 orr.w r3, r3, #32 802d4da: 7203 strb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 802d4dc: 2244 movs r2, #68 ; 0x44 802d4de: 6868 ldr r0, [r5, #4] 802d4e0: f002 ff18 bl 8030314 udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); 802d4e4: 490d ldr r1, [pc, #52] ; (802d51c ) 802d4e6: 6868 ldr r0, [r5, #4] 802d4e8: 2243 movs r2, #67 ; 0x43 802d4ea: f002 ffdd bl 80304a8 /* set up the recv callback and argument */ udp_recv(dhcp->pcb, dhcp_recv, netif); 802d4ee: 6868 ldr r0, [r5, #4] 802d4f0: 490b ldr r1, [pc, #44] ; (802d520 ) 802d4f2: 4622 mov r2, r4 802d4f4: f003 f806 bl 8030504 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 802d4f8: 4620 mov r0, r4 802d4fa: f7ff fa9b bl 802ca34 if (result != ERR_OK) { 802d4fe: b120 cbz r0, 802d50a /* free resources allocated above */ dhcp_stop(netif); 802d500: 4620 mov r0, r4 802d502: f7ff ffa3 bl 802d44c return ERR_MEM; 802d506: 20ff movs r0, #255 ; 0xff 802d508: e005 b.n 802d516 } /* Set the flag that says this netif is handled by DHCP. */ netif->flags |= NETIF_FLAG_DHCP; 802d50a: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802d50e: f043 0308 orr.w r3, r3, #8 802d512: f884 302d strb.w r3, [r4, #45] ; 0x2d return result; } 802d516: b240 sxtb r0, r0 802d518: bd38 pop {r3, r4, r5, pc} 802d51a: bf00 nop 802d51c: 080413b4 .word 0x080413b4 802d520: 0802cdd9 .word 0x0802cdd9 0802d524 : /** * Perform Sanity check of user-configurable values, and initialize all modules. */ void lwip_init(void) { 802d524: b508 push {r3, lr} /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 802d526: f007 ff31 bl 803538c #endif /* !NO_SYS */ mem_init(); 802d52a: f000 f80f bl 802d54c memp_init(); 802d52e: f000 f95b bl 802d7e8 pbuf_init(); netif_init(); 802d532: f000 f9a9 bl 802d888 #endif /* LWIP_ARP */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 802d536: f002 fe27 bl 8030188 #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 802d53a: f000 fc8b bl 802de54 #endif /* LWIP_TCP */ #if LWIP_SNMP snmp_init(); 802d53e: f005 fde1 bl 8033104 #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ } 802d542: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); 802d546: f002 bd49 b.w 802ffdc 802d54a: 0000 movs r0, r0 0802d54c : 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); 802d54c: 4b0b ldr r3, [pc, #44] ; (802d57c ) 802d54e: 4a0c ldr r2, [pc, #48] ; (802d580 ) 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]; 802d550: 480c ldr r0, [pc, #48] ; (802d584 ) 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); 802d552: f023 0303 bic.w r3, r3, #3 802d556: 6013 str r3, [r2, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 802d558: f44f 51a0 mov.w r1, #5120 ; 0x1400 mem->prev = 0; 802d55c: 2200 movs r2, #0 802d55e: 805a strh r2, [r3, #2] mem->used = 0; 802d560: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 802d562: 185a adds r2, r3, r1 802d564: 6002 str r2, [r0, #0] ram_end->used = 1; 802d566: 2001 movs r0, #1 802d568: 7110 strb r0, [r2, #4] ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; 802d56a: 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; 802d56c: 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) { 802d56e: 4806 ldr r0, [pc, #24] ; (802d588 ) 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; 802d570: 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; 802d572: 4a06 ldr r2, [pc, #24] ; (802d58c ) 802d574: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 802d576: f007 beeb b.w 8035350 802d57a: bf00 nop 802d57c: 2000fc5f .word 0x2000fc5f 802d580: 20002b00 .word 0x20002b00 802d584: 20002af8 .word 0x20002af8 802d588: 20002afc .word 0x20002afc 802d58c: 20002af4 .word 0x20002af4 0802d590 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 802d590: b570 push {r4, r5, r6, lr} struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 802d592: 4604 mov r4, r0 802d594: 2800 cmp r0, #0 802d596: d04c beq.n 802d632 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) { 802d598: 4b26 ldr r3, [pc, #152] ; (802d634 ) 802d59a: 681b ldr r3, [r3, #0] 802d59c: 4298 cmp r0, r3 802d59e: d303 bcc.n 802d5a8 802d5a0: 4b25 ldr r3, [pc, #148] ; (802d638 ) 802d5a2: 681b ldr r3, [r3, #0] 802d5a4: 4298 cmp r0, r3 802d5a6: d305 bcc.n 802d5b4 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); 802d5a8: f007 ff0a bl 80353c0 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(); } 802d5ac: 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); 802d5b0: f007 bf10 b.w 80353d4 return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802d5b4: 4821 ldr r0, [pc, #132] ; (802d63c ) 802d5b6: f007 fed7 bl 8035368 /* 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; 802d5ba: 2300 movs r3, #0 802d5bc: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 802d5c0: 4b1f ldr r3, [pc, #124] ; (802d640 ) 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]; 802d5c2: 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) { 802d5c6: 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); 802d5c8: 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) { 802d5cc: 428a cmp r2, r1 /* the newly freed struct is now the lowest */ lfree = mem; 802d5ce: bf38 it cc 802d5d0: 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]; 802d5d2: 4b18 ldr r3, [pc, #96] ; (802d634 ) 802d5d4: 681b ldr r3, [r3, #0] 802d5d6: 1819 adds r1, r3, r0 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 802d5d8: 428a cmp r2, r1 802d5da: d011 beq.n 802d600 802d5dc: 790d ldrb r5, [r1, #4] 802d5de: b97d cbnz r5, 802d600 802d5e0: 4d15 ldr r5, [pc, #84] ; (802d638 ) 802d5e2: 682d ldr r5, [r5, #0] 802d5e4: 42a9 cmp r1, r5 802d5e6: d00b beq.n 802d600 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 802d5e8: 4d15 ldr r5, [pc, #84] ; (802d640 ) 802d5ea: 682e ldr r6, [r5, #0] 802d5ec: 428e cmp r6, r1 lfree = mem; } mem->next = nmem->next; 802d5ee: 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; 802d5f0: bf08 it eq 802d5f2: 602a streq r2, [r5, #0] } mem->next = nmem->next; 802d5f4: f824 1c08 strh.w r1, [r4, #-8] ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); 802d5f8: 5a19 ldrh r1, [r3, r0] 802d5fa: 1859 adds r1, r3, r1 802d5fc: 1ad0 subs r0, r2, r3 802d5fe: 8048 strh r0, [r1, #2] } /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; 802d600: f834 0c06 ldrh.w r0, [r4, #-6] 802d604: 1819 adds r1, r3, r0 if (pmem != mem && pmem->used == 0) { 802d606: 4291 cmp r1, r2 802d608: d00e beq.n 802d628 802d60a: 790d ldrb r5, [r1, #4] 802d60c: b965 cbnz r5, 802d628 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 802d60e: 4d0c ldr r5, [pc, #48] ; (802d640 ) 802d610: 682e ldr r6, [r5, #0] 802d612: 4296 cmp r6, r2 lfree = pmem; } pmem->next = mem->next; 802d614: 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; 802d618: bf08 it eq 802d61a: 6029 streq r1, [r5, #0] } pmem->next = mem->next; 802d61c: 521a strh r2, [r3, r0] ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); 802d61e: f834 2c08 ldrh.w r2, [r4, #-8] 802d622: 189a adds r2, r3, r2 802d624: 1acb subs r3, r1, r3 802d626: 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(); 802d628: 4804 ldr r0, [pc, #16] ; (802d63c ) } 802d62a: 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(); 802d62e: f007 bea7 b.w 8035380 802d632: bd70 pop {r4, r5, r6, pc} 802d634: 20002b00 .word 0x20002b00 802d638: 20002af8 .word 0x20002af8 802d63c: 20002afc .word 0x20002afc 802d640: 20002af4 .word 0x20002af4 0802d644 : * 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) { 802d644: 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); 802d648: 3103 adds r1, #3 802d64a: f64f 75fc movw r5, #65532 ; 0xfffc 802d64e: 400d ands r5, r1 if(newsize < MIN_SIZE_ALIGNED) { 802d650: 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) { 802d652: 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) { 802d654: d903 bls.n 802d65e /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { 802d656: f5b5 5fa0 cmp.w r5, #5120 ; 0x1400 802d65a: d901 bls.n 802d660 802d65c: e053 b.n 802d706 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; 802d65e: 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) { 802d660: f8df 80b8 ldr.w r8, [pc, #184] ; 802d71c 802d664: f8d8 3000 ldr.w r3, [r8] 802d668: 429c cmp r4, r3 802d66a: d303 bcc.n 802d674 802d66c: 4a28 ldr r2, [pc, #160] ; (802d710 ) 802d66e: 6812 ldr r2, [r2, #0] 802d670: 4294 cmp r4, r2 802d672: d304 bcc.n 802d67e 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); 802d674: f007 fea4 bl 80353c0 MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 802d678: f007 feac bl 80353d4 return rmem; 802d67c: e044 b.n 802d708 } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 802d67e: 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; 802d682: 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); 802d686: 1af6 subs r6, r6, r3 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802d688: 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); 802d68a: b2b6 uxth r6, r6 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 802d68c: 1bbf subs r7, r7, r6 802d68e: b2bf uxth r7, r7 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { 802d690: 42bd cmp r5, r7 802d692: d838 bhi.n 802d706 /* not supported */ return NULL; } if (newsize == size) { 802d694: d038 beq.n 802d708 /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 802d696: 481f ldr r0, [pc, #124] ; (802d714 ) 802d698: f007 fe66 bl 8035368 mem2 = (struct mem *)(void *)&ram[mem->next]; 802d69c: f8d8 3000 ldr.w r3, [r8] 802d6a0: f834 1c08 ldrh.w r1, [r4, #-8] 802d6a4: 185a adds r2, r3, r1 if(mem2->used == 0) { 802d6a6: 7910 ldrb r0, [r2, #4] 802d6a8: b978 cbnz r0, 802d6ca /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; 802d6aa: 5a5f ldrh r7, [r3, r1] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 802d6ac: f106 0108 add.w r1, r6, #8 802d6b0: 186d adds r5, r5, r1 if (lfree == mem2) { 802d6b2: 4919 ldr r1, [pc, #100] ; (802d718 ) 802d6b4: 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; 802d6b6: b2ad uxth r5, r5 if (lfree == mem2) { 802d6b8: 4290 cmp r0, r2 802d6ba: eb03 0205 add.w r2, r3, r5 lfree = (struct mem *)(void *)&ram[ptr2]; 802d6be: bf08 it eq 802d6c0: 600a streq r2, [r1, #0] } mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 802d6c2: 2100 movs r1, #0 802d6c4: 7111 strb r1, [r2, #4] /* restore the next pointer */ mem2->next = next; 802d6c6: 535f strh r7, [r3, r5] 802d6c8: e010 b.n 802d6ec 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) { 802d6ca: f105 0214 add.w r2, r5, #20 802d6ce: 42ba cmp r2, r7 802d6d0: d815 bhi.n 802d6fe * @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) { 802d6d2: 4811 ldr r0, [pc, #68] ; (802d718 ) * 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; 802d6d4: f106 0208 add.w r2, r6, #8 802d6d8: 18ad adds r5, r5, r2 mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 802d6da: 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; 802d6dc: b2ad uxth r5, r5 mem2 = (struct mem *)(void *)&ram[ptr2]; 802d6de: 195a adds r2, r3, r5 if (mem2 < lfree) { 802d6e0: 42ba cmp r2, r7 lfree = mem2; 802d6e2: bf38 it cc 802d6e4: 6002 strcc r2, [r0, #0] } mem2->used = 0; mem2->next = mem->next; 802d6e6: 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; 802d6e8: 2000 movs r0, #0 802d6ea: 7110 strb r0, [r2, #4] mem2->next = mem->next; mem2->prev = ptr; 802d6ec: 8056 strh r6, [r2, #2] mem->next = ptr2; 802d6ee: f824 5c08 strh.w r5, [r4, #-8] if (mem2->next != MEM_SIZE_ALIGNED) { 802d6f2: 5b5a ldrh r2, [r3, r5] 802d6f4: f5b2 5fa0 cmp.w r2, #5120 ; 0x1400 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802d6f8: bf1c itt ne 802d6fa: 189b addne r3, r3, r2 802d6fc: 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(); 802d6fe: 4805 ldr r0, [pc, #20] ; (802d714 ) 802d700: f007 fe3e bl 8035380 return rmem; 802d704: e000 b.n 802d708 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { return NULL; 802d706: 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; } 802d708: 4620 mov r0, r4 802d70a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802d70e: bf00 nop 802d710: 20002af8 .word 0x20002af8 802d714: 20002afc .word 0x20002afc 802d718: 20002af4 .word 0x20002af4 802d71c: 20002b00 .word 0x20002b00 0802d720 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size) { 802d720: 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) { 802d722: 2800 cmp r0, #0 802d724: d056 beq.n 802d7d4 return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); 802d726: 3003 adds r0, #3 802d728: f64f 74fc movw r4, #65532 ; 0xfffc 802d72c: 4004 ands r4, r0 if(size < MIN_SIZE_ALIGNED) { 802d72e: 2c0b cmp r4, #11 802d730: d903 bls.n 802d73a /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } if (size > MEM_SIZE_ALIGNED) { 802d732: f5b4 5fa0 cmp.w r4, #5120 ; 0x1400 802d736: d901 bls.n 802d73c 802d738: e04b b.n 802d7d2 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; 802d73a: 240c movs r4, #12 if (size > MEM_SIZE_ALIGNED) { return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 802d73c: 4826 ldr r0, [pc, #152] ; (802d7d8 ) 802d73e: f007 fe13 bl 8035368 #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; 802d742: 4b26 ldr r3, [pc, #152] ; (802d7dc ) 802d744: 6819 ldr r1, [r3, #0] 802d746: 4b26 ldr r3, [pc, #152] ; (802d7e0 ) 802d748: 681a ldr r2, [r3, #0] 802d74a: 1a8b subs r3, r1, r2 802d74c: b29b uxth r3, r3 802d74e: f5c4 5ea0 rsb lr, r4, #5120 ; 0x1400 802d752: e039 b.n 802d7c8 ptr = ((struct mem *)(void *)&ram[ptr])->next) { mem = (struct mem *)(void *)&ram[ptr]; 802d754: 18d5 adds r5, r2, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802d756: 792f ldrb r7, [r5, #4] 802d758: 2f00 cmp r7, #0 802d75a: d134 bne.n 802d7c6 (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 802d75c: 5ad6 ldrh r6, [r2, r3] 802d75e: f1a6 0008 sub.w r0, r6, #8 802d762: 1ac0 subs r0, r0, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 802d764: 42a0 cmp r0, r4 802d766: d32e bcc.n 802d7c6 (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)) { 802d768: f104 0e14 add.w lr, r4, #20 802d76c: 4570 cmp r0, lr 802d76e: d310 bcc.n 802d792 * 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; 802d770: 3408 adds r4, #8 802d772: 191c adds r4, r3, r4 802d774: b2a4 uxth r4, r4 /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; 802d776: 1910 adds r0, r2, r4 mem2->used = 0; mem2->next = mem->next; 802d778: 5316 strh r6, [r2, r4] mem2->prev = ptr; 802d77a: 8043 strh r3, [r0, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 802d77c: 802c strh r4, [r5, #0] mem->used = 1; 802d77e: 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; 802d780: 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; 802d782: 712b strb r3, [r5, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 802d784: 5b13 ldrh r3, [r2, r4] 802d786: f5b3 5fa0 cmp.w r3, #5120 ; 0x1400 802d78a: d004 beq.n 802d796 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 802d78c: 18d2 adds r2, r2, r3 802d78e: 8054 strh r4, [r2, #2] 802d790: e001 b.n 802d796 * 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; 802d792: 2301 movs r3, #1 802d794: 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) { 802d796: 428d cmp r5, r1 802d798: d10f bne.n 802d7ba struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802d79a: 4b12 ldr r3, [pc, #72] ; (802d7e4 ) 802d79c: 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]; 802d79e: 4b10 ldr r3, [pc, #64] ; (802d7e0 ) 802d7a0: 6819 ldr r1, [r3, #0] 802d7a2: 462b mov r3, r5 802d7a4: e001 b.n 802d7aa 802d7a6: 881b ldrh r3, [r3, #0] 802d7a8: 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) { 802d7aa: 7918 ldrb r0, [r3, #4] 802d7ac: b910 cbnz r0, 802d7b4 goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; } lfree = cur; 802d7ae: 4a0b ldr r2, [pc, #44] ; (802d7dc ) 802d7b0: 6013 str r3, [r2, #0] 802d7b2: e002 b.n 802d7ba 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) { 802d7b4: 4293 cmp r3, r2 802d7b6: d1f6 bne.n 802d7a6 802d7b8: e7f9 b.n 802d7ae } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802d7ba: 4807 ldr r0, [pc, #28] ; (802d7d8 ) 802d7bc: f007 fde0 bl 8035380 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; 802d7c0: f105 0008 add.w r0, r5, #8 802d7c4: 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) { 802d7c6: 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; 802d7c8: 4573 cmp r3, lr 802d7ca: dbc3 blt.n 802d754 } 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); 802d7cc: 4802 ldr r0, [pc, #8] ; (802d7d8 ) 802d7ce: f007 fdd7 bl 8035380 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; 802d7d2: 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; } 802d7d4: bdf8 pop {r3, r4, r5, r6, r7, pc} 802d7d6: bf00 nop 802d7d8: 20002afc .word 0x20002afc 802d7dc: 20002af4 .word 0x20002af4 802d7e0: 20002b00 .word 0x20002b00 802d7e4: 20002af8 .word 0x20002af8 0802d7e8 : 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); 802d7e8: 4a0e ldr r2, [pc, #56] ; (802d824 ) 802d7ea: 490f ldr r1, [pc, #60] ; (802d828 ) * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 802d7ec: 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); 802d7ee: 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) { 802d7f0: 4e0e ldr r6, [pc, #56] ; (802d82c ) memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802d7f2: 4f0f ldr r7, [pc, #60] ; (802d830 ) 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); 802d7f4: 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; 802d7f8: 461d mov r5, r3 802d7fa: 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) { 802d7fe: f833 c006 ldrh.w ip, [r3, r6] 802d802: 2000 movs r0, #0 802d804: e008 b.n 802d818 memp->next = memp_tab[i]; 802d806: f851 4c04 ldr.w r4, [r1, #-4] 802d80a: 6014 str r4, [r2, #0] memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 802d80c: 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; 802d80e: 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) { 802d812: 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] 802d814: 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) { 802d816: b280 uxth r0, r0 802d818: 4560 cmp r0, ip 802d81a: d1f4 bne.n 802d806 802d81c: 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) { 802d81e: 2b20 cmp r3, #32 802d820: d1eb bne.n 802d7fa #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 */ } 802d822: bdf0 pop {r4, r5, r6, r7, pc} 802d824: 20002b07 .word 0x20002b07 802d828: 2000e144 .word 0x2000e144 802d82c: 0804134c .word 0x0804134c 802d830: 0804136c .word 0x0804136c 0802d834 : #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802d834: 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 { 802d836: b538 push {r3, r4, r5, lr} 802d838: 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;); 802d83a: d80b bhi.n 802d854 SYS_ARCH_PROTECT(old_level); 802d83c: f007 fdc0 bl 80353c0 #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; 802d840: 4b06 ldr r3, [pc, #24] ; (802d85c ) 802d842: f853 4025 ldr.w r4, [r3, r5, lsl #2] if (memp != NULL) { 802d846: b114 cbz r4, 802d84e memp_tab[type] = memp->next; 802d848: 6822 ldr r2, [r4, #0] 802d84a: 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); 802d84e: f007 fdc1 bl 80353d4 return memp; 802d852: e000 b.n 802d856 #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802d854: 2400 movs r4, #0 } SYS_ARCH_UNPROTECT(old_level); return memp; } 802d856: 4620 mov r0, r4 802d858: bd38 pop {r3, r4, r5, pc} 802d85a: bf00 nop 802d85c: 2000e144 .word 0x2000e144 0802d860 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 802d860: b538 push {r3, r4, r5, lr} 802d862: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); if (mem == NULL) { 802d864: 460c mov r4, r1 802d866: b159 cbz r1, 802d880 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); 802d868: f007 fdaa bl 80353c0 #endif /* MEMP_OVERFLOW_CHECK >= 2 */ #endif /* MEMP_OVERFLOW_CHECK */ MEMP_STATS_DEC(used, type); memp->next = memp_tab[type]; 802d86c: 4b05 ldr r3, [pc, #20] ; (802d884 ) 802d86e: f853 2025 ldr.w r2, [r3, r5, lsl #2] 802d872: 6022 str r2, [r4, #0] memp_tab[type] = memp; 802d874: 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); } 802d878: 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); 802d87c: f007 bdaa b.w 80353d4 802d880: bd38 pop {r3, r4, r5, pc} 802d882: bf00 nop 802d884: 2000e144 .word 0x2000e144 0802d888 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 802d888: 4770 bx lr 802d88a: 0000 movs r0, r0 0802d88c : * @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) { 802d88c: b570 push {r4, r5, r6, lr} 802d88e: 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) { 802d890: 460d mov r5, r1 802d892: b941 cbnz r1, 802d8a6 ip_addr_set(&(lpcb->local_ip), ipaddr); } } } #endif snmp_delete_ipaddridx_tree(netif); 802d894: 4620 mov r0, r4 802d896: f004 fdb5 bl 8032404 snmp_delete_iprteidx_tree(0,netif); 802d89a: 2000 movs r0, #0 802d89c: 4621 mov r1, r4 802d89e: f004 fe47 bl 8032530 /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802d8a2: b9fd cbnz r5, 802d8e4 802d8a4: e01f b.n 802d8e6 #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) { 802d8a6: 680a ldr r2, [r1, #0] 802d8a8: 6843 ldr r3, [r0, #4] 802d8aa: 429a cmp r2, r3 802d8ac: d0f2 beq.n 802d894 /* 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; 802d8ae: 4b13 ldr r3, [pc, #76] ; (802d8fc ) 802d8b0: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 802d8b2: e007 b.n 802d8c4 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr)) 802d8b4: 6802 ldr r2, [r0, #0] 802d8b6: 6863 ldr r3, [r4, #4] 802d8b8: 68c6 ldr r6, [r0, #12] 802d8ba: 429a cmp r2, r3 802d8bc: d101 bne.n 802d8c2 #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); 802d8be: f000 fd89 bl 802e3d4 pcb = next; } else { pcb = pcb->next; 802d8c2: 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) { 802d8c4: 2800 cmp r0, #0 802d8c6: d1f5 bne.n 802d8b4 pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802d8c8: 4b0d ldr r3, [pc, #52] ; (802d900 ) 802d8ca: 681b ldr r3, [r3, #0] 802d8cc: e007 b.n 802d8de /* PCB bound to current local interface address? */ if ((!(ip_addr_isany(&(lpcb->local_ip)))) && 802d8ce: 681a ldr r2, [r3, #0] 802d8d0: b122 cbz r2, 802d8dc 802d8d2: 6861 ldr r1, [r4, #4] 802d8d4: 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); 802d8d6: bf04 itt eq 802d8d8: 682a ldreq r2, [r5, #0] 802d8da: 601a streq r2, [r3, #0] pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802d8dc: 68db ldr r3, [r3, #12] 802d8de: 2b00 cmp r3, #0 802d8e0: d1f5 bne.n 802d8ce 802d8e2: e7d7 b.n 802d894 } #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); 802d8e4: 682d ldr r5, [r5, #0] snmp_insert_ipaddridx_tree(netif); 802d8e6: 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); 802d8e8: 6065 str r5, [r4, #4] snmp_insert_ipaddridx_tree(netif); 802d8ea: f004 fd49 bl 8032380 snmp_insert_iprteidx_tree(0,netif); 802d8ee: 2000 movs r0, #0 802d8f0: 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))); } 802d8f2: 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); 802d8f6: f004 bdcf b.w 8032498 802d8fa: bf00 nop 802d8fc: 2001107c .word 0x2001107c 802d900: 20011084 .word 0x20011084 0802d904 : * @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); 802d904: b101 cbz r1, 802d908 802d906: 6809 ldr r1, [r1, #0] 802d908: 60c1 str r1, [r0, #12] 802d90a: 4770 bx lr 0802d90c : * @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) { 802d90c: b538 push {r3, r4, r5, lr} 802d90e: 4604 mov r4, r0 802d910: 460d mov r5, r1 snmp_delete_iprteidx_tree(0, netif); 802d912: 2000 movs r0, #0 802d914: 4621 mov r1, r4 802d916: f004 fe0b bl 8032530 /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802d91a: b105 cbz r5, 802d91e 802d91c: 682d ldr r5, [r5, #0] snmp_insert_iprteidx_tree(0, netif); 802d91e: 2000 movs r0, #0 802d920: 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); 802d922: 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))); } 802d924: 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); 802d928: f004 bdb6 b.w 8032498 0802d92c : * @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) { 802d92c: b570 push {r4, r5, r6, lr} 802d92e: 4605 mov r5, r0 802d930: 4616 mov r6, r2 802d932: 461c mov r4, r3 netif_set_ipaddr(netif, ipaddr); 802d934: f7ff ffaa bl 802d88c netif_set_netmask(netif, netmask); 802d938: 4628 mov r0, r5 802d93a: 4631 mov r1, r6 802d93c: f7ff ffe6 bl 802d90c * @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); 802d940: b104 cbz r4, 802d944 802d942: 6824 ldr r4, [r4, #0] 802d944: 60ec str r4, [r5, #12] 802d946: bd70 pop {r4, r5, r6, pc} 0802d948 : * @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) { 802d948: 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; 802d94a: 9e06 ldr r6, [sp, #24] 802d94c: 61c6 str r6, [r0, #28] netif->num = netif_num++; 802d94e: 4e10 ldr r6, [pc, #64] ; (802d990 ) 802d950: 7837 ldrb r7, [r6, #0] 802d952: f880 7030 strb.w r7, [r0, #48] ; 0x30 802d956: 3701 adds r7, #1 802d958: 7037 strb r7, [r6, #0] netif->input = input; 802d95a: 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); 802d95c: 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) { 802d95e: 4604 mov r4, r0 LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 802d960: 6045 str r5, [r0, #4] ip_addr_set_zero(&netif->netmask); 802d962: 6085 str r5, [r0, #8] ip_addr_set_zero(&netif->gw); 802d964: 60c5 str r5, [r0, #12] netif->flags = 0; 802d966: f880 502d strb.w r5, [r0, #45] ; 0x2d #if LWIP_DHCP /* netif not under DHCP control by default */ netif->dhcp = NULL; 802d96a: 6205 str r5, [r0, #32] #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; netif->input = input; 802d96c: 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); 802d96e: f7ff ffdd bl 802d92c /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 802d972: 4620 mov r0, r4 802d974: 9b07 ldr r3, [sp, #28] 802d976: 4798 blx r3 802d978: b930 cbnz r0, 802d988 return NULL; } /* add this netif to the list */ netif->next = netif_list; 802d97a: 4b06 ldr r3, [pc, #24] ; (802d994 ) 802d97c: 681a ldr r2, [r3, #0] 802d97e: 6022 str r2, [r4, #0] netif_list = netif; 802d980: 601c str r4, [r3, #0] snmp_inc_iflist(); 802d982: f004 fbe1 bl 8032148 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; 802d986: e000 b.n 802d98a netif_set_addr(netif, ipaddr, netmask, gw); /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { return NULL; 802d988: 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; } 802d98a: 4620 mov r0, r4 802d98c: bdf8 pop {r3, r4, r5, r6, r7, pc} 802d98e: bf00 nop 802d990: 2000e184 .word 0x2000e184 802d994: 20011070 .word 0x20011070 0802d998 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 802d998: b510 push {r4, lr} if (netif == NULL) { 802d99a: 4604 mov r4, r0 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802d99c: 4621 mov r1, r4 802d99e: 2001 movs r0, #1 * @param netif the default network interface */ void netif_set_default(struct netif *netif) { if (netif == NULL) { 802d9a0: b914 cbnz r4, 802d9a8 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 802d9a2: f004 fdc5 bl 8032530 802d9a6: e001 b.n 802d9ac } else { /* install default route */ snmp_insert_iprteidx_tree(1, netif); 802d9a8: f004 fd76 bl 8032498 } netif_default = netif; 802d9ac: 4b01 ldr r3, [pc, #4] ; (802d9b4 ) 802d9ae: 601c str r4, [r3, #0] 802d9b0: bd10 pop {r4, pc} 802d9b2: bf00 nop 802d9b4: 20011074 .word 0x20011074 0802d9b8 : * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802d9b8: b510 push {r4, lr} if (!(netif->flags & NETIF_FLAG_UP)) { 802d9ba: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802d9be: 07da lsls r2, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802d9c0: 4604 mov r4, r0 if (!(netif->flags & NETIF_FLAG_UP)) { 802d9c2: d412 bmi.n 802d9ea netif->flags |= NETIF_FLAG_UP; 802d9c4: f043 0301 orr.w r3, r3, #1 802d9c8: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802d9cc: 3038 adds r0, #56 ; 0x38 802d9ce: f004 fb55 bl 803207c * @note: Enabling DHCP on a down interface will make it come * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) 802d9d2: 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)) { 802d9d6: f003 0330 and.w r3, r3, #48 ; 0x30 802d9da: 2b30 cmp r3, #48 ; 0x30 802d9dc: d105 bne.n 802d9ea etharp_gratuitous(netif); 802d9de: 4620 mov r0, r4 802d9e0: 1d21 adds r1, r4, #4 igmp_report_groups( netif); } #endif /* LWIP_IGMP */ } } } 802d9e2: 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); 802d9e6: f007 b89f b.w 8034b28 802d9ea: bd10 pop {r4, pc} 0802d9ec : * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802d9ec: b510 push {r4, lr} if (netif->flags & NETIF_FLAG_UP) { 802d9ee: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 802d9f2: 07d9 lsls r1, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 802d9f4: 4604 mov r4, r0 if (netif->flags & NETIF_FLAG_UP) { 802d9f6: d511 bpl.n 802da1c netif->flags &= ~NETIF_FLAG_UP; 802d9f8: f023 0301 bic.w r3, r3, #1 802d9fc: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 802da00: 3038 adds r0, #56 ; 0x38 802da02: f004 fb3b bl 803207c #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 802da06: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802da0a: f003 0320 and.w r3, r3, #32 802da0e: b2db uxtb r3, r3 802da10: b123 cbz r3, 802da1c etharp_cleanup_netif(netif); 802da12: 4620 mov r0, r4 } #endif /* LWIP_ARP */ NETIF_STATUS_CALLBACK(netif); } } 802da14: 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); 802da18: f007 b856 b.w 8034ac8 802da1c: bd10 pop {r4, pc} 0802da1e : * @return non-zero on failure, zero on success. * */ u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { 802da1e: 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)) { 802da20: b321 cbz r1, 802da6c 802da22: b330 cbz r0, 802da72 return 0; } if (header_size_increment < 0){ 802da24: 2900 cmp r1, #0 802da26: da05 bge.n 802da34 increment_magnitude = -header_size_increment; 802da28: 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;); 802da2a: 8942 ldrh r2, [r0, #10] if ((header_size_increment == 0) || (p == NULL)) { return 0; } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; 802da2c: 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;); 802da2e: 429a cmp r2, r3 802da30: d201 bcs.n 802da36 802da32: e01d b.n 802da70 } else { increment_magnitude = header_size_increment; 802da34: 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; 802da36: 7b02 ldrb r2, [r0, #12] /* remember current payload pointer */ payload = p->payload; 802da38: 6844 ldr r4, [r0, #4] /* pbuf types containing payloads? */ if (type == PBUF_RAM || type == PBUF_POOL) { 802da3a: b10a cbz r2, 802da40 802da3c: 2a03 cmp r2, #3 802da3e: d105 bne.n 802da4c /* set new payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802da40: 1a64 subs r4, r4, r1 /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 802da42: f100 0310 add.w r3, r0, #16 802da46: 429c cmp r4, r3 802da48: d312 bcc.n 802da70 802da4a: e008 b.n 802da5e p->payload = payload; /* bail out unsuccesfully */ return 1; } /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { 802da4c: 3a01 subs r2, #1 802da4e: 2a01 cmp r2, #1 802da50: d80e bhi.n 802da70 /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { 802da52: 2900 cmp r1, #0 802da54: da0c bge.n 802da70 802da56: 8942 ldrh r2, [r0, #10] 802da58: 429a cmp r2, r3 802da5a: d309 bcc.n 802da70 /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 802da5c: 1a64 subs r4, r4, r1 /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802da5e: 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; 802da60: 6044 str r4, [r0, #4] /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 802da62: 18cb adds r3, r1, r3 802da64: 8143 strh r3, [r0, #10] p->tot_len += header_size_increment; 802da66: 8903 ldrh r3, [r0, #8] 802da68: 18c9 adds r1, r1, r3 802da6a: 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; 802da6c: 2000 movs r0, #0 802da6e: 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;); 802da70: 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; } 802da72: bd10 pop {r4, pc} 0802da74 : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 802da74: b570 push {r4, r5, r6, lr} u16_t type; struct pbuf *q; u8_t count; if (p == NULL) { 802da76: 4604 mov r4, r0 802da78: b300 cbz r0, 802dabc 802da7a: 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); 802da7c: f007 fca0 bl 80353c0 /* 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); 802da80: 89e6 ldrh r6, [r4, #14] 802da82: 3e01 subs r6, #1 802da84: b2b6 uxth r6, r6 802da86: 81e6 strh r6, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 802da88: f007 fca4 bl 80353d4 /* this pbuf is no longer referenced to? */ if (ref == 0) { 802da8c: b9be cbnz r6, 802dabe /* 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; 802da8e: 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; 802da90: 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) { 802da92: 2b03 cmp r3, #3 802da94: d101 bne.n 802da9a memp_free(MEMP_PBUF_POOL, p); 802da96: 200f movs r0, #15 802da98: e003 b.n 802daa2 /* is this a ROM or RAM referencing pbuf? */ } else if (type == PBUF_ROM || type == PBUF_REF) { 802da9a: 3b01 subs r3, #1 802da9c: 2b01 cmp r3, #1 802da9e: d804 bhi.n 802daaa memp_free(MEMP_PBUF, p); 802daa0: 200e movs r0, #14 802daa2: 4621 mov r1, r4 802daa4: f7ff fedc bl 802d860 802daa8: e002 b.n 802dab0 /* type == PBUF_RAM */ } else { mem_free(p); 802daaa: 4620 mov r0, r4 802daac: f7ff fd70 bl 802d590 } } count++; 802dab0: 3501 adds r5, #1 802dab2: 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) { 802dab4: 4634 mov r4, r6 802dab6: 2e00 cmp r6, #0 802dab8: d1e0 bne.n 802da7c 802daba: e000 b.n 802dabe 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; 802dabc: 4605 mov r5, r0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 802dabe: 4628 mov r0, r5 802dac0: bd70 pop {r4, r5, r6, pc} 0802dac2 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 802dac2: 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) { 802dac4: 8903 ldrh r3, [r0, #8] 802dac6: 4299 cmp r1, r3 802dac8: d220 bcs.n 802db0c 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; 802daca: 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) { 802dacc: 460d mov r5, r1 802dace: 4604 mov r4, r0 802dad0: e005 b.n 802dade /* decrease remaining length by pbuf length */ rem_len -= q->len; 802dad2: 1aed subs r5, r5, r3 /* decrease total length indicator */ LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); q->tot_len += (u16_t)grow; 802dad4: 8923 ldrh r3, [r4, #8] 802dad6: 18d3 adds r3, r2, r3 802dad8: 8123 strh r3, [r4, #8] /* proceed to next pbuf in chain */ q = q->next; 802dada: 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; 802dadc: 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) { 802dade: 8963 ldrh r3, [r4, #10] 802dae0: 429d cmp r5, r3 802dae2: d8f6 bhi.n 802dad2 /* 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)) { 802dae4: 7b22 ldrb r2, [r4, #12] 802dae6: b94a cbnz r2, 802dafc 802dae8: 429d cmp r5, r3 802daea: d007 beq.n 802dafc /* 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); 802daec: 6863 ldr r3, [r4, #4] 802daee: 1b1b subs r3, r3, r4 802daf0: 18e9 adds r1, r5, r3 802daf2: 4620 mov r0, r4 802daf4: b289 uxth r1, r1 802daf6: f7ff fda5 bl 802d644 802dafa: 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) { 802dafc: 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; 802dafe: 8165 strh r5, [r4, #10] q->tot_len = q->len; 802db00: 8125 strh r5, [r4, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 802db02: b108 cbz r0, 802db08 /* free remaining pbufs in chain */ pbuf_free(q->next); 802db04: f7ff ffb6 bl 802da74 } /* q is last packet in chain */ q->next = NULL; 802db08: 2300 movs r3, #0 802db0a: 6023 str r3, [r4, #0] 802db0c: bd38 pop {r3, r4, r5, pc} 0802db0e : * @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) { 802db0e: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802db12: 460d mov r5, r1 802db14: 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) { 802db16: 2803 cmp r0, #3 802db18: d87c bhi.n 802dc14 802db1a: e8df f000 tbb [pc, r0] 802db1e: 0802 .short 0x0802 802db20: 0604 .short 0x0604 case PBUF_TRANSPORT: /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; 802db22: 2636 movs r6, #54 ; 0x36 802db24: e004 b.n 802db30 /* 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; 802db26: 260e movs r6, #14 break; 802db28: e002 b.n 802db30 case PBUF_RAW: offset = 0; 802db2a: 2600 movs r6, #0 break; 802db2c: e000 b.n 802db30 /* 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; 802db2e: 2622 movs r6, #34 ; 0x22 default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); return NULL; } switch (type) { 802db30: 2f03 cmp r7, #3 802db32: d86f bhi.n 802dc14 802db34: e8df f007 tbb [pc, r7] 802db38: 025e5e46 .word 0x025e5e46 case PBUF_POOL: /* allocate head of pbuf chain into p */ p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802db3c: 200f movs r0, #15 802db3e: f7ff fe79 bl 802d834 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { 802db42: 4604 mov r4, r0 802db44: b900 cbnz r0, 802db48 802db46: e065 b.n 802dc14 } 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))); 802db48: 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)); 802db4a: 3603 adds r6, #3 802db4c: 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))); 802db50: 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)); 802db52: 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; 802db56: 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))); 802db58: 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)); 802db5c: 3604 adds r6, #4 802db5e: 42ae cmp r6, r5 802db60: bfa8 it ge 802db62: 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; 802db64: 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))); 802db66: 6042 str r2, [r0, #4] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802db68: 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; 802db6a: 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)); 802db6c: 8146 strh r6, [r0, #10] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 802db6e: 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; 802db70: 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; 802db72: 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; 802db74: 1bae subs r6, r5, r6 /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 802db76: 4607 mov r7, r0 802db78: 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); 802db7a: f240 6903 movw r9, #1539 ; 0x603 802db7e: 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) { 802db82: e01c b.n 802dbbe q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 802db84: 200f movs r0, #15 802db86: f7ff fe55 bl 802d834 if (q == NULL) { 802db8a: 4605 mov r5, r0 802db8c: b918 cbnz r0, 802db96 PBUF_POOL_IS_EMPTY(); /* free chain so far allocated */ pbuf_free(p); 802db8e: 4620 mov r0, r4 802db90: f7ff ff70 bl 802da74 802db94: e03e b.n 802dc14 /* bail out unsuccesfully */ return NULL; } q->type = type; 802db96: 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); 802db98: f100 0210 add.w r2, r0, #16 /* free chain so far allocated */ pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; 802db9c: 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; 802db9e: b2b3 uxth r3, r6 802dba0: 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); 802dba2: 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); 802dba4: 454b cmp r3, r9 802dba6: bf88 it hi 802dba8: 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; 802dbaa: 2201 movs r2, #1 /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; q->next = NULL; 802dbac: f8c0 8000 str.w r8, [r0] pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; 802dbb0: f880 800d strb.w r8, [r0, #13] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; 802dbb4: 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); 802dbb6: 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; 802dbb8: 81c2 strh r2, [r0, #14] /* calculate remaining length to be allocated */ rem_len -= q->len; 802dbba: 1af6 subs r6, r6, r3 802dbbc: 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) { 802dbbe: 2e00 cmp r6, #0 802dbc0: dce0 bgt.n 802db84 802dbc2: e022 b.n 802dc0a /*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)); 802dbc4: f106 0013 add.w r0, r6, #19 802dbc8: 1ceb adds r3, r5, #3 802dbca: f023 0303 bic.w r3, r3, #3 802dbce: f020 0003 bic.w r0, r0, #3 802dbd2: 18c0 adds r0, r0, r3 802dbd4: b280 uxth r0, r0 802dbd6: f7ff fda3 bl 802d720 if (p == NULL) { 802dbda: 4604 mov r4, r0 802dbdc: b1d0 cbz r0, 802dc14 return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 802dbde: 1986 adds r6, r0, r6 802dbe0: 3613 adds r6, #19 p->len = p->tot_len = length; p->next = NULL; 802dbe2: 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)); 802dbe4: f026 0603 bic.w r6, r6, #3 802dbe8: 6046 str r6, [r0, #4] p->len = p->tot_len = length; 802dbea: 8105 strh r5, [r0, #8] 802dbec: 8145 strh r5, [r0, #10] p->next = NULL; 802dbee: 6003 str r3, [r0, #0] p->type = type; 802dbf0: 7303 strb r3, [r0, #12] 802dbf2: e00a b.n 802dc0a /* 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); 802dbf4: 200e movs r0, #14 802dbf6: f7ff fe1d bl 802d834 if (p == NULL) { 802dbfa: 4604 mov r4, r0 802dbfc: b150 cbz r0, 802dc14 ("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; 802dbfe: 2300 movs r3, #0 802dc00: 6043 str r3, [r0, #4] p->len = p->tot_len = length; 802dc02: 8105 strh r5, [r0, #8] 802dc04: 8145 strh r5, [r0, #10] p->next = NULL; 802dc06: 6003 str r3, [r0, #0] p->type = type; 802dc08: 7307 strb r7, [r0, #12] default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; } /* set reference count */ p->ref = 1; 802dc0a: 2301 movs r3, #1 802dc0c: 81e3 strh r3, [r4, #14] /* set flags */ p->flags = 0; 802dc0e: 2300 movs r3, #0 802dc10: 7363 strb r3, [r4, #13] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 802dc12: e000 b.n 802dc16 p->next = NULL; p->type = type; break; default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; 802dc14: 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; } 802dc16: 4620 mov r0, r4 802dc18: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802dc1c : * @return the number of pbufs in a chain */ u8_t pbuf_clen(struct pbuf *p) { 802dc1c: 4603 mov r3, r0 u8_t len; len = 0; 802dc1e: 2000 movs r0, #0 while (p != NULL) { 802dc20: e002 b.n 802dc28 ++len; 802dc22: 3001 adds r0, #1 p = p->next; 802dc24: 681b ldr r3, [r3, #0] { u8_t len; len = 0; while (p != NULL) { ++len; 802dc26: b2c0 uxtb r0, r0 pbuf_clen(struct pbuf *p) { u8_t len; len = 0; while (p != NULL) { 802dc28: 2b00 cmp r3, #0 802dc2a: d1fa bne.n 802dc22 ++len; p = p->next; } return len; } 802dc2c: 4770 bx lr 0802dc2e : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 802dc2e: b510 push {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { 802dc30: 4604 mov r4, r0 802dc32: b140 cbz r0, 802dc46 SYS_ARCH_PROTECT(old_level); 802dc34: f007 fbc4 bl 80353c0 ++(p->ref); 802dc38: 89e3 ldrh r3, [r4, #14] 802dc3a: 3301 adds r3, #1 802dc3c: 81e3 strh r3, [r4, #14] SYS_ARCH_UNPROTECT(old_level); } } 802dc3e: 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); 802dc42: f007 bbc7 b.w 80353d4 802dc46: bd10 pop {r4, pc} 0802dc48 : * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 802dc48: b510 push {r4, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 802dc4a: b168 cbz r0, 802dc68 802dc4c: b161 cbz r1, 802dc68 802dc4e: e003 b.n 802dc58 ((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; 802dc50: 8904 ldrh r4, [r0, #8] 802dc52: 191b adds r3, r3, r4 802dc54: 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) { 802dc56: 4610 mov r0, r2 802dc58: 6802 ldr r2, [r0, #0] 802dc5a: 890b ldrh r3, [r1, #8] 802dc5c: 2a00 cmp r2, #0 802dc5e: d1f7 bne.n 802dc50 } /* { 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; 802dc60: 8902 ldrh r2, [r0, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 802dc62: 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; 802dc64: 189b adds r3, r3, r2 802dc66: 8103 strh r3, [r0, #8] 802dc68: bd10 pop {r4, pc} 0802dc6a : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 802dc6a: b510 push {r4, lr} 802dc6c: 460c mov r4, r1 pbuf_cat(h, t); 802dc6e: f7ff ffeb bl 802dc48 /* t is now referenced by h */ pbuf_ref(t); 802dc72: 4620 mov r0, r4 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 802dc74: 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); 802dc78: f7ff bfd9 b.w 802dc2e 0802dc7c : * 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) { 802dc7c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802dc80: 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) && 802dc82: 4605 mov r5, r0 802dc84: b908 cbnz r0, 802dc8a 802dc86: 20f2 movs r0, #242 ; 0xf2 802dc88: e03f b.n 802dd0a 802dc8a: 2900 cmp r1, #0 802dc8c: d0fb beq.n 802dc86 802dc8e: 8902 ldrh r2, [r0, #8] 802dc90: 890b ldrh r3, [r1, #8] 802dc92: 429a cmp r2, r3 802dc94: d3f7 bcc.n 802dc86 802dc96: 2600 movs r6, #0 802dc98: 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)) { 802dc9a: f8b4 800a ldrh.w r8, [r4, #10] 802dc9e: 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); 802dca0: 6861 ldr r1, [r4, #4] 802dca2: 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)) { 802dca4: ebc6 0808 rsb r8, r6, r8 802dca8: 1bdb subs r3, r3, r7 802dcaa: 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; 802dcac: bfb4 ite lt 802dcae: 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; 802dcb2: 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); 802dcb6: 19c0 adds r0, r0, r7 802dcb8: 1989 adds r1, r1, r6 802dcba: 4642 mov r2, r8 802dcbc: f7f3 fe46 bl 802194c offset_to += len; offset_from += len; 802dcc0: 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) { 802dcc2: 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; 802dcc4: 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) { 802dcc6: 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; 802dcc8: 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) { 802dcca: 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; 802dccc: bf98 it ls 802dcce: 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; 802dcd0: 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; 802dcd2: bf98 it ls 802dcd4: 2600 movls r6, #0 p_from = p_from->next; } if (offset_to == p_to->len) { 802dcd6: 42bb cmp r3, r7 802dcd8: d105 bne.n 802dce6 /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 802dcda: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); 802dcdc: b915 cbnz r5, 802dce4 802dcde: 2c00 cmp r4, #0 802dce0: d1d1 bne.n 802dc86 802dce2: e00f b.n 802dd04 offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; 802dce4: 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)) { 802dce6: b12c cbz r4, 802dcf4 802dce8: 8962 ldrh r2, [r4, #10] 802dcea: 8923 ldrh r3, [r4, #8] 802dcec: 429a cmp r2, r3 802dcee: d101 bne.n 802dcf4 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802dcf0: 6823 ldr r3, [r4, #0] 802dcf2: b94b cbnz r3, 802dd08 (p_from->next == NULL), return ERR_VAL;); } if((p_to != NULL) && (p_to->len == p_to->tot_len)) { 802dcf4: 896a ldrh r2, [r5, #10] 802dcf6: 892b ldrh r3, [r5, #8] 802dcf8: 429a cmp r2, r3 802dcfa: d101 bne.n 802dd00 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802dcfc: 682b ldr r3, [r5, #0] 802dcfe: b91b cbnz r3, 802dd08 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 802dd00: 2c00 cmp r4, #0 802dd02: d1ca bne.n 802dc9a LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 802dd04: 4620 mov r0, r4 802dd06: e000 b.n 802dd0a 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", 802dd08: 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; } 802dd0a: b240 sxtb r0, r0 802dd0c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802dd10 : * @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) { 802dd10: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802dd14: 4688 mov r8, r1 802dd16: 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;); 802dd18: b328 cbz r0, 802dd66 LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 802dd1a: b331 cbz r1, 802dd6a 802dd1c: 2400 movs r4, #0 802dd1e: 4605 mov r5, r0 802dd20: 46a1 mov r9, r4 802dd22: e01c b.n 802dd5e 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)) { 802dd24: b12b cbz r3, 802dd32 802dd26: 896a ldrh r2, [r5, #10] 802dd28: 4293 cmp r3, r2 802dd2a: d302 bcc.n 802dd32 /* don't copy from this buffer -> on to the next */ offset -= p->len; 802dd2c: 1a9b subs r3, r3, r2 802dd2e: b29b uxth r3, r3 802dd30: e014 b.n 802dd5c } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 802dd32: 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); 802dd34: 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; 802dd36: 1aff subs r7, r7, r3 802dd38: b2bf uxth r7, r7 802dd3a: 42b7 cmp r7, r6 802dd3c: bf28 it cs 802dd3e: 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); 802dd40: eb08 0009 add.w r0, r8, r9 802dd44: 18c9 adds r1, r1, r3 802dd46: 463a mov r2, r7 copied_total += buf_copy_len; 802dd48: 193c adds r4, r7, r4 left += buf_copy_len; 802dd4a: 44b9 add r9, r7 len -= buf_copy_len; 802dd4c: 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); 802dd4e: f7f3 fdfd bl 802194c copied_total += buf_copy_len; 802dd52: b2a4 uxth r4, r4 left += buf_copy_len; 802dd54: fa1f f989 uxth.w r9, r9 len -= buf_copy_len; 802dd58: b2b6 uxth r6, r6 offset = 0; 802dd5a: 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) { 802dd5c: 682d ldr r5, [r5, #0] 802dd5e: b12e cbz r6, 802dd6c 802dd60: 2d00 cmp r5, #0 802dd62: d1df bne.n 802dd24 802dd64: e002 b.n 802dd6c 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;); 802dd66: 4604 mov r4, r0 802dd68: e000 b.n 802dd6c 802dd6a: 460c mov r4, r1 len -= buf_copy_len; offset = 0; } } return copied_total; } 802dd6c: 4620 mov r0, r4 802dd6e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802dd72: 0000 movs r0, r0 0802dd74 : * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 802dd74: 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); 802dd78: 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))) { 802dd7a: f8df a074 ldr.w sl, [pc, #116] ; 802ddf0 u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 802dd7e: f893 9009 ldrb.w r9, [r3, #9] prev = NULL; pcb = raw_pcbs; 802dd82: 4b19 ldr r3, [pc, #100] ; (802dde8 ) * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 802dd84: 4606 mov r6, r0 iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; pcb = raw_pcbs; 802dd86: 681c ldr r4, [r3, #0] LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; 802dd88: 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; 802dd8a: 4698 mov r8, r3 802dd8c: e023 b.n 802ddd6 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) && 802dd8e: 7c23 ldrb r3, [r4, #16] 802dd90: 454b cmp r3, r9 802dd92: d118 bne.n 802ddc6 (ip_addr_isany(&pcb->local_ip) || 802dd94: 6823 ldr r3, [r4, #0] 802dd96: b11b cbz r3, 802dda0 802dd98: f8da 2000 ldr.w r2, [sl] 802dd9c: 4293 cmp r3, r2 802dd9e: d112 bne.n 802ddc6 /* 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) { 802dda0: 6967 ldr r7, [r4, #20] 802dda2: b187 cbz r7, 802ddc6 /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { 802dda4: 69a0 ldr r0, [r4, #24] 802dda6: 4b11 ldr r3, [pc, #68] ; (802ddec ) 802dda8: 4621 mov r1, r4 802ddaa: 4632 mov r2, r6 802ddac: 47b8 blx r7 802ddae: b150 cbz r0, 802ddc6 /* receive function ate the packet */ p = NULL; eaten = 1; if (prev != NULL) { 802ddb0: b15d cbz r5, 802ddca /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; 802ddb2: 68e3 ldr r3, [r4, #12] 802ddb4: 60eb str r3, [r5, #12] pcb->next = raw_pcbs; 802ddb6: f8d8 3000 ldr.w r3, [r8] raw_pcbs = pcb; 802ddba: 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; 802ddbe: 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; 802ddc0: 2600 movs r6, #0 eaten = 1; 802ddc2: 2301 movs r3, #1 802ddc4: e003 b.n 802ddce 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) || 802ddc6: 2300 movs r3, #0 802ddc8: e001 b.n 802ddce 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; 802ddca: 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; 802ddcc: 462e mov r6, r5 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 802ddce: 68e2 ldr r2, [r4, #12] 802ddd0: 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)) { 802ddd2: b92b cbnz r3, 802dde0 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 802ddd4: 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)) { 802ddd6: 2c00 cmp r4, #0 802ddd8: d1d9 bne.n 802dd8e 802ddda: 4620 mov r0, r4 802dddc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802dde0: 2001 movs r0, #1 } prev = pcb; pcb = pcb->next; } return eaten; } 802dde2: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802dde6: bf00 nop 802dde8: 2000e188 .word 0x2000e188 802ddec: 2001109c .word 0x2001109c 802ddf0: 200110a4 .word 0x200110a4 0802ddf4 : LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(err); return ERR_ABRT; } 802ddf4: f06f 0009 mvn.w r0, #9 802ddf8: 4770 bx lr 802ddfa: 0000 movs r0, r0 0802ddfc : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 802ddfc: 4b13 ldr r3, [pc, #76] ; (802de4c ) 802ddfe: b570 push {r4, r5, r6, lr} 802de00: 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) { 802de02: 4d13 ldr r5, [pc, #76] ; (802de50 ) * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 802de04: 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) { 802de08: f64f 74ff movw r4, #65535 ; 0xffff 802de0c: 42a0 cmp r0, r4 802de0e: d002 beq.n 802de16 802de10: 3001 adds r0, #1 802de12: b280 uxth r0, r0 802de14: e001 b.n 802de1a tcp_port = TCP_LOCAL_PORT_RANGE_START; 802de16: f44f 4040 mov.w r0, #49152 ; 0xc000 802de1a: 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) { 802de1c: 5959 ldr r1, [r3, r5] 802de1e: 6809 ldr r1, [r1, #0] 802de20: e00b b.n 802de3a if (pcb->local_port == tcp_port) { 802de22: 8b4e ldrh r6, [r1, #26] 802de24: 4286 cmp r6, r0 802de26: d107 bne.n 802de38 802de28: 3a01 subs r2, #1 802de2a: b292 uxth r2, r2 if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 802de2c: 2a00 cmp r2, #0 802de2e: d1ed bne.n 802de0c 802de30: 4b06 ldr r3, [pc, #24] ; (802de4c ) 802de32: 8018 strh r0, [r3, #0] return 0; 802de34: 4610 mov r0, r2 802de36: 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) { 802de38: 68c9 ldr r1, [r1, #12] 802de3a: 2900 cmp r1, #0 802de3c: d1f1 bne.n 802de22 802de3e: 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++) { 802de40: 2b10 cmp r3, #16 802de42: d1eb bne.n 802de1c 802de44: 4b01 ldr r3, [pc, #4] ; (802de4c ) 802de46: 8018 strh r0, [r3, #0] goto again; } } } return tcp_port; } 802de48: bd70 pop {r4, r5, r6, pc} 802de4a: bf00 nop 802de4c: 200015f0 .word 0x200015f0 802de50: 0804138c .word 0x0804138c 0802de54 : /** * Initialize this module. */ void tcp_init(void) { 802de54: 4770 bx lr 802de56: 0000 movs r0, r0 0802de58 : * 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) { 802de58: 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); 802de5a: 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) { 802de5c: 4604 mov r4, r0 802de5e: 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); 802de60: bb33 cbnz r3, 802deb0 if (ip_get_option(pcb, SOF_REUSEADDR)) { max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; } #endif /* SO_REUSE */ if (port == 0) { 802de62: b91a cbnz r2, 802de6c port = tcp_new_port(); 802de64: f7ff ffca bl 802ddfc if (port == 0) { 802de68: 4602 mov r2, r0 802de6a: b318 cbz r0, 802deb4 } } /* 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) { 802de6c: 4f14 ldr r7, [pc, #80] ; (802dec0 ) * 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) { 802de6e: 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) { 802de70: 59cb ldr r3, [r1, r7] 802de72: 681b ldr r3, [r3, #0] 802de74: e00a b.n 802de8c if (cpcb->local_port == port) { 802de76: 8b58 ldrh r0, [r3, #26] 802de78: 4290 cmp r0, r2 802de7a: d106 bne.n 802de8a 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)) || 802de7c: 681e ldr r6, [r3, #0] 802de7e: b1de cbz r6, 802deb8 802de80: b1d5 cbz r5, 802deb8 ip_addr_isany(ipaddr) || 802de82: 6828 ldr r0, [r5, #0] 802de84: b1c0 cbz r0, 802deb8 802de86: 4286 cmp r6, r0 802de88: d016 beq.n 802deb8 } } /* 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) { 802de8a: 68db ldr r3, [r3, #12] 802de8c: 2b00 cmp r3, #0 802de8e: d1f2 bne.n 802de76 802de90: 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++) { 802de92: 2910 cmp r1, #16 802de94: d1ec bne.n 802de70 } } } } if (!ip_addr_isany(ipaddr)) { 802de96: b115 cbz r5, 802de9e 802de98: 682b ldr r3, [r5, #0] 802de9a: b103 cbz r3, 802de9e pcb->local_ip = *ipaddr; 802de9c: 6023 str r3, [r4, #0] } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); 802de9e: 4b09 ldr r3, [pc, #36] ; (802dec4 ) } if (!ip_addr_isany(ipaddr)) { pcb->local_ip = *ipaddr; } pcb->local_port = port; 802dea0: 8362 strh r2, [r4, #26] TCP_REG(&tcp_bound_pcbs, pcb); 802dea2: 681a ldr r2, [r3, #0] 802dea4: 601c str r4, [r3, #0] 802dea6: 60e2 str r2, [r4, #12] 802dea8: f002 f8de bl 8030068 LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; 802deac: 2000 movs r0, #0 802deae: e004 b.n 802deba { 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); 802deb0: 20fa movs r0, #250 ; 0xfa 802deb2: e002 b.n 802deba #endif /* SO_REUSE */ if (port == 0) { port = tcp_new_port(); if (port == 0) { return ERR_BUF; 802deb4: 20fe movs r0, #254 ; 0xfe 802deb6: e000 b.n 802deba #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; 802deb8: 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; } 802deba: b240 sxtb r0, r0 802debc: bdf8 pop {r3, r4, r5, r6, r7, pc} 802debe: bf00 nop 802dec0: 0804138c .word 0x0804138c 802dec4: 2001108c .word 0x2001108c 0802dec8 : * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 802dec8: 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); 802deca: 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) { 802decc: 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); 802dece: b10b cbz r3, 802ded4 802ded0: 2000 movs r0, #0 802ded2: bd38 pop {r3, r4, r5, pc} } } } } #endif /* SO_REUSE */ lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); 802ded4: 2003 movs r0, #3 802ded6: f7ff fcad bl 802d834 if (lpcb == NULL) { 802deda: 4605 mov r5, r0 802dedc: 2800 cmp r0, #0 802dede: d0f7 beq.n 802ded0 return NULL; } lpcb->callback_arg = pcb->callback_arg; 802dee0: 6923 ldr r3, [r4, #16] 802dee2: 6103 str r3, [r0, #16] lpcb->local_port = pcb->local_port; 802dee4: 8b63 ldrh r3, [r4, #26] 802dee6: 8343 strh r3, [r0, #26] lpcb->state = LISTEN; 802dee8: 2301 movs r3, #1 802deea: 7603 strb r3, [r0, #24] lpcb->prio = pcb->prio; 802deec: 7e63 ldrb r3, [r4, #25] 802deee: 7643 strb r3, [r0, #25] lpcb->so_options = pcb->so_options; ip_set_option(lpcb, SOF_ACCEPTCONN); 802def0: 7a23 ldrb r3, [r4, #8] 802def2: f043 0302 orr.w r3, r3, #2 802def6: 7203 strb r3, [r0, #8] lpcb->ttl = pcb->ttl; 802def8: 7aa3 ldrb r3, [r4, #10] 802defa: 7283 strb r3, [r0, #10] lpcb->tos = pcb->tos; 802defc: 7a63 ldrb r3, [r4, #9] 802defe: 7243 strb r3, [r0, #9] ip_addr_copy(lpcb->local_ip, pcb->local_ip); 802df00: 6823 ldr r3, [r4, #0] 802df02: 6003 str r3, [r0, #0] if (pcb->local_port != 0) { 802df04: 8b63 ldrh r3, [r4, #26] 802df06: b1ab cbz r3, 802df34 TCP_RMV(&tcp_bound_pcbs, pcb); 802df08: 4a11 ldr r2, [pc, #68] ; (802df50 ) 802df0a: 6813 ldr r3, [r2, #0] 802df0c: 42a3 cmp r3, r4 802df0e: d101 bne.n 802df14 802df10: 68e3 ldr r3, [r4, #12] 802df12: e00c b.n 802df2e 802df14: 4a0f ldr r2, [pc, #60] ; (802df54 ) 802df16: 6013 str r3, [r2, #0] 802df18: e007 b.n 802df2a 802df1a: 68d9 ldr r1, [r3, #12] 802df1c: 42a1 cmp r1, r4 802df1e: d103 bne.n 802df28 802df20: 6013 str r3, [r2, #0] 802df22: 68e2 ldr r2, [r4, #12] 802df24: 60da str r2, [r3, #12] 802df26: e003 b.n 802df30 802df28: 460b mov r3, r1 802df2a: 2b00 cmp r3, #0 802df2c: d1f5 bne.n 802df1a 802df2e: 6013 str r3, [r2, #0] 802df30: 2300 movs r3, #0 802df32: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 802df34: 2002 movs r0, #2 802df36: 4621 mov r1, r4 802df38: f7ff fc92 bl 802d860 #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; 802df3c: 4b06 ldr r3, [pc, #24] ; (802df58 ) 802df3e: 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); 802df40: 4b06 ldr r3, [pc, #24] ; (802df5c ) 802df42: 681a ldr r2, [r3, #0] 802df44: 601d str r5, [r3, #0] 802df46: 60ea str r2, [r5, #12] 802df48: f002 f88e bl 8030068 return (struct tcp_pcb *)lpcb; 802df4c: 4628 mov r0, r5 } 802df4e: bd38 pop {r3, r4, r5, pc} 802df50: 2001108c .word 0x2001108c 802df54: 20011088 .word 0x20011088 802df58: 0802ddf5 .word 0x0802ddf5 802df5c: 20011084 .word 0x20011084 0802df60 : * * 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) { 802df60: 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))) { 802df62: 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; 802df64: 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))) { 802df66: 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; 802df68: 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) { 802df6a: 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))) { 802df6c: f640 3068 movw r0, #2920 ; 0xb68 802df70: 4285 cmp r5, r0 802df72: bf28 it cs 802df74: 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; 802df76: 1a60 subs r0, r4, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 802df78: 1880 adds r0, r0, r2 802df7a: 1b45 subs r5, r0, r5 802df7c: 2d00 cmp r5, #0 802df7e: db01 blt.n 802df84 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 802df80: 85dc strh r4, [r3, #46] ; 0x2e return new_right_edge - pcb->rcv_ann_right_edge; 802df82: bd30 pop {r4, r5, pc} } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 802df84: 1a50 subs r0, r2, r1 802df86: 2800 cmp r0, #0 802df88: f04f 0000 mov.w r0, #0 802df8c: dd01 ble.n 802df92 /* 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; 802df8e: 85d8 strh r0, [r3, #46] ; 0x2e 802df90: 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; 802df92: 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; 802df94: 85da strh r2, [r3, #46] ; 0x2e } return 0; } } 802df96: bd30 pop {r4, r5, pc} 0802df98 : 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; 802df98: 8d83 ldrh r3, [r0, #44] ; 0x2c 802df9a: 18c9 adds r1, r1, r3 802df9c: b289 uxth r1, r1 if (pcb->rcv_wnd > TCP_WND) { 802df9e: f241 63d0 movw r3, #5840 ; 0x16d0 802dfa2: 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) { 802dfa4: 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; 802dfa6: bf8c ite hi 802dfa8: 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; 802dfaa: 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) { 802dfac: 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); 802dfae: f7ff ffd7 bl 802df60 /* 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) { 802dfb2: f240 53b3 movw r3, #1459 ; 0x5b3 802dfb6: 4298 cmp r0, r3 802dfb8: dd08 ble.n 802dfcc tcp_ack_now(pcb); 802dfba: 7fa3 ldrb r3, [r4, #30] tcp_output(pcb); 802dfbc: 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); 802dfbe: f043 0302 orr.w r3, r3, #2 802dfc2: 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)); } 802dfc4: 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); 802dfc8: f001 bd90 b.w 802faec 802dfcc: bd10 pop {r4, pc} 0802dfce : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 802dfce: b510 push {r4, lr} if (seg != NULL) { 802dfd0: 4604 mov r4, r0 802dfd2: b148 cbz r0, 802dfe8 if (seg->p != NULL) { 802dfd4: 6840 ldr r0, [r0, #4] 802dfd6: b108 cbz r0, 802dfdc pbuf_free(seg->p); 802dfd8: f7ff fd4c bl 802da74 #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 802dfdc: 2004 movs r0, #4 802dfde: 4621 mov r1, r4 } } 802dfe0: 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); 802dfe4: f7ff bc3c b.w 802d860 802dfe8: bd10 pop {r4, pc} 0802dfea : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 802dfea: b510 push {r4, lr} while (seg != NULL) { 802dfec: e003 b.n 802dff6 struct tcp_seg *next = seg->next; 802dfee: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 802dff0: f7ff ffed bl 802dfce seg = next; 802dff4: 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) { 802dff6: 2800 cmp r0, #0 802dff8: d1f9 bne.n 802dfee struct tcp_seg *next = seg->next; tcp_seg_free(seg); seg = next; } } 802dffa: bd10 pop {r4, pc} 0802dffc : 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; 802dffc: 6101 str r1, [r0, #16] 802dffe: 4770 bx lr 0802e000 : */ 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; 802e000: 67c1 str r1, [r0, #124] ; 0x7c 802e002: 4770 bx lr 0802e004 : */ 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; 802e004: 6781 str r1, [r0, #120] ; 0x78 802e006: 4770 bx lr 0802e008 : */ 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; 802e008: f8c0 1088 str.w r1, [r0, #136] ; 0x88 802e00c: 4770 bx lr 0802e00e : 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; 802e00e: 6141 str r1, [r0, #20] 802e010: 4770 bx lr 0802e012 : 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; 802e012: f8c0 1084 str.w r1, [r0, #132] ; 0x84 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 802e016: f880 2020 strb.w r2, [r0, #32] 802e01a: 4770 bx lr 0802e01c : * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { if (pcb->state != CLOSED && 802e01c: 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) { 802e01e: b510 push {r4, lr} 802e020: 4604 mov r4, r0 if (pcb->state != CLOSED && 802e022: b1bb cbz r3, 802e054 802e024: 2b0a cmp r3, #10 802e026: d015 beq.n 802e054 pcb->state != TIME_WAIT && 802e028: 2b01 cmp r3, #1 802e02a: d013 beq.n 802e054 } } #endif /* TCP_LISTEN_BACKLOG */ if (pcb->refused_data != NULL) { 802e02c: 6f40 ldr r0, [r0, #116] ; 0x74 802e02e: b118 cbz r0, 802e038 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 802e030: f7ff fd20 bl 802da74 pcb->refused_data = NULL; 802e034: 2300 movs r3, #0 802e036: 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; 802e038: f64f 73ff movw r3, #65535 ; 0xffff 802e03c: 86a3 strh r3, [r4, #52] ; 0x34 tcp_segs_free(pcb->unsent); 802e03e: 6ee0 ldr r0, [r4, #108] ; 0x6c 802e040: f7ff ffd3 bl 802dfea tcp_segs_free(pcb->unacked); 802e044: 6f20 ldr r0, [r4, #112] ; 0x70 802e046: f7ff ffd0 bl 802dfea pcb->unacked = pcb->unsent = NULL; 802e04a: 2300 movs r3, #0 802e04c: 66e3 str r3, [r4, #108] ; 0x6c 802e04e: 6723 str r3, [r4, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 802e050: f8a4 306a strh.w r3, [r4, #106] ; 0x6a 802e054: bd10 pop {r4, pc} 802e056: 0000 movs r0, r0 0802e058 : u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 802e058: 4b9c ldr r3, [pc, #624] ; (802e2cc ) * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 802e05a: 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; 802e05e: 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; 802e060: f8df 8284 ldr.w r8, [pc, #644] ; 802e2e8 u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 802e064: 3201 adds r2, #1 802e066: 601a str r2, [r3, #0] ++tcp_timer_ctr; 802e068: 4b99 ldr r3, [pc, #612] ; (802e2d0 ) 802e06a: 781a ldrb r2, [r3, #0] 802e06c: 3201 adds r2, #1 802e06e: 701a strb r2, [r3, #0] 802e070: 46c1 mov r9, r8 tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 802e072: 4b98 ldr r3, [pc, #608] ; (802e2d4 ) 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) { 802e074: f8df a258 ldr.w sl, [pc, #600] ; 802e2d0 ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 802e078: 681c ldr r4, [r3, #0] ++tcp_ticks; ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 802e07a: 2600 movs r6, #0 pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 802e07c: e0ff b.n 802e27e 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) { 802e07e: f89a 3000 ldrb.w r3, [sl] 802e082: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 802e086: 429a cmp r2, r3 802e088: d101 bne.n 802e08e /* skip this pcb, we have already processed it */ pcb = pcb->next; 802e08a: 68e7 ldr r7, [r4, #12] continue; 802e08c: e0f6 b.n 802e27c pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 802e08e: 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; 802e090: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 802e094: 2902 cmp r1, #2 802e096: f894 2046 ldrb.w r2, [r4, #70] ; 0x46 802e09a: d101 bne.n 802e0a0 802e09c: 2a06 cmp r2, #6 802e09e: d051 beq.n 802e144 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); } else if (pcb->nrtx == TCP_MAXRTX) { 802e0a0: 2a0c cmp r2, #12 802e0a2: d04f beq.n 802e144 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 802e0a4: f894 3091 ldrb.w r3, [r4, #145] ; 0x91 802e0a8: b1c3 cbz r3, 802e0dc /* 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]) { 802e0aa: 498b ldr r1, [pc, #556] ; (802e2d8 ) 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++; 802e0ac: f894 2090 ldrb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802e0b0: 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++; 802e0b2: 3201 adds r2, #1 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802e0b4: 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++; 802e0b8: b2d2 uxtb r2, r2 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802e0ba: 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++; 802e0bc: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802e0c0: d900 bls.n 802e0c4 802e0c2: e03d b.n 802e140 pcb->persist_cnt = 0; 802e0c4: 2200 movs r2, #0 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 802e0c6: 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; 802e0c8: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 802e0cc: d802 bhi.n 802e0d4 pcb->persist_backoff++; 802e0ce: 3301 adds r3, #1 802e0d0: f884 3091 strb.w r3, [r4, #145] ; 0x91 } tcp_zero_window_probe(pcb); 802e0d4: 4620 mov r0, r4 802e0d6: f001 ff04 bl 802fee2 802e0da: e031 b.n 802e140 } } else { /* Increase the retransmission timer if it is running */ if(pcb->rtime >= 0) { 802e0dc: 8ea3 ldrh r3, [r4, #52] ; 0x34 802e0de: 0418 lsls r0, r3, #16 802e0e0: d401 bmi.n 802e0e6 ++pcb->rtime; 802e0e2: 3301 adds r3, #1 802e0e4: 86a3 strh r3, [r4, #52] ; 0x34 } if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { 802e0e6: 6f23 ldr r3, [r4, #112] ; 0x70 802e0e8: b353 cbz r3, 802e140 802e0ea: f9b4 0034 ldrsh.w r0, [r4, #52] ; 0x34 802e0ee: f9b4 3044 ldrsh.w r3, [r4, #68] ; 0x44 802e0f2: 4298 cmp r0, r3 802e0f4: db24 blt.n 802e140 " 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) { 802e0f6: 2902 cmp r1, #2 802e0f8: d00b beq.n 802e112 pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; 802e0fa: f9b4 1040 ldrsh.w r1, [r4, #64] ; 0x40 802e0fe: f9b4 3042 ldrsh.w r3, [r4, #66] ; 0x42 802e102: eb03 03e1 add.w r3, r3, r1, asr #3 802e106: 4975 ldr r1, [pc, #468] ; (802e2dc ) 802e108: 5c8a ldrb r2, [r1, r2] 802e10a: fa03 f302 lsl.w r3, r3, r2 802e10e: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 } /* Reset the retransmission timer. */ pcb->rtime = 0; 802e112: 2300 movs r3, #0 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 802e114: 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; 802e118: 86a3 strh r3, [r4, #52] ; 0x34 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 802e11a: f8b4 3060 ldrh.w r3, [r4, #96] ; 0x60 pcb->ssthresh = eff_wnd >> 1; 802e11e: 4299 cmp r1, r3 802e120: bf28 it cs 802e122: 4619 movcs r1, r3 if (pcb->ssthresh < (pcb->mss << 1)) { 802e124: 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; 802e126: 0849 lsrs r1, r1, #1 if (pcb->ssthresh < (pcb->mss << 1)) { 802e128: 005a lsls r2, r3, #1 802e12a: 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; 802e12c: f8a4 104e strh.w r1, [r4, #78] ; 0x4e if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); } pcb->cwnd = pcb->mss; 802e130: 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); 802e134: bfb8 it lt 802e136: 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); 802e13a: 4620 mov r0, r4 802e13c: f001 fe40 bl 802fdc0 pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; 802e140: 2500 movs r5, #0 802e142: e000 b.n 802e146 pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { ++pcb_remove; 802e144: 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) { 802e146: 7e23 ldrb r3, [r4, #24] 802e148: 2b06 cmp r3, #6 802e14a: d10c bne.n 802e166 /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 802e14c: 7fa2 ldrb r2, [r4, #30] 802e14e: f002 0210 and.w r2, r2, #16 802e152: b2d2 uxtb r2, r2 802e154: b13a cbz r2, 802e166 /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 802e156: 4a5d ldr r2, [pc, #372] ; (802e2cc ) 802e158: 6811 ldr r1, [r2, #0] 802e15a: 6a62 ldr r2, [r4, #36] ; 0x24 802e15c: 1a8a subs r2, r1, r2 802e15e: 2a28 cmp r2, #40 ; 0x28 802e160: d901 bls.n 802e166 TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 802e162: 3501 adds r5, #1 802e164: b2ed uxtb r5, r5 } } } /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && 802e166: 7a27 ldrb r7, [r4, #8] 802e168: f007 0708 and.w r7, r7, #8 802e16c: b2ff uxtb r7, r7 802e16e: b34f cbz r7, 802e1c4 802e170: 2b04 cmp r3, #4 802e172: d001 beq.n 802e178 ((pcb->state == ESTABLISHED) || 802e174: 2b07 cmp r3, #7 802e176: d124 bne.n 802e1c2 (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 802e178: 4b54 ldr r3, [pc, #336] ; (802e2cc ) (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 802e17a: 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) > 802e17e: 681a ldr r2, [r3, #0] 802e180: 6a63 ldr r3, [r4, #36] ; 0x24 802e182: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 802e184: f500 2324 add.w r3, r0, #671744 ; 0xa4000 802e188: f603 43b8 addw r3, r3, #3256 ; 0xcb8 802e18c: f44f 71fa mov.w r1, #500 ; 0x1f4 802e190: 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) > 802e194: 429a cmp r2, r3 802e196: d903 bls.n 802e1a0 { 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; 802e198: 3501 adds r5, #1 802e19a: b2ed uxtb r5, r5 ++pcb_reset; 802e19c: 2701 movs r7, #1 802e19e: e011 b.n 802e1c4 } else if((u32_t)(tcp_ticks - pcb->tmr) > (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 802e1a0: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 802e1a4: 4f4e ldr r7, [pc, #312] ; (802e2e0 ) 802e1a6: fb07 0003 mla r0, r7, r3, r0 / TCP_SLOW_INTERVAL) 802e1aa: 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) > 802e1ae: 428a cmp r2, r1 802e1b0: d907 bls.n 802e1c2 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) / TCP_SLOW_INTERVAL) { tcp_keepalive(pcb); 802e1b2: 4620 mov r0, r4 802e1b4: f001 fe76 bl 802fea4 pcb->keep_cnt_sent++; 802e1b8: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 802e1bc: 3301 adds r3, #1 802e1be: f884 3092 strb.w r3, [r4, #146] ; 0x92 continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; 802e1c2: 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) { 802e1c4: 7e23 ldrb r3, [r4, #24] 802e1c6: 2b03 cmp r3, #3 802e1c8: d108 bne.n 802e1dc if ((u32_t)(tcp_ticks - pcb->tmr) > 802e1ca: 4b40 ldr r3, [pc, #256] ; (802e2cc ) 802e1cc: 681a ldr r2, [r3, #0] 802e1ce: 6a63 ldr r3, [r4, #36] ; 0x24 802e1d0: 1ad3 subs r3, r2, r3 802e1d2: 2b28 cmp r3, #40 ; 0x28 802e1d4: d90a bls.n 802e1ec TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 802e1d6: 3501 adds r5, #1 802e1d8: b2ed uxtb r5, r5 802e1da: e007 b.n 802e1ec 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) { 802e1dc: 2b09 cmp r3, #9 802e1de: d105 bne.n 802e1ec if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 802e1e0: 4b3a ldr r3, [pc, #232] ; (802e2cc ) 802e1e2: 681a ldr r2, [r3, #0] 802e1e4: 6a63 ldr r3, [r4, #36] ; 0x24 802e1e6: 1ad3 subs r3, r2, r3 802e1e8: 2bf0 cmp r3, #240 ; 0xf0 802e1ea: d800 bhi.n 802e1ee LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); } } /* If the PCB should be removed, do it. */ if (pcb_remove) { 802e1ec: b345 cbz r5, 802e240 struct tcp_pcb *pcb2; tcp_err_fn err_fn; void *err_arg; tcp_pcb_purge(pcb); 802e1ee: 4620 mov r0, r4 802e1f0: f7ff ff14 bl 802e01c 802e1f4: 68e3 ldr r3, [r4, #12] /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 802e1f6: b10e cbz r6, 802e1fc LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); prev->next = pcb->next; 802e1f8: 60f3 str r3, [r6, #12] 802e1fa: e001 b.n 802e200 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); tcp_active_pcbs = pcb->next; 802e1fc: 4a35 ldr r2, [pc, #212] ; (802e2d4 ) 802e1fe: 6013 str r3, [r2, #0] } if (pcb_reset) { 802e200: b14f cbz r7, 802e216 tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 802e202: 8b63 ldrh r3, [r4, #26] 802e204: 9300 str r3, [sp, #0] 802e206: 8ba3 ldrh r3, [r4, #28] 802e208: 9301 str r3, [sp, #4] 802e20a: 6d20 ldr r0, [r4, #80] ; 0x50 802e20c: 6aa1 ldr r1, [r4, #40] ; 0x28 802e20e: 4622 mov r2, r4 802e210: 1d23 adds r3, r4, #4 802e212: f001 fd8f bl 802fd34 pcb->local_port, pcb->remote_port); } err_fn = pcb->errf; 802e216: f8d4 5088 ldr.w r5, [r4, #136] ; 0x88 err_arg = pcb->callback_arg; 802e21a: f8d4 b010 ldr.w fp, [r4, #16] pcb2 = pcb; pcb = pcb->next; 802e21e: 68e7 ldr r7, [r4, #12] memp_free(MEMP_TCP_PCB, pcb2); 802e220: 2002 movs r0, #2 802e222: 4621 mov r1, r4 802e224: f7ff fb1c bl 802d860 tcp_active_pcbs_changed = 0; 802e228: 2300 movs r3, #0 802e22a: f888 3000 strb.w r3, [r8] TCP_EVENT_ERR(err_fn, err_arg, ERR_ABRT); 802e22e: b11d cbz r5, 802e238 802e230: 4658 mov r0, fp 802e232: f06f 0109 mvn.w r1, #9 802e236: 47a8 blx r5 if (tcp_active_pcbs_changed) { 802e238: f899 3000 ldrb.w r3, [r9] 802e23c: b1f3 cbz r3, 802e27c 802e23e: e718 b.n 802e072 /* 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; 802e240: 7fe3 ldrb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 802e242: 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; 802e246: 68e7 ldr r7, [r4, #12] /* We check if we should poll the connection. */ ++prev->polltmr; 802e248: 3301 adds r3, #1 802e24a: b2db uxtb r3, r3 if (prev->polltmr >= prev->pollinterval) { 802e24c: 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; 802e24e: 77e3 strb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 802e250: d813 bhi.n 802e27a prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); 802e252: 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; 802e256: 77e5 strb r5, [r4, #31] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 802e258: f888 5000 strb.w r5, [r8] TCP_EVENT_POLL(prev, err); 802e25c: b11b cbz r3, 802e266 802e25e: 6920 ldr r0, [r4, #16] 802e260: 4621 mov r1, r4 802e262: 4798 blx r3 802e264: e000 b.n 802e268 802e266: 4628 mov r0, r5 if (tcp_active_pcbs_changed) { 802e268: f899 3000 ldrb.w r3, [r9] 802e26c: 2b00 cmp r3, #0 802e26e: f47f af00 bne.w 802e072 goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 802e272: b910 cbnz r0, 802e27a tcp_output(prev); 802e274: 4620 mov r0, r4 802e276: f001 fc39 bl 802faec 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) { 802e27a: 4626 mov r6, r4 prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { 802e27c: 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) { 802e27e: 2c00 cmp r4, #0 802e280: f47f aefd bne.w 802e07e } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 802e284: 4b17 ldr r3, [pc, #92] ; (802e2e4 ) 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) { 802e286: 4e11 ldr r6, [pc, #68] ; (802e2cc ) } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 802e288: 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; 802e28a: 461f mov r7, r3 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 802e28c: e00f b.n 802e2ae 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) { 802e28e: 6832 ldr r2, [r6, #0] 802e290: 6a6b ldr r3, [r5, #36] ; 0x24 802e292: 1ad3 subs r3, r2, r3 802e294: 2bf0 cmp r3, #240 ; 0xf0 802e296: d810 bhi.n 802e2ba 802e298: e00c b.n 802e2b4 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; 802e29a: 60e2 str r2, [r4, #12] 802e29c: e000 b.n 802e2a0 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 802e29e: 603a str r2, [r7, #0] } pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); 802e2a0: 4629 mov r1, r5 802e2a2: 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; 802e2a4: f8d5 800c ldr.w r8, [r5, #12] memp_free(MEMP_TCP_PCB, pcb2); 802e2a8: f7ff fada bl 802d860 /* 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; 802e2ac: 4645 mov r5, r8 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 802e2ae: 2d00 cmp r5, #0 802e2b0: d1ed bne.n 802e28e 802e2b2: e009 b.n 802e2c8 pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); } else { prev = pcb; pcb = pcb->next; 802e2b4: 462c mov r4, r5 802e2b6: 68ed ldr r5, [r5, #12] 802e2b8: e7f9 b.n 802e2ae /* If the PCB should be removed, do it. */ if (pcb_remove) { struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 802e2ba: 4628 mov r0, r5 802e2bc: f7ff feae bl 802e01c 802e2c0: 68ea ldr r2, [r5, #12] /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 802e2c2: 2c00 cmp r4, #0 802e2c4: d1e9 bne.n 802e29a 802e2c6: e7ea b.n 802e29e } else { prev = pcb; pcb = pcb->next; } } } 802e2c8: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802e2cc: 20011080 .word 0x20011080 802e2d0: 2000e18d .word 0x2000e18d 802e2d4: 2001107c .word 0x2001107c 802e2d8: 080413a9 .word 0x080413a9 802e2dc: 0804139c .word 0x0804139c 802e2e0: 000124f8 .word 0x000124f8 802e2e4: 20011090 .word 0x20011090 802e2e8: 20011078 .word 0x20011078 0802e2ec : * @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); 802e2ec: 6803 ldr r3, [r0, #0] 802e2ee: 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) { 802e2f0: b510 push {r4, lr} 802e2f2: 460c mov r4, r1 TCP_RMV(pcblist, pcb); 802e2f4: d102 bne.n 802e2fc 802e2f6: 68cb ldr r3, [r1, #12] 802e2f8: 6003 str r3, [r0, #0] 802e2fa: e00d b.n 802e318 802e2fc: 4a11 ldr r2, [pc, #68] ; (802e344 ) 802e2fe: 6013 str r3, [r2, #0] 802e300: e007 b.n 802e312 802e302: 68d9 ldr r1, [r3, #12] 802e304: 42a1 cmp r1, r4 802e306: d103 bne.n 802e310 802e308: 6013 str r3, [r2, #0] 802e30a: 68e2 ldr r2, [r4, #12] 802e30c: 60da str r2, [r3, #12] 802e30e: e003 b.n 802e318 802e310: 460b mov r3, r1 802e312: 2b00 cmp r3, #0 802e314: d1f5 bne.n 802e302 802e316: 6013 str r3, [r2, #0] 802e318: 2300 movs r3, #0 802e31a: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 802e31c: 4620 mov r0, r4 802e31e: f7ff fe7d bl 802e01c /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && 802e322: 7e23 ldrb r3, [r4, #24] 802e324: 2b0a cmp r3, #10 802e326: d00a beq.n 802e33e 802e328: 2b01 cmp r3, #1 802e32a: d008 beq.n 802e33e pcb->state != LISTEN && pcb->flags & TF_ACK_DELAY) { 802e32c: 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 && 802e32e: 07da lsls r2, r3, #31 802e330: d505 bpl.n 802e33e pcb->flags & TF_ACK_DELAY) { pcb->flags |= TF_ACK_NOW; 802e332: f043 0302 orr.w r3, r3, #2 802e336: 77a3 strb r3, [r4, #30] tcp_output(pcb); 802e338: 4620 mov r0, r4 802e33a: f001 fbd7 bl 802faec #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 802e33e: 2300 movs r3, #0 802e340: 7623 strb r3, [r4, #24] 802e342: bd10 pop {r4, pc} 802e344: 20011088 .word 0x20011088 0802e348 : 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) { 802e348: 7e03 ldrb r3, [r0, #24] 802e34a: 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) { 802e34c: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 802e350: 4604 mov r4, r0 802e352: 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) { 802e354: d10a bne.n 802e36c tcp_pcb_remove(&tcp_tw_pcbs, pcb); 802e356: 4621 mov r1, r4 802e358: 481b ldr r0, [pc, #108] ; (802e3c8 ) 802e35a: f7ff ffc7 bl 802e2ec memp_free(MEMP_TCP_PCB, pcb); 802e35e: 2002 movs r0, #2 802e360: 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); } } 802e362: b003 add sp, #12 802e364: 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); 802e368: f7ff ba7a b.w 802d860 } else { seqno = pcb->snd_nxt; 802e36c: f8d0 8050 ldr.w r8, [r0, #80] ; 0x50 ackno = pcb->rcv_nxt; 802e370: 6a87 ldr r7, [r0, #40] ; 0x28 #if LWIP_CALLBACK_API errf = pcb->errf; 802e372: f8d0 5088 ldr.w r5, [r0, #136] ; 0x88 #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 802e376: 6906 ldr r6, [r0, #16] TCP_PCB_REMOVE_ACTIVE(pcb); 802e378: 4814 ldr r0, [pc, #80] ; (802e3cc ) 802e37a: 4621 mov r1, r4 802e37c: f7ff ffb6 bl 802e2ec 802e380: 4b13 ldr r3, [pc, #76] ; (802e3d0 ) if (pcb->unacked != NULL) { 802e382: 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); 802e384: 2201 movs r2, #1 802e386: 701a strb r2, [r3, #0] if (pcb->unacked != NULL) { 802e388: b108 cbz r0, 802e38e tcp_segs_free(pcb->unacked); 802e38a: f7ff fe2e bl 802dfea } if (pcb->unsent != NULL) { 802e38e: 6ee0 ldr r0, [r4, #108] ; 0x6c 802e390: b108 cbz r0, 802e396 tcp_segs_free(pcb->unsent); 802e392: f7ff fe2a bl 802dfea #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { tcp_segs_free(pcb->ooseq); } #endif /* TCP_QUEUE_OOSEQ */ if (reset) { 802e396: f1b9 0f00 cmp.w r9, #0 802e39a: d009 beq.n 802e3b0 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); 802e39c: 8b63 ldrh r3, [r4, #26] 802e39e: 9300 str r3, [sp, #0] 802e3a0: 8ba3 ldrh r3, [r4, #28] 802e3a2: 4640 mov r0, r8 802e3a4: 9301 str r3, [sp, #4] 802e3a6: 4639 mov r1, r7 802e3a8: 4622 mov r2, r4 802e3aa: 1d23 adds r3, r4, #4 802e3ac: f001 fcc2 bl 802fd34 } memp_free(MEMP_TCP_PCB, pcb); 802e3b0: 2002 movs r0, #2 802e3b2: 4621 mov r1, r4 802e3b4: f7ff fa54 bl 802d860 TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); 802e3b8: b11d cbz r5, 802e3c2 802e3ba: 4630 mov r0, r6 802e3bc: f06f 0109 mvn.w r1, #9 802e3c0: 47a8 blx r5 } } 802e3c2: b003 add sp, #12 802e3c4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802e3c8: 20011090 .word 0x20011090 802e3cc: 2001107c .word 0x2001107c 802e3d0: 20011078 .word 0x20011078 0802e3d4 : * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { tcp_abandon(pcb, 1); 802e3d4: 2101 movs r1, #1 802e3d6: f7ff bfb7 b.w 802e348 802e3da: 0000 movs r0, r0 0802e3dc : * @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) { 802e3dc: b537 push {r0, r1, r2, r4, r5, lr} 802e3de: 4604 mov r4, r0 err_t err; if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 802e3e0: 2900 cmp r1, #0 802e3e2: d043 beq.n 802e46c 802e3e4: 7e03 ldrb r3, [r0, #24] 802e3e6: 2b04 cmp r3, #4 802e3e8: d001 beq.n 802e3ee 802e3ea: 2b07 cmp r3, #7 802e3ec: d13e bne.n 802e46c if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) { 802e3ee: 6f63 ldr r3, [r4, #116] ; 0x74 802e3f0: b923 cbnz r3, 802e3fc 802e3f2: 8da2 ldrh r2, [r4, #44] ; 0x2c 802e3f4: f241 63d0 movw r3, #5840 ; 0x16d0 802e3f8: 429a cmp r2, r3 802e3fa: d037 beq.n 802e46c 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, 802e3fc: 8b63 ldrh r3, [r4, #26] 802e3fe: 6d20 ldr r0, [r4, #80] ; 0x50 802e400: 9300 str r3, [sp, #0] 802e402: 8ba3 ldrh r3, [r4, #28] 802e404: 6aa1 ldr r1, [r4, #40] ; 0x28 802e406: 9301 str r3, [sp, #4] 802e408: 4622 mov r2, r4 802e40a: 1d23 adds r3, r4, #4 802e40c: f001 fc92 bl 802fd34 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 802e410: 4620 mov r0, r4 802e412: f7ff fe03 bl 802e01c TCP_RMV_ACTIVE(pcb); 802e416: 4a42 ldr r2, [pc, #264] ; (802e520 ) 802e418: 6813 ldr r3, [r2, #0] 802e41a: 42a3 cmp r3, r4 802e41c: d101 bne.n 802e422 802e41e: 68e3 ldr r3, [r4, #12] 802e420: e00c b.n 802e43c 802e422: 4a40 ldr r2, [pc, #256] ; (802e524 ) 802e424: 6013 str r3, [r2, #0] 802e426: e007 b.n 802e438 802e428: 68d9 ldr r1, [r3, #12] 802e42a: 42a1 cmp r1, r4 802e42c: d103 bne.n 802e436 802e42e: 6013 str r3, [r2, #0] 802e430: 68e2 ldr r2, [r4, #12] 802e432: 60da str r2, [r3, #12] 802e434: e003 b.n 802e43e 802e436: 460b mov r3, r1 802e438: 2b00 cmp r3, #0 802e43a: d1f5 bne.n 802e428 802e43c: 6013 str r3, [r2, #0] 802e43e: 4b3a ldr r3, [pc, #232] ; (802e528 ) 802e440: 2201 movs r2, #1 802e442: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { 802e444: 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); 802e446: 2500 movs r5, #0 if (pcb->state == ESTABLISHED) { 802e448: 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); 802e44a: 60e5 str r5, [r4, #12] if (pcb->state == ESTABLISHED) { 802e44c: d108 bne.n 802e460 /* move to TIME_WAIT since we close actively */ pcb->state = TIME_WAIT; 802e44e: 230a movs r3, #10 802e450: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 802e452: 4b36 ldr r3, [pc, #216] ; (802e52c ) 802e454: 681a ldr r2, [r3, #0] 802e456: 601c str r4, [r3, #0] 802e458: 60e2 str r2, [r4, #12] 802e45a: f001 fe05 bl 8030068 802e45e: e003 b.n 802e468 } else { /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ memp_free(MEMP_TCP_PCB, pcb); 802e460: 2002 movs r0, #2 802e462: 4621 mov r1, r4 802e464: f7ff f9fc bl 802d860 } return ERR_OK; 802e468: 4628 mov r0, r5 802e46a: e051 b.n 802e510 } } switch (pcb->state) { 802e46c: 7e23 ldrb r3, [r4, #24] 802e46e: 2b07 cmp r3, #7 802e470: d853 bhi.n 802e51a 802e472: e8df f003 tbb [pc, r3] 802e476: 1e04 .short 0x1e04 802e478: 523c3527 .word 0x523c3527 802e47c: 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) { 802e47e: 8b63 ldrh r3, [r4, #26] 802e480: b1ab cbz r3, 802e4ae TCP_RMV(&tcp_bound_pcbs, pcb); 802e482: 4a2b ldr r2, [pc, #172] ; (802e530 ) 802e484: 6813 ldr r3, [r2, #0] 802e486: 42a3 cmp r3, r4 802e488: d101 bne.n 802e48e 802e48a: 68e3 ldr r3, [r4, #12] 802e48c: e00c b.n 802e4a8 802e48e: 4a25 ldr r2, [pc, #148] ; (802e524 ) 802e490: 6013 str r3, [r2, #0] 802e492: e007 b.n 802e4a4 802e494: 68d9 ldr r1, [r3, #12] 802e496: 42a1 cmp r1, r4 802e498: d103 bne.n 802e4a2 802e49a: 6013 str r3, [r2, #0] 802e49c: 68e2 ldr r2, [r4, #12] 802e49e: 60da str r2, [r3, #12] 802e4a0: e003 b.n 802e4aa 802e4a2: 460b mov r3, r1 802e4a4: 2b00 cmp r3, #0 802e4a6: d1f5 bne.n 802e494 802e4a8: 6013 str r3, [r2, #0] 802e4aa: 2300 movs r3, #0 802e4ac: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 802e4ae: 2002 movs r0, #2 802e4b0: e004 b.n 802e4bc pcb = NULL; break; case LISTEN: err = ERR_OK; tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 802e4b2: 4820 ldr r0, [pc, #128] ; (802e534 ) 802e4b4: 4621 mov r1, r4 802e4b6: f7ff ff19 bl 802e2ec memp_free(MEMP_TCP_PCB_LISTEN, pcb); 802e4ba: 2003 movs r0, #3 802e4bc: 4621 mov r1, r4 802e4be: f7ff f9cf bl 802d860 pcb = NULL; break; 802e4c2: e02a b.n 802e51a case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 802e4c4: 4621 mov r1, r4 802e4c6: 4816 ldr r0, [pc, #88] ; (802e520 ) 802e4c8: f7ff ff10 bl 802e2ec 802e4cc: 4b16 ldr r3, [pc, #88] ; (802e528 ) 802e4ce: 2201 movs r2, #1 memp_free(MEMP_TCP_PCB, pcb); 802e4d0: 2002 movs r0, #2 802e4d2: 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); 802e4d4: 701a strb r2, [r3, #0] memp_free(MEMP_TCP_PCB, pcb); 802e4d6: f7ff f9c3 bl 802d860 pcb = NULL; snmp_inc_tcpattemptfails(); 802e4da: f004 f8af bl 803263c break; 802e4de: e01c b.n 802e51a case SYN_RCVD: err = tcp_send_fin(pcb); 802e4e0: 4620 mov r0, r4 802e4e2: f001 fabe bl 802fa62 if (err == ERR_OK) { 802e4e6: b998 cbnz r0, 802e510 snmp_inc_tcpattemptfails(); 802e4e8: f004 f8a8 bl 803263c 802e4ec: e005 b.n 802e4fa pcb->state = FIN_WAIT_1; } break; case ESTABLISHED: err = tcp_send_fin(pcb); 802e4ee: 4620 mov r0, r4 802e4f0: f001 fab7 bl 802fa62 if (err == ERR_OK) { 802e4f4: b960 cbnz r0, 802e510 snmp_inc_tcpestabresets(); 802e4f6: f004 f8a9 bl 803264c pcb->state = FIN_WAIT_1; 802e4fa: 2305 movs r3, #5 802e4fc: e006 b.n 802e50c } break; case CLOSE_WAIT: err = tcp_send_fin(pcb); 802e4fe: 4620 mov r0, r4 802e500: f001 faaf bl 802fa62 if (err == ERR_OK) { 802e504: b920 cbnz r0, 802e510 snmp_inc_tcpestabresets(); 802e506: f004 f8a1 bl 803264c pcb->state = LAST_ACK; 802e50a: 2309 movs r3, #9 802e50c: 7623 strb r3, [r4, #24] 802e50e: e001 b.n 802e514 802e510: b240 sxtb r0, r0 802e512: e004 b.n 802e51e 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); 802e514: 4620 mov r0, r4 802e516: f001 fae9 bl 802faec 802e51a: 2000 movs r0, #0 802e51c: e7f8 b.n 802e510 } return err; } 802e51e: bd3e pop {r1, r2, r3, r4, r5, pc} 802e520: 2001107c .word 0x2001107c 802e524: 20011088 .word 0x20011088 802e528: 20011078 .word 0x20011078 802e52c: 20011090 .word 0x20011090 802e530: 2001108c .word 0x2001108c 802e534: 20011084 .word 0x20011084 0802e538 : #if TCP_DEBUG LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ if (pcb->state != LISTEN) { 802e538: 7e03 ldrb r3, [r0, #24] 802e53a: 2b01 cmp r3, #1 802e53c: d003 beq.n 802e546 /* Set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 802e53e: 7f83 ldrb r3, [r0, #30] 802e540: f043 0310 orr.w r3, r3, #16 802e544: 7783 strb r3, [r0, #30] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 802e546: 2101 movs r1, #1 802e548: f7ff bf48 b.w 802e3dc 0802e54c : * 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) { 802e54c: b510 push {r4, lr} 802e54e: 4608 mov r0, r1 LWIP_UNUSED_ARG(arg); if (p != NULL) { 802e550: 4614 mov r4, r2 802e552: b132 cbz r2, 802e562 tcp_recved(pcb, p->tot_len); 802e554: 8911 ldrh r1, [r2, #8] 802e556: f7ff fd1f bl 802df98 pbuf_free(p); 802e55a: 4620 mov r0, r4 802e55c: f7ff fa8a bl 802da74 802e560: e004 b.n 802e56c } else if (err == ERR_OK) { 802e562: b91b cbnz r3, 802e56c return tcp_close(pcb); } return ERR_OK; } 802e564: 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); 802e568: f7ff bfe6 b.w 802e538 } return ERR_OK; } 802e56c: 2000 movs r0, #0 802e56e: bd10 pop {r4, pc} 0802e570 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 802e570: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; u8_t refused_flags = pcb->refused_data->flags; 802e572: 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); 802e574: 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; 802e576: 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; 802e578: 2300 movs r3, #0 } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 802e57a: 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; 802e57c: 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); 802e57e: b126 cbz r6, 802e58a 802e580: 4621 mov r1, r4 802e582: 462a mov r2, r5 802e584: 6900 ldr r0, [r0, #16] 802e586: 47b0 blx r6 802e588: e005 b.n 802e596 802e58a: 4630 mov r0, r6 802e58c: 4621 mov r1, r4 802e58e: 462a mov r2, r5 802e590: 4633 mov r3, r6 802e592: f7ff ffdb bl 802e54c if (err == ERR_OK) { 802e596: b9b0 cbnz r0, 802e5c6 /* did refused_data include a FIN? */ if (refused_flags & PBUF_FLAG_TCP_FIN) { 802e598: f007 0720 and.w r7, r7, #32 802e59c: b2ff uxtb r7, r7 802e59e: b1bf cbz r7, 802e5d0 /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 802e5a0: 8da3 ldrh r3, [r4, #44] ; 0x2c 802e5a2: f241 62d0 movw r2, #5840 ; 0x16d0 802e5a6: 4293 cmp r3, r2 802e5a8: d001 beq.n 802e5ae pcb->rcv_wnd++; 802e5aa: 3301 adds r3, #1 802e5ac: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 802e5ae: 6fe5 ldr r5, [r4, #124] ; 0x7c 802e5b0: b905 cbnz r5, 802e5b4 802e5b2: e00c b.n 802e5ce 802e5b4: 2200 movs r2, #0 802e5b6: 6920 ldr r0, [r4, #16] 802e5b8: 4621 mov r1, r4 802e5ba: 4613 mov r3, r2 802e5bc: 47a8 blx r5 if (err == ERR_ABRT) { 802e5be: 300a adds r0, #10 802e5c0: d105 bne.n 802e5ce return ERR_ABRT; 802e5c2: 20f6 movs r0, #246 ; 0xf6 802e5c4: e004 b.n 802e5d0 } } } else if (err == ERR_ABRT) { 802e5c6: b240 sxtb r0, r0 802e5c8: 300a adds r0, #10 802e5ca: d0fa beq.n 802e5c2 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; 802e5cc: 6765 str r5, [r4, #116] ; 0x74 } return ERR_OK; 802e5ce: 2000 movs r0, #0 } 802e5d0: b240 sxtb r0, r0 802e5d2: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802e5d4 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 802e5d4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct tcp_pcb *pcb; ++tcp_timer_ctr; 802e5d8: 4b18 ldr r3, [pc, #96] ; (802e63c ) tcp_fasttmr_start: pcb = tcp_active_pcbs; 802e5da: 4f19 ldr r7, [pc, #100] ; (802e640 ) void tcp_fasttmr(void) { struct tcp_pcb *pcb; ++tcp_timer_ctr; 802e5dc: 781a ldrb r2, [r3, #0] 802e5de: 3201 adds r2, #1 802e5e0: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { if (pcb->last_timer != tcp_timer_ctr) { 802e5e2: 4698 mov r8, r3 struct tcp_pcb *pcb; ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; 802e5e4: 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; 802e5e6: 4d17 ldr r5, [pc, #92] ; (802e644 ) 802e5e8: 2600 movs r6, #0 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 802e5ea: e022 b.n 802e632 if (pcb->last_timer != tcp_timer_ctr) { 802e5ec: f898 2000 ldrb.w r2, [r8] 802e5f0: f894 3021 ldrb.w r3, [r4, #33] ; 0x21 802e5f4: 4293 cmp r3, r2 802e5f6: d020 beq.n 802e63a struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 802e5f8: f884 2021 strb.w r2, [r4, #33] ; 0x21 /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 802e5fc: 7fa2 ldrb r2, [r4, #30] 802e5fe: 07d1 lsls r1, r2, #31 802e600: d509 bpl.n 802e616 LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 802e602: f042 0202 orr.w r2, r2, #2 802e606: 77a2 strb r2, [r4, #30] tcp_output(pcb); 802e608: 4620 mov r0, r4 802e60a: f001 fa6f bl 802faec pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 802e60e: 7fa3 ldrb r3, [r4, #30] 802e610: f023 0303 bic.w r3, r3, #3 802e614: 77a3 strb r3, [r4, #30] } next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 802e616: 6f63 ldr r3, [r4, #116] ; 0x74 tcp_ack_now(pcb); tcp_output(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } next = pcb->next; 802e618: f8d4 900c ldr.w r9, [r4, #12] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 802e61c: b90b cbnz r3, 802e622 802e61e: 464c mov r4, r9 802e620: e007 b.n 802e632 tcp_active_pcbs_changed = 0; tcp_process_refused_data(pcb); 802e622: 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; 802e624: 702e strb r6, [r5, #0] tcp_process_refused_data(pcb); 802e626: f7ff ffa3 bl 802e570 if (tcp_active_pcbs_changed) { 802e62a: 782b ldrb r3, [r5, #0] 802e62c: 2b00 cmp r3, #0 802e62e: d1d9 bne.n 802e5e4 802e630: e7f5 b.n 802e61e ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 802e632: 2c00 cmp r4, #0 802e634: d1da bne.n 802e5ec 802e636: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802e63a: e7fe b.n 802e63a 802e63c: 2000e18d .word 0x2000e18d 802e640: 2001107c .word 0x2001107c 802e644: 20011078 .word 0x20011078 0802e648 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 802e648: b508 push {r3, lr} /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 802e64a: f7ff ffc3 bl 802e5d4 if (++tcp_timer & 1) { 802e64e: 4a06 ldr r2, [pc, #24] ; (802e668 ) 802e650: 7813 ldrb r3, [r2, #0] 802e652: 3301 adds r3, #1 802e654: b2db uxtb r3, r3 802e656: 07d8 lsls r0, r3, #31 802e658: 7013 strb r3, [r2, #0] 802e65a: d503 bpl.n 802e664 /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); } } 802e65c: 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(); 802e660: f7ff bcfa b.w 802e058 802e664: bd08 pop {r3, pc} 802e666: bf00 nop 802e668: 2000e18c .word 0x2000e18c 0802e66c : u32_t tcp_next_iss(void) { static u32_t iss = 6510; iss += tcp_ticks; /* XXX */ 802e66c: 4b03 ldr r3, [pc, #12] ; (802e67c ) 802e66e: 4a04 ldr r2, [pc, #16] ; (802e680 ) 802e670: 6810 ldr r0, [r2, #0] 802e672: 681a ldr r2, [r3, #0] 802e674: 1880 adds r0, r0, r2 802e676: 6018 str r0, [r3, #0] return iss; } 802e678: 4770 bx lr 802e67a: bf00 nop 802e67c: 200015ec .word 0x200015ec 802e680: 20011080 .word 0x20011080 0802e684 : * @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) { 802e684: b5f8 push {r3, r4, r5, r6, r7, lr} 802e686: 4605 mov r5, r0 struct tcp_pcb *pcb; u32_t iss; pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 802e688: 2002 movs r0, #2 802e68a: f7ff f8d3 bl 802d834 if (pcb == NULL) { 802e68e: 4604 mov r4, r0 802e690: 2800 cmp r0, #0 802e692: d136 bne.n 802e702 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) { 802e694: 4b39 ldr r3, [pc, #228] ; (802e77c ) if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 802e696: 4a3a ldr r2, [pc, #232] ; (802e780 ) 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) { 802e698: 681b ldr r3, [r3, #0] if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 802e69a: 6811 ldr r1, [r2, #0] 802e69c: e007 b.n 802e6ae 802e69e: 6a5a ldr r2, [r3, #36] ; 0x24 802e6a0: 1a8a subs r2, r1, r2 802e6a2: 42a2 cmp r2, r4 802e6a4: bf34 ite cc 802e6a6: 4622 movcc r2, r4 802e6a8: 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) { 802e6aa: 68db ldr r3, [r3, #12] 802e6ac: 4614 mov r4, r2 802e6ae: 2b00 cmp r3, #0 802e6b0: d1f5 bne.n 802e69e if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { inactivity = tcp_ticks - pcb->tmr; inactive = pcb; } } if (inactive != NULL) { 802e6b2: b108 cbz r0, 802e6b8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 802e6b4: f7ff fe8e bl 802e3d4 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); 802e6b8: 2002 movs r0, #2 802e6ba: f7ff f8bb bl 802d834 if (pcb == NULL) { 802e6be: 4604 mov r4, r0 802e6c0: b9f8 cbnz r0, 802e702 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) { 802e6c2: 4a2f ldr r2, [pc, #188] ; (802e780 ) 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) { 802e6c4: 4b2f ldr r3, [pc, #188] ; (802e784 ) if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 802e6c6: 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) { 802e6c8: 681b ldr r3, [r3, #0] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = TCP_PRIO_MAX; 802e6ca: 207f movs r0, #127 ; 0x7f /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; 802e6cc: 4622 mov r2, r4 802e6ce: e00c b.n 802e6ea for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && 802e6d0: 7e59 ldrb r1, [r3, #25] 802e6d2: 42a9 cmp r1, r5 802e6d4: d808 bhi.n 802e6e8 802e6d6: 4281 cmp r1, r0 802e6d8: d806 bhi.n 802e6e8 pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 802e6da: 6a5e ldr r6, [r3, #36] ; 0x24 802e6dc: 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 && 802e6de: 42a6 cmp r6, r4 802e6e0: d302 bcc.n 802e6e8 802e6e2: 4608 mov r0, r1 802e6e4: 4634 mov r4, r6 802e6e6: 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) { 802e6e8: 68db ldr r3, [r3, #12] 802e6ea: 2b00 cmp r3, #0 802e6ec: d1f0 bne.n 802e6d0 inactivity = tcp_ticks - pcb->tmr; inactive = pcb; mprio = pcb->prio; } } if (inactive != NULL) { 802e6ee: b112 cbz r2, 802e6f6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 802e6f0: 4610 mov r0, r2 802e6f2: f7ff fe6f bl 802e3d4 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); 802e6f6: 2002 movs r0, #2 802e6f8: f7ff f89c bl 802d834 if (pcb != NULL) { /* adjust err stats: timewait PCB was freed above */ MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { 802e6fc: 4604 mov r4, r0 802e6fe: 2800 cmp r0, #0 802e700: d039 beq.n 802e776 memset(pcb, 0, sizeof(struct tcp_pcb)); 802e702: 2100 movs r1, #0 802e704: 2294 movs r2, #148 ; 0x94 802e706: 4620 mov r0, r4 802e708: f7f3 f9da bl 8021ac0 pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 802e70c: 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; 802e710: f246 63a8 movw r3, #26280 ; 0x66a8 802e714: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 802e718: 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; 802e71a: 2300 movs r3, #0 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; 802e71c: 85e2 strh r2, [r4, #46] ; 0x2e pcb->tos = 0; pcb->ttl = TCP_TTL; 802e71e: 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; 802e720: 7665 strb r5, [r4, #25] pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 802e722: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 802e726: 461d mov r5, r3 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; 802e728: 7263 strb r3, [r4, #9] pcb->ttl = TCP_TTL; 802e72a: 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; 802e72c: 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; 802e730: 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; 802e734: 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; 802e738: 86e2 strh r2, [r4, #54] ; 0x36 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 802e73a: 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; 802e73c: 2206 movs r2, #6 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; 802e73e: 2301 movs r3, #1 802e740: 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; 802e744: f8a4 2044 strh.w r2, [r4, #68] ; 0x44 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; 802e748: f8a4 2042 strh.w r2, [r4, #66] ; 0x42 pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); 802e74c: f7ff ff8e bl 802e66c pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 802e750: 4b0b ldr r3, [pc, #44] ; (802e780 ) pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; 802e752: 65a0 str r0, [r4, #88] ; 0x58 pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 802e754: 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; 802e756: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 802e758: 6263 str r3, [r4, #36] ; 0x24 pcb->last_timer = tcp_timer_ctr; 802e75a: 4b0b ldr r3, [pc, #44] ; (802e788 ) pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; 802e75c: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 802e75e: 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; 802e760: 65e0 str r0, [r4, #92] ; 0x5c pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 802e762: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb->polltmr = 0; #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 802e766: 4b09 ldr r3, [pc, #36] ; (802e78c ) pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; pcb->polltmr = 0; 802e768: 77e5 strb r5, [r4, #31] #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 802e76a: 67e3 str r3, [r4, #124] ; 0x7c #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 802e76c: 4b08 ldr r3, [pc, #32] ; (802e790 ) #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; 802e76e: 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; 802e772: f8c4 308c str.w r3, [r4, #140] ; 0x8c #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; } return pcb; } 802e776: 4620 mov r0, r4 802e778: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e77a: bf00 nop 802e77c: 20011090 .word 0x20011090 802e780: 20011080 .word 0x20011080 802e784: 2001107c .word 0x2001107c 802e788: 2000e18d .word 0x2000e18d 802e78c: 0802e54d .word 0x0802e54d 802e790: 006ddd00 .word 0x006ddd00 0802e794 : * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { return tcp_alloc(TCP_PRIO_NORMAL); 802e794: 2040 movs r0, #64 ; 0x40 802e796: f7ff bf75 b.w 802e684 0802e79a : * 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) { 802e79a: b510 push {r4, lr} 802e79c: 4604 mov r4, r0 u16_t mss_s; struct netif *outif; outif = ip_route(addr); 802e79e: 4608 mov r0, r1 802e7a0: f002 f8f2 bl 8030988 if ((outif != NULL) && (outif->mtu != 0)) { 802e7a4: b130 cbz r0, 802e7b4 802e7a6: 8c83 ldrh r3, [r0, #36] ; 0x24 802e7a8: b123 cbz r3, 802e7b4 mss_s = outif->mtu - IP_HLEN - TCP_HLEN; 802e7aa: 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); 802e7ac: b29b uxth r3, r3 802e7ae: 429c cmp r4, r3 802e7b0: bf28 it cs 802e7b2: 461c movcs r4, r3 } return sendmss; } 802e7b4: 4620 mov r0, r4 802e7b6: bd10 pop {r4, pc} 0802e7b8 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 802e7b8: 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; 802e7ba: 4d1e ldr r5, [pc, #120] ; (802e834 ) 802e7bc: 682c ldr r4, [r5, #0] * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 802e7be: 4606 mov r6, r0 #endif opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { 802e7c0: 89a0 ldrh r0, [r4, #12] 802e7c2: f7fe f81e bl 802c802 802e7c6: f3c0 300f ubfx r0, r0, #12, #16 802e7ca: 2805 cmp r0, #5 802e7cc: d931 bls.n 802e832 max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 802e7ce: 682b ldr r3, [r5, #0] 802e7d0: 8998 ldrh r0, [r3, #12] 802e7d2: f7fe f816 bl 802c802 802e7d6: 0b00 lsrs r0, r0, #12 802e7d8: 1f41 subs r1, r0, #5 802e7da: 0089 lsls r1, r1, #2 u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 802e7dc: 3414 adds r4, #20 /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 802e7de: b289 uxth r1, r1 for (c = 0; c < max_c; ) { 802e7e0: 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; 802e7e2: f240 50b3 movw r0, #1459 ; 0x5b3 802e7e6: 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; ) { 802e7ea: e020 b.n 802e82e opt = opts[c]; switch (opt) { 802e7ec: 5ce2 ldrb r2, [r4, r3] 802e7ee: 2a01 cmp r2, #1 802e7f0: d005 beq.n 802e7fe 802e7f2: d31e bcc.n 802e832 802e7f4: 2a02 cmp r2, #2 802e7f6: eb04 0203 add.w r2, r4, r3 802e7fa: d114 bne.n 802e826 802e7fc: e001 b.n 802e802 /* End of options. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; case 0x01: /* NOP option. */ ++c; 802e7fe: 3301 adds r3, #1 802e800: e014 b.n 802e82c 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) { 802e802: 7857 ldrb r7, [r2, #1] 802e804: 2f04 cmp r7, #4 802e806: d114 bne.n 802e832 802e808: 1cdf adds r7, r3, #3 802e80a: 428f cmp r7, r1 802e80c: da11 bge.n 802e832 /* 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]; 802e80e: 7897 ldrb r7, [r2, #2] 802e810: 78d2 ldrb r2, [r2, #3] 802e812: 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; 802e816: 1e57 subs r7, r2, #1 802e818: b2bf uxth r7, r7 802e81a: 4287 cmp r7, r0 802e81c: bf88 it hi 802e81e: 462a movhi r2, r5 802e820: 86f2 strh r2, [r6, #54] ; 0x36 /* Advance to next option */ c += 0x04; 802e822: 3304 adds r3, #4 802e824: e002 b.n 802e82c c += 0x0A; break; #endif default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); if (opts[c + 1] == 0) { 802e826: 7852 ldrb r2, [r2, #1] 802e828: b11a cbz r2, 802e832 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]; 802e82a: 18d3 adds r3, r2, r3 802e82c: 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; ) { 802e82e: 428b cmp r3, r1 802e830: d3dc bcc.n 802e7ec 802e832: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e834: 2000e190 .word 0x2000e190 0802e838 : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 802e838: 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) { 802e83c: 4ba0 ldr r3, [pc, #640] ; (802eac0 ) 802e83e: 781b ldrb r3, [r3, #0] 802e840: f003 0310 and.w r3, r3, #16 802e844: b2db uxtb r3, r3 * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 802e846: 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) { 802e848: 2b00 cmp r3, #0 802e84a: f000 816b beq.w 802eb24 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 802e84e: 4a9d ldr r2, [pc, #628] ; (802eac4 ) 802e850: 6d43 ldr r3, [r0, #84] ; 0x54 802e852: 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; 802e854: f8b0 5060 ldrh.w r5, [r0, #96] ; 0x60 802e858: 6d81 ldr r1, [r0, #88] ; 0x58 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 802e85a: 1a98 subs r0, r3, r2 802e85c: 2800 cmp r0, #0 802e85e: db0e blt.n 802e87e 802e860: 4293 cmp r3, r2 802e862: 4b99 ldr r3, [pc, #612] ; (802eac8 ) 802e864: d103 bne.n 802e86e (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 802e866: 6818 ldr r0, [r3, #0] 802e868: 1a08 subs r0, r1, r0 802e86a: 2800 cmp r0, #0 802e86c: db07 blt.n 802e87e 802e86e: 681b ldr r3, [r3, #0] 802e870: 4299 cmp r1, r3 802e872: d11f bne.n 802e8b4 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { 802e874: 4b95 ldr r3, [pc, #596] ; (802eacc ) 802e876: 681b ldr r3, [r3, #0] 802e878: 89db ldrh r3, [r3, #14] 802e87a: 42ab cmp r3, r5 802e87c: d91a bls.n 802e8b4 pcb->snd_wnd = tcphdr->wnd; 802e87e: 4b93 ldr r3, [pc, #588] ; (802eacc ) /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 802e880: 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; 802e884: 681b ldr r3, [r3, #0] 802e886: 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; 802e888: 6562 str r2, [r4, #84] ; 0x54 pcb->snd_wl2 = ackno; 802e88a: 4a8f ldr r2, [pc, #572] ; (802eac8 ) /* 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; 802e88c: 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; 802e890: 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) { 802e892: 4286 cmp r6, r0 pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 802e894: 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; 802e896: bf38 it cc 802e898: f8a4 0062 strhcc.w r0, [r4, #98] ; 0x62 802e89c: f894 2091 ldrb.w r2, [r4, #145] ; 0x91 } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; if (pcb->snd_wnd == 0) { 802e8a0: b920 cbnz r0, 802e8ac if (pcb->persist_backoff == 0) { 802e8a2: b93a cbnz r2, 802e8b4 /* start persist timer */ pcb->persist_cnt = 0; 802e8a4: f884 0090 strb.w r0, [r4, #144] ; 0x90 pcb->persist_backoff = 1; 802e8a8: 2301 movs r3, #1 802e8aa: e001 b.n 802e8b0 } } else if (pcb->persist_backoff > 0) { 802e8ac: b112 cbz r2, 802e8b4 /* stop persist timer */ pcb->persist_backoff = 0; 802e8ae: 2300 movs r3, #0 802e8b0: 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)) { 802e8b4: 4b84 ldr r3, [pc, #528] ; (802eac8 ) 802e8b6: 6ca2 ldr r2, [r4, #72] ; 0x48 802e8b8: 681b ldr r3, [r3, #0] 802e8ba: 1a98 subs r0, r3, r2 802e8bc: 2800 cmp r0, #0 802e8be: dc34 bgt.n 802e92a pcb->acked = 0; 802e8c0: 2000 movs r0, #0 802e8c2: f8a4 0064 strh.w r0, [r4, #100] ; 0x64 /* Clause 2 */ if (tcplen == 0) { 802e8c6: 4882 ldr r0, [pc, #520] ; (802ead0 ) 802e8c8: 8800 ldrh r0, [r0, #0] 802e8ca: 2800 cmp r0, #0 802e8cc: f040 81f4 bne.w 802ecb8 /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 802e8d0: f8b4 6060 ldrh.w r6, [r4, #96] ; 0x60 802e8d4: 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; 802e8d6: 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){ 802e8d8: 1830 adds r0, r6, r0 802e8da: 4288 cmp r0, r1 802e8dc: f040 81ec bne.w 802ecb8 /* Clause 4 */ if (pcb->rtime >= 0) { 802e8e0: f9b4 1034 ldrsh.w r1, [r4, #52] ; 0x34 802e8e4: 2900 cmp r1, #0 802e8e6: f2c0 81e7 blt.w 802ecb8 /* Clause 5 */ if (pcb->lastack == ackno) { 802e8ea: 429a cmp r2, r3 802e8ec: f040 81e4 bne.w 802ecb8 found_dupack = 1; if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 802e8f0: f894 2047 ldrb.w r2, [r4, #71] ; 0x47 802e8f4: 1c53 adds r3, r2, #1 802e8f6: b2db uxtb r3, r3 802e8f8: 4293 cmp r3, r2 ++pcb->dupacks; 802e8fa: bf88 it hi 802e8fc: f884 3047 strbhi.w r3, [r4, #71] ; 0x47 } if (pcb->dupacks > 3) { 802e900: f894 3047 ldrb.w r3, [r4, #71] ; 0x47 802e904: 2b03 cmp r3, #3 802e906: d90a bls.n 802e91e /* Inflate the congestion window, but not if it means that the value overflows. */ if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 802e908: f8b4 204c ldrh.w r2, [r4, #76] ; 0x4c 802e90c: 8ee3 ldrh r3, [r4, #54] ; 0x36 802e90e: 18d3 adds r3, r2, r3 802e910: b29b uxth r3, r3 802e912: 4293 cmp r3, r2 802e914: f240 80b2 bls.w 802ea7c pcb->cwnd += pcb->mss; 802e918: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 802e91c: e0ae b.n 802ea7c } } else if (pcb->dupacks == 3) { 802e91e: f040 80ad bne.w 802ea7c /* Do fast retransmit */ tcp_rexmit_fast(pcb); 802e922: 4620 mov r0, r4 802e924: f001 fa92 bl 802fe4c 802e928: e0a8 b.n 802ea7c /* 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)){ 802e92a: 43d1 mvns r1, r2 802e92c: 42d9 cmn r1, r3 802e92e: d47e bmi.n 802ea2e 802e930: 6d21 ldr r1, [r4, #80] ; 0x50 802e932: 1a59 subs r1, r3, r1 802e934: 2900 cmp r1, #0 802e936: dc7a bgt.n 802ea2e /* 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) { 802e938: 7fa1 ldrb r1, [r4, #30] 802e93a: f001 0004 and.w r0, r1, #4 802e93e: b2c0 uxtb r0, r0 802e940: b130 cbz r0, 802e950 pcb->flags &= ~TF_INFR; 802e942: f021 0104 bic.w r1, r1, #4 802e946: 77a1 strb r1, [r4, #30] pcb->cwnd = pcb->ssthresh; 802e948: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 802e94c: 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; 802e950: f9b4 5040 ldrsh.w r5, [r4, #64] ; 0x40 802e954: f8b4 0042 ldrh.w r0, [r4, #66] ; 0x42 pcb->snd_buf += pcb->acked; /* Reset the fast retransmit variables. */ pcb->dupacks = 0; pcb->lastack = ackno; 802e958: 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; 802e95a: 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); 802e95e: 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; 802e960: 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) { 802e964: 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; 802e966: 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); 802e96a: f8a4 2064 strh.w r2, [r4, #100] ; 0x64 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 802e96e: 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; 802e970: 1812 adds r2, r2, r0 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 802e972: 2b03 cmp r3, #3 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 802e974: 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; 802e978: f8a4 2066 strh.w r2, [r4, #102] ; 0x66 /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 802e97c: f884 1047 strb.w r1, [r4, #71] ; 0x47 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 802e980: d931 bls.n 802e9e6 if (pcb->cwnd < pcb->ssthresh) { 802e982: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 802e986: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 802e98a: 429a cmp r2, r3 if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 802e98c: 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) { 802e98e: d900 bls.n 802e992 802e990: e002 b.n 802e998 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); 802e992: 4352 muls r2, r2 802e994: fb92 f2f3 sdiv r2, r2, r3 802e998: 189a adds r2, r3, r2 802e99a: b292 uxth r2, r2 if (new_cwnd > pcb->cwnd) { 802e99c: 429a cmp r2, r3 802e99e: d922 bls.n 802e9e6 pcb->cwnd = new_cwnd; 802e9a0: f8a4 204c strh.w r2, [r4, #76] ; 0x4c 802e9a4: e01f b.n 802e9e6 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; 802e9a6: 6f25 ldr r5, [r4, #112] ; 0x70 pcb->unacked = pcb->unacked->next; 802e9a8: 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))); 802e9aa: 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; 802e9ac: 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))); 802e9ae: f7ff f935 bl 802dc1c /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 802e9b2: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802e9b6: b153 cbz r3, 802e9ce 802e9b8: 68eb ldr r3, [r5, #12] 802e9ba: 8998 ldrh r0, [r3, #12] 802e9bc: f7fd ff21 bl 802c802 802e9c0: 07c3 lsls r3, r0, #31 802e9c2: d504 bpl.n 802e9ce pcb->acked--; 802e9c4: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802e9c8: 3b01 subs r3, #1 802e9ca: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 802e9ce: 6868 ldr r0, [r5, #4] 802e9d0: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 802e9d4: f7ff f922 bl 802dc1c 802e9d8: 1a38 subs r0, r7, r0 802e9da: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 802e9de: 4628 mov r0, r5 802e9e0: f7ff faf5 bl 802dfce 802e9e4: e000 b.n 802e9e8 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) + 802e9e6: 4e38 ldr r6, [pc, #224] ; (802eac8 ) 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 && 802e9e8: 6f23 ldr r3, [r4, #112] ; 0x70 802e9ea: b91b cbnz r3, 802e9f4 } } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 802e9ec: 6f22 ldr r2, [r4, #112] ; 0x70 802e9ee: 2300 movs r3, #0 802e9f0: b9d2 cbnz r2, 802ea28 802e9f2: e015 b.n 802ea20 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) + 802e9f4: 68db ldr r3, [r3, #12] 802e9f6: 6858 ldr r0, [r3, #4] 802e9f8: f7fd ff0a bl 802c810 802e9fc: 6f23 ldr r3, [r4, #112] ; 0x70 802e9fe: 891d ldrh r5, [r3, #8] 802ea00: 68db ldr r3, [r3, #12] 802ea02: 4607 mov r7, r0 802ea04: 8998 ldrh r0, [r3, #12] 802ea06: f7fd fefc bl 802c802 802ea0a: 6833 ldr r3, [r6, #0] 802ea0c: f010 0003 ands.w r0, r0, #3 802ea10: bf18 it ne 802ea12: 2001 movne r0, #1 802ea14: 1afb subs r3, r7, r3 802ea16: 1828 adds r0, r5, r0 802ea18: 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 && 802ea1a: 2b00 cmp r3, #0 802ea1c: ddc3 ble.n 802e9a6 802ea1e: e7e5 b.n 802e9ec } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) pcb->rtime = -1; 802ea20: f64f 72ff movw r2, #65535 ; 0xffff 802ea24: 86a2 strh r2, [r4, #52] ; 0x34 802ea26: e000 b.n 802ea2a else pcb->rtime = 0; 802ea28: 86a3 strh r3, [r4, #52] ; 0x34 pcb->polltmr = 0; 802ea2a: 77e3 strb r3, [r4, #31] 802ea2c: e026 b.n 802ea7c } else { /* Fix bug bug #21582: out of sequence ACK, didn't really ack anything */ pcb->acked = 0; 802ea2e: 2300 movs r3, #0 802ea30: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 802ea34: e022 b.n 802ea7c 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; 802ea36: 6ee5 ldr r5, [r4, #108] ; 0x6c pcb->unsent = pcb->unsent->next; 802ea38: 682b ldr r3, [r5, #0] 802ea3a: 66e3 str r3, [r4, #108] ; 0x6c #if TCP_OVERSIZE if (pcb->unsent == NULL) { 802ea3c: b90b cbnz r3, 802ea42 pcb->unsent_oversize = 0; 802ea3e: 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))); 802ea42: 6868 ldr r0, [r5, #4] 802ea44: f7ff f8ea bl 802dc1c /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 802ea48: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802ea4c: b153 cbz r3, 802ea64 802ea4e: 68eb ldr r3, [r5, #12] 802ea50: 8998 ldrh r0, [r3, #12] 802ea52: f7fd fed6 bl 802c802 802ea56: 07c7 lsls r7, r0, #31 802ea58: d504 bpl.n 802ea64 pcb->acked--; 802ea5a: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802ea5e: 3b01 subs r3, #1 802ea60: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 802ea64: 6868 ldr r0, [r5, #4] 802ea66: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 802ea6a: f7ff f8d7 bl 802dc1c 802ea6e: 1a38 subs r0, r7, r0 802ea70: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 802ea74: 4628 mov r0, r5 802ea76: f7ff faaa bl 802dfce 802ea7a: e000 b.n 802ea7e 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) + 802ea7c: 4e12 ldr r6, [pc, #72] ; (802eac8 ) 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 && 802ea7e: 6ee3 ldr r3, [r4, #108] ; 0x6c 802ea80: b913 cbnz r3, 802ea88 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)) { 802ea82: 6ba3 ldr r3, [r4, #56] ; 0x38 802ea84: bb33 cbnz r3, 802ead4 802ea86: e04d b.n 802eb24 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) + 802ea88: 68db ldr r3, [r3, #12] 802ea8a: 6835 ldr r5, [r6, #0] 802ea8c: 6858 ldr r0, [r3, #4] 802ea8e: f7fd febf bl 802c810 802ea92: 6ee3 ldr r3, [r4, #108] ; 0x6c 802ea94: 891f ldrh r7, [r3, #8] 802ea96: 68db ldr r3, [r3, #12] 802ea98: 4680 mov r8, r0 802ea9a: 8998 ldrh r0, [r3, #12] 802ea9c: f7fd feb1 bl 802c802 802eaa0: f010 0003 ands.w r0, r0, #3 802eaa4: bf18 it ne 802eaa6: 2001 movne r0, #1 802eaa8: ebc8 0505 rsb r5, r8, r5 802eaac: 1838 adds r0, r7, r0 802eaae: 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 && 802eab0: 2d00 cmp r5, #0 802eab2: dbe6 blt.n 802ea82 TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 802eab4: 6832 ldr r2, [r6, #0] 802eab6: 6d23 ldr r3, [r4, #80] ; 0x50 802eab8: 1ad3 subs r3, r2, r3 802eaba: 2b00 cmp r3, #0 802eabc: ddbb ble.n 802ea36 802eabe: e7e0 b.n 802ea82 802eac0: 2000e1a0 .word 0x2000e1a0 802eac4: 2000e194 .word 0x2000e194 802eac8: 2000e19c .word 0x2000e19c 802eacc: 2000e190 .word 0x2000e190 802ead0: 2000e198 .word 0x2000e198 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)) { 802ead4: 497b ldr r1, [pc, #492] ; (802ecc4 ) 802ead6: 6be2 ldr r2, [r4, #60] ; 0x3c 802ead8: 6809 ldr r1, [r1, #0] 802eada: 1a52 subs r2, r2, r1 802eadc: 2a00 cmp r2, #0 802eade: da21 bge.n 802eb24 /* 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); 802eae0: 4a79 ldr r2, [pc, #484] ; (802ecc8 ) 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); 802eae2: 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); 802eae6: 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); 802eae8: 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); 802eaec: 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); 802eaee: 1a12 subs r2, r2, r0 802eaf0: b292 uxth r2, r2 802eaf2: b293 uxth r3, r2 pcb->sa += m; 802eaf4: 1851 adds r1, r2, r1 802eaf6: b289 uxth r1, r1 if (m < 0) { 802eaf8: 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; 802eafa: f8a4 1040 strh.w r1, [r4, #64] ; 0x40 if (m < 0) { 802eafe: d501 bpl.n 802eb04 m = -m; 802eb00: 4253 negs r3, r2 802eb02: b29b uxth r3, r3 } m = m - (pcb->sv >> 2); 802eb04: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 802eb08: f342 008d sbfx r0, r2, #2, #14 802eb0c: 1a12 subs r2, r2, r0 pcb->sv += m; 802eb0e: 18d3 adds r3, r2, r3 802eb10: b29b uxth r3, r3 pcb->rto = (pcb->sa >> 3) + pcb->sv; 802eb12: f341 01cc sbfx r1, r1, #3, #13 pcb->sa += m; if (m < 0) { m = -m; } m = m - (pcb->sv >> 2); pcb->sv += m; 802eb16: f8a4 3042 strh.w r3, [r4, #66] ; 0x42 pcb->rto = (pcb->sa >> 3) + pcb->sv; 802eb1a: 185b adds r3, r3, r1 802eb1c: 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; 802eb20: 2300 movs r3, #0 802eb22: 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)) { 802eb24: 4b69 ldr r3, [pc, #420] ; (802eccc ) 802eb26: 4a6a ldr r2, [pc, #424] ; (802ecd0 ) 802eb28: 8818 ldrh r0, [r3, #0] 802eb2a: 2800 cmp r0, #0 802eb2c: f000 80b3 beq.w 802ec96 802eb30: 7e23 ldrb r3, [r4, #24] 802eb32: 2b06 cmp r3, #6 802eb34: f200 80af bhi.w 802ec96 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)){ 802eb38: 6811 ldr r1, [r2, #0] 802eb3a: 6aa3 ldr r3, [r4, #40] ; 0x28 802eb3c: 43ca mvns r2, r1 802eb3e: 42da cmn r2, r3 802eb40: d425 bmi.n 802eb8e 802eb42: 1c5a adds r2, r3, #1 802eb44: 1a52 subs r2, r2, r1 802eb46: 1a10 subs r0, r2, r0 802eb48: 2800 cmp r0, #0 802eb4a: dc20 bgt.n 802eb8e 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; 802eb4c: 1a59 subs r1, r3, r1 p = inseg.p; 802eb4e: 4b61 ldr r3, [pc, #388] ; (802ecd4 ) 802eb50: 6858 ldr r0, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { 802eb52: 8943 ldrh r3, [r0, #10] 802eb54: 428b cmp r3, r1 802eb56: da0a bge.n 802eb6e LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 802eb58: 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; 802eb5a: 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); 802eb5c: 1a52 subs r2, r2, r1 while (p->len < off) { 802eb5e: e003 b.n 802eb68 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; 802eb60: 8102 strh r2, [r0, #8] p->len = 0; 802eb62: 8145 strh r5, [r0, #10] p = p->next; 802eb64: 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; 802eb66: 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) { 802eb68: 8943 ldrh r3, [r0, #10] 802eb6a: 428b cmp r3, r1 802eb6c: dbf8 blt.n 802eb60 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)) { 802eb6e: 4249 negs r1, r1 802eb70: b209 sxth r1, r1 802eb72: f7fe ff54 bl 802da1e /* 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); 802eb76: 4a57 ldr r2, [pc, #348] ; (802ecd4 ) 802eb78: 4955 ldr r1, [pc, #340] ; (802ecd0 ) 802eb7a: 8915 ldrh r5, [r2, #8] 802eb7c: 6808 ldr r0, [r1, #0] 802eb7e: 6aa3 ldr r3, [r4, #40] ; 0x28 802eb80: 1940 adds r0, r0, r5 802eb82: 1ac0 subs r0, r0, r3 802eb84: 8110 strh r0, [r2, #8] inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 802eb86: 68d2 ldr r2, [r2, #12] 802eb88: 600b str r3, [r1, #0] 802eb8a: 6053 str r3, [r2, #4] 802eb8c: e006 b.n 802eb9c } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ 802eb8e: 1ac9 subs r1, r1, r3 802eb90: 2900 cmp r1, #0 802eb92: da03 bge.n 802eb9c /* 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); 802eb94: 7fa3 ldrb r3, [r4, #30] 802eb96: f043 0302 orr.w r3, r3, #2 802eb9a: 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, 802eb9c: 4b4c ldr r3, [pc, #304] ; (802ecd0 ) 802eb9e: 6aa2 ldr r2, [r4, #40] ; 0x28 802eba0: 681b ldr r3, [r3, #0] 802eba2: 1a99 subs r1, r3, r2 802eba4: 2900 cmp r1, #0 802eba6: db71 blt.n 802ec8c 802eba8: 1c59 adds r1, r3, #1 802ebaa: 8da0 ldrh r0, [r4, #44] ; 0x2c 802ebac: 1a89 subs r1, r1, r2 802ebae: 1a09 subs r1, r1, r0 802ebb0: 2900 cmp r1, #0 802ebb2: dc6b bgt.n 802ec8c pcb->rcv_nxt + pcb->rcv_wnd - 1)){ if (pcb->rcv_nxt == seqno) { 802ebb4: 429a cmp r2, r3 802ebb6: d169 bne.n 802ec8c /* 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); 802ebb8: 4d46 ldr r5, [pc, #280] ; (802ecd4 ) 802ebba: 68eb ldr r3, [r5, #12] 802ebbc: 892e ldrh r6, [r5, #8] 802ebbe: 8998 ldrh r0, [r3, #12] 802ebc0: f7fd fe1f bl 802c802 802ebc4: f010 0003 ands.w r0, r0, #3 802ebc8: bf18 it ne 802ebca: 2001 movne r0, #1 802ebcc: 4b3f ldr r3, [pc, #252] ; (802eccc ) 802ebce: 1830 adds r0, r6, r0 802ebd0: b280 uxth r0, r0 802ebd2: 8018 strh r0, [r3, #0] if (tcplen > pcb->rcv_wnd) { 802ebd4: 8da3 ldrh r3, [r4, #44] ; 0x2c 802ebd6: 4283 cmp r3, r0 802ebd8: d230 bcs.n 802ec3c 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) { 802ebda: 68eb ldr r3, [r5, #12] 802ebdc: 8998 ldrh r0, [r3, #12] 802ebde: f7fd fe10 bl 802c802 802ebe2: 07c0 lsls r0, r0, #31 802ebe4: d50c bpl.n 802ec00 /* 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); 802ebe6: 68ed ldr r5, [r5, #12] 802ebe8: 89ae ldrh r6, [r5, #12] 802ebea: 4630 mov r0, r6 802ebec: f7fd fe09 bl 802c802 802ebf0: f000 003e and.w r0, r0, #62 ; 0x3e 802ebf4: f7fd fe00 bl 802c7f8 802ebf8: f426 567c bic.w r6, r6, #16128 ; 0x3f00 802ebfc: 4330 orrs r0, r6 802ebfe: 81a8 strh r0, [r5, #12] } /* Adjust length of segment to fit in the window. */ inseg.len = pcb->rcv_wnd; 802ec00: 8da3 ldrh r3, [r4, #44] ; 0x2c 802ec02: 4d34 ldr r5, [pc, #208] ; (802ecd4 ) 802ec04: 812b strh r3, [r5, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 802ec06: 68eb ldr r3, [r5, #12] 802ec08: 8998 ldrh r0, [r3, #12] 802ec0a: f7fd fdfa bl 802c802 802ec0e: f000 0002 and.w r0, r0, #2 802ec12: b280 uxth r0, r0 802ec14: b110 cbz r0, 802ec1c inseg.len -= 1; 802ec16: 892b ldrh r3, [r5, #8] 802ec18: 3b01 subs r3, #1 802ec1a: 812b strh r3, [r5, #8] } pbuf_realloc(inseg.p, inseg.len); 802ec1c: 6868 ldr r0, [r5, #4] 802ec1e: 8929 ldrh r1, [r5, #8] 802ec20: f7fe ff4f bl 802dac2 tcplen = TCP_TCPLEN(&inseg); 802ec24: 68eb ldr r3, [r5, #12] 802ec26: 892e ldrh r6, [r5, #8] 802ec28: 8998 ldrh r0, [r3, #12] 802ec2a: f7fd fdea bl 802c802 802ec2e: f010 0003 ands.w r0, r0, #3 802ec32: bf18 it ne 802ec34: 2001 movne r0, #1 802ec36: 4b25 ldr r3, [pc, #148] ; (802eccc ) 802ec38: 1830 adds r0, r6, r0 802ec3a: 8018 strh r0, [r3, #0] pcb->ooseq = next; } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 802ec3c: 4b23 ldr r3, [pc, #140] ; (802eccc ) 802ec3e: 4a24 ldr r2, [pc, #144] ; (802ecd0 ) 802ec40: 881b ldrh r3, [r3, #0] 802ec42: 6812 ldr r2, [r2, #0] 802ec44: 189a adds r2, r3, r2 802ec46: 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; 802ec48: 8da2 ldrh r2, [r4, #44] ; 0x2c 802ec4a: 1ad3 subs r3, r2, r3 802ec4c: 85a3 strh r3, [r4, #44] ; 0x2c tcp_update_rcv_ann_wnd(pcb); 802ec4e: 4620 mov r0, r4 802ec50: f7ff f986 bl 802df60 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) { 802ec54: 4b1f ldr r3, [pc, #124] ; (802ecd4 ) 802ec56: 685a ldr r2, [r3, #4] 802ec58: 8911 ldrh r1, [r2, #8] 802ec5a: b119 cbz r1, 802ec64 recv_data = inseg.p; 802ec5c: 491e ldr r1, [pc, #120] ; (802ecd8 ) 802ec5e: 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; 802ec60: 2200 movs r2, #0 802ec62: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 802ec64: 68db ldr r3, [r3, #12] 802ec66: 8998 ldrh r0, [r3, #12] 802ec68: f7fd fdcb bl 802c802 802ec6c: 07c1 lsls r1, r0, #31 802ec6e: d504 bpl.n 802ec7a LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 802ec70: 4b1a ldr r3, [pc, #104] ; (802ecdc ) 802ec72: 781a ldrb r2, [r3, #0] 802ec74: f042 0220 orr.w r2, r2, #32 802ec78: 701a strb r2, [r3, #0] } #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 802ec7a: 7fa3 ldrb r3, [r4, #30] 802ec7c: 07da lsls r2, r3, #31 802ec7e: d502 bpl.n 802ec86 802ec80: f023 0301 bic.w r3, r3, #1 802ec84: e013 b.n 802ecae 802ec86: f043 0301 orr.w r3, r3, #1 802ec8a: e012 b.n 802ecb2 } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 802ec8c: 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); } } } 802ec8e: 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); 802ec92: f000 bf09 b.w 802faa8 } 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)){ 802ec96: 6812 ldr r2, [r2, #0] 802ec98: 6aa3 ldr r3, [r4, #40] ; 0x28 802ec9a: 1ad1 subs r1, r2, r3 802ec9c: 2900 cmp r1, #0 802ec9e: db05 blt.n 802ecac 802eca0: 3201 adds r2, #1 802eca2: 8da1 ldrh r1, [r4, #44] ; 0x2c 802eca4: 1ad3 subs r3, r2, r3 802eca6: 1a5b subs r3, r3, r1 802eca8: 2b00 cmp r3, #0 802ecaa: dd09 ble.n 802ecc0 tcp_ack_now(pcb); 802ecac: 7fa3 ldrb r3, [r4, #30] 802ecae: f043 0302 orr.w r3, r3, #2 802ecb2: 77a3 strb r3, [r4, #30] 802ecb4: 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; 802ecb8: 2300 movs r3, #0 802ecba: f884 3047 strb.w r3, [r4, #71] ; 0x47 802ecbe: e6dd b.n 802ea7c 802ecc0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802ecc4: 2000e19c .word 0x2000e19c 802ecc8: 20011080 .word 0x20011080 802eccc: 2000e198 .word 0x2000e198 802ecd0: 2000e194 .word 0x2000e194 802ecd4: 2000e1ac .word 0x2000e1ac 802ecd8: 2000e1a4 .word 0x2000e1a4 802ecdc: 2000e1a1 .word 0x2000e1a1 0802ece0 : * @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) { 802ece0: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802ece4: 4606 mov r6, r0 802ece6: 460f mov r7, r1 err_t err; PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); 802ece8: f003 fcb8 bl 803265c iphdr = (struct ip_hdr *)p->payload; 802ecec: 6873 ldr r3, [r6, #4] 802ecee: 4aa7 ldr r2, [pc, #668] ; (802ef8c ) tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 802ecf0: 4ca7 ldr r4, [pc, #668] ; (802ef90 ) PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; 802ecf2: 6013 str r3, [r2, #0] tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 802ecf4: 781a ldrb r2, [r3, #0] 802ecf6: 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))) { 802ecfa: 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); 802ecfc: 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))) { 802ed00: 4630 mov r0, r6 802ed02: 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); 802ed04: 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))) { 802ed06: f7fe fe8a bl 802da1e 802ed0a: 2800 cmp r0, #0 802ed0c: f040 83ce bne.w 802f4ac 802ed10: 8933 ldrh r3, [r6, #8] 802ed12: 2b13 cmp r3, #19 802ed14: f240 83ca bls.w 802f4ac TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 802ed18: 4d9e ldr r5, [pc, #632] ; (802ef94 ) 802ed1a: 4639 mov r1, r7 802ed1c: 6828 ldr r0, [r5, #0] 802ed1e: f001 fd43 bl 80307a8 802ed22: 2800 cmp r0, #0 802ed24: f040 83c2 bne.w 802f4ac ip_addr_ismulticast(¤t_iphdr_dest)) { 802ed28: 682b ldr r3, [r5, #0] 802ed2a: 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) || 802ed2e: 2be0 cmp r3, #224 ; 0xe0 802ed30: f000 83bc beq.w 802f4ac } #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); 802ed34: 6823 ldr r3, [r4, #0] 802ed36: 8998 ldrh r0, [r3, #12] 802ed38: f7fd fd63 bl 802c802 if(pbuf_header(p, -(hdrlen * 4))){ 802ed3c: f06f 0103 mvn.w r1, #3 802ed40: f3c0 3307 ubfx r3, r0, #12, #8 802ed44: 4359 muls r1, r3 802ed46: 4630 mov r0, r6 802ed48: f7fe fe69 bl 802da1e 802ed4c: 4683 mov fp, r0 802ed4e: 2800 cmp r0, #0 802ed50: f040 83ac bne.w 802f4ac TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); 802ed54: 6827 ldr r7, [r4, #0] 802ed56: 8838 ldrh r0, [r7, #0] 802ed58: f7fd fd53 bl 802c802 802ed5c: 8038 strh r0, [r7, #0] tcphdr->dest = ntohs(tcphdr->dest); 802ed5e: 6827 ldr r7, [r4, #0] 802ed60: 8878 ldrh r0, [r7, #2] 802ed62: f7fd fd4e bl 802c802 802ed66: 8078 strh r0, [r7, #2] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 802ed68: 6827 ldr r7, [r4, #0] 802ed6a: 6878 ldr r0, [r7, #4] 802ed6c: f7fd fd50 bl 802c810 802ed70: 4b89 ldr r3, [pc, #548] ; (802ef98 ) 802ed72: 6078 str r0, [r7, #4] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 802ed74: 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); 802ed76: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 802ed78: 68b8 ldr r0, [r7, #8] 802ed7a: f7fd fd49 bl 802c810 802ed7e: 4b87 ldr r3, [pc, #540] ; (802ef9c ) 802ed80: 60b8 str r0, [r7, #8] tcphdr->wnd = ntohs(tcphdr->wnd); 802ed82: 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); 802ed84: 6018 str r0, [r3, #0] tcphdr->wnd = ntohs(tcphdr->wnd); 802ed86: 89f8 ldrh r0, [r7, #14] 802ed88: f7fd fd3b bl 802c802 802ed8c: 81f8 strh r0, [r7, #14] flags = TCPH_FLAGS(tcphdr); 802ed8e: 6823 ldr r3, [r4, #0] 802ed90: 8998 ldrh r0, [r3, #12] 802ed92: f7fd fd36 bl 802c802 802ed96: 4b82 ldr r3, [pc, #520] ; (802efa0 ) tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 802ed98: 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 && 802ed9c: 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); 802ed9e: 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); 802eda2: f000 013f and.w r1, r0, #63 ; 0x3f tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 802eda6: bf18 it ne 802eda8: 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); 802edac: 7019 strb r1, [r3, #0] tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 802edae: 44c4 add ip, r8 802edb0: 4b7c ldr r3, [pc, #496] ; (802efa4 ) 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)) { 802edb2: 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); 802edb4: fa1f fc8c uxth.w ip, ip 802edb8: 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) { 802edbc: 4b7a ldr r3, [pc, #488] ; (802efa8 ) 802edbe: 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) && 802edc2: 4b7a ldr r3, [pc, #488] ; (802efac ) 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); 802edc4: 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) && 802edc6: 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) { 802edca: 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; 802edcc: 4658 mov r0, fp for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 802edce: e019 b.n 802ee04 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 && 802edd0: 8ba5 ldrh r5, [r4, #28] 802edd2: 883b ldrh r3, [r7, #0] 802edd4: 429d cmp r5, r3 802edd6: d113 bne.n 802ee00 802edd8: 8b65 ldrh r5, [r4, #26] 802edda: 887b ldrh r3, [r7, #2] 802eddc: 429d cmp r5, r3 802edde: d10f bne.n 802ee00 pcb->local_port == tcphdr->dest && 802ede0: 6863 ldr r3, [r4, #4] 802ede2: 454b cmp r3, r9 802ede4: d10c bne.n 802ee00 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 802ede6: 6823 ldr r3, [r4, #0] 802ede8: 428b cmp r3, r1 802edea: d109 bne.n 802ee00 /* 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) { 802edec: 2800 cmp r0, #0 802edee: f000 8382 beq.w 802f4f6 prev->next = pcb->next; 802edf2: 68e3 ldr r3, [r4, #12] 802edf4: 60c3 str r3, [r0, #12] pcb->next = tcp_active_pcbs; tcp_active_pcbs = pcb; 802edf6: 4b6c ldr r3, [pc, #432] ; (802efa8 ) 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; 802edf8: f8c4 a00c str.w sl, [r4, #12] tcp_active_pcbs = pcb; 802edfc: 601c str r4, [r3, #0] 802edfe: e37a b.n 802f4f6 802ee00: 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) { 802ee02: 68e4 ldr r4, [r4, #12] 802ee04: 2c00 cmp r4, #0 802ee06: d1e3 bne.n 802edd0 802ee08: e372 b.n 802f4f0 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 && 802ee0a: 8b98 ldrh r0, [r3, #28] 802ee0c: 883c ldrh r4, [r7, #0] 802ee0e: 4284 cmp r4, r0 802ee10: d130 bne.n 802ee74 pcb->local_port == tcphdr->dest && 802ee12: 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 && 802ee14: 887d ldrh r5, [r7, #2] 802ee16: 4285 cmp r5, r0 802ee18: d12c bne.n 802ee74 pcb->local_port == tcphdr->dest && 802ee1a: 6858 ldr r0, [r3, #4] 802ee1c: 4548 cmp r0, r9 802ee1e: d129 bne.n 802ee74 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 802ee20: 6818 ldr r0, [r3, #0] 802ee22: 4288 cmp r0, r1 802ee24: d126 bne.n 802ee74 /* 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) { 802ee26: f002 0104 and.w r1, r2, #4 802ee2a: b2c9 uxtb r1, r1 802ee2c: 2900 cmp r1, #0 802ee2e: f040 833f bne.w 802f4b0 return ERR_OK; } /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 802ee32: f002 0102 and.w r1, r2, #2 802ee36: b2c9 uxtb r1, r1 802ee38: b159 cbz r1, 802ee52 /* 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)) { 802ee3a: 4a57 ldr r2, [pc, #348] ; (802ef98 ) 802ee3c: 6811 ldr r1, [r2, #0] 802ee3e: 6a9a ldr r2, [r3, #40] ; 0x28 802ee40: 1a8a subs r2, r1, r2 802ee42: d40b bmi.n 802ee5c 802ee44: 8d98 ldrh r0, [r3, #44] ; 0x2c 802ee46: 1a12 subs r2, r2, r0 802ee48: 2a00 cmp r2, #0 802ee4a: dc07 bgt.n 802ee5c /* 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(), 802ee4c: 9500 str r5, [sp, #0] 802ee4e: 9401 str r4, [sp, #4] 802ee50: e041 b.n 802eed6 tcphdr->dest, tcphdr->src); return ERR_OK; } } else if (flags & TCP_FIN) { 802ee52: 07d2 lsls r2, r2, #31 802ee54: d502 bpl.n 802ee5c /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 802ee56: 4a56 ldr r2, [pc, #344] ; (802efb0 ) 802ee58: 6812 ldr r2, [r2, #0] 802ee5a: 625a str r2, [r3, #36] ; 0x24 } if ((tcplen > 0)) { 802ee5c: f1bc 0f00 cmp.w ip, #0 802ee60: f000 8326 beq.w 802f4b0 /* Acknowledge data, FIN or out-of-window SYN */ pcb->flags |= TF_ACK_NOW; 802ee64: 7f9a ldrb r2, [r3, #30] 802ee66: f042 0202 orr.w r2, r2, #2 802ee6a: 779a strb r2, [r3, #30] return tcp_output(pcb); 802ee6c: 4618 mov r0, r3 802ee6e: f000 fe3d bl 802faec 802ee72: e31d b.n 802f4b0 } 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) { 802ee74: 68db ldr r3, [r3, #12] 802ee76: 2b00 cmp r3, #0 802ee78: d1c7 bne.n 802ee0a } /* 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) { 802ee7a: 484e ldr r0, [pc, #312] ; (802efb4 ) 802ee7c: 6804 ldr r4, [r0, #0] 802ee7e: 4625 mov r5, r4 802ee80: e00f b.n 802eea2 if (lpcb->local_port == tcphdr->dest) { 802ee82: 8b68 ldrh r0, [r5, #26] 802ee84: f8b7 8002 ldrh.w r8, [r7, #2] 802ee88: 4580 cmp r8, r0 802ee8a: d108 bne.n 802ee9e /* found an ANY-match */ lpcb_any = lpcb; lpcb_prev = prev; } #else /* SO_REUSE */ if (ip_addr_cmp(&(lpcb->local_ip), ¤t_iphdr_dest) || 802ee8c: f8d5 8000 ldr.w r8, [r5] 802ee90: 4588 cmp r8, r1 802ee92: f000 8342 beq.w 802f51a ip_addr_isany(&(lpcb->local_ip))) { 802ee96: f1b8 0f00 cmp.w r8, #0 802ee9a: f000 833e beq.w 802f51a 802ee9e: 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) { 802eea0: 68ed ldr r5, [r5, #12] 802eea2: 2d00 cmp r5, #0 802eea4: d1ed bne.n 802ee82 802eea6: e33c b.n 802f522 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; 802eea8: 68e9 ldr r1, [r5, #12] 802eeaa: 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; 802eeac: 4b41 ldr r3, [pc, #260] ; (802efb4 ) 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; 802eeae: 60ec str r4, [r5, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 802eeb0: 601d str r5, [r3, #0] tcp_listen_input(struct tcp_pcb_listen *pcb) { struct tcp_pcb *npcb; err_t rc; if (flags & TCP_RST) { 802eeb2: f002 0304 and.w r3, r2, #4 802eeb6: b2db uxtb r3, r3 802eeb8: 2b00 cmp r3, #0 802eeba: f040 82f9 bne.w 802f4b0 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) { 802eebe: f002 0810 and.w r8, r2, #16 802eec2: fa5f f888 uxtb.w r8, r8 802eec6: f1b8 0f00 cmp.w r8, #0 802eeca: d00c beq.n 802eee6 /* 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(), 802eecc: 4b32 ldr r3, [pc, #200] ; (802ef98 ) 802eece: 6819 ldr r1, [r3, #0] 802eed0: 9000 str r0, [sp, #0] 802eed2: 883b ldrh r3, [r7, #0] 802eed4: 9301 str r3, [sp, #4] 802eed6: 4b31 ldr r3, [pc, #196] ; (802ef9c ) 802eed8: 6818 ldr r0, [r3, #0] 802eeda: 4461 add r1, ip 802eedc: 4a2d ldr r2, [pc, #180] ; (802ef94 ) 802eede: 4b33 ldr r3, [pc, #204] ; (802efac ) 802eee0: f000 ff28 bl 802fd34 802eee4: e2e4 b.n 802f4b0 ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { 802eee6: f002 0202 and.w r2, r2, #2 802eeea: b2d2 uxtb r2, r2 802eeec: 2a00 cmp r2, #0 802eeee: f000 82df beq.w 802f4b0 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); 802eef2: 7e68 ldrb r0, [r5, #25] 802eef4: f7ff fbc6 bl 802e684 /* 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) { 802eef8: 4604 mov r4, r0 802eefa: 2800 cmp r0, #0 802eefc: f000 82d8 beq.w 802f4b0 } #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); 802ef00: 4b24 ldr r3, [pc, #144] ; (802ef94 ) 802ef02: 681b ldr r3, [r3, #0] 802ef04: 6003 str r3, [r0, #0] npcb->local_port = pcb->local_port; 802ef06: 8b6b ldrh r3, [r5, #26] 802ef08: 8343 strh r3, [r0, #26] ip_addr_copy(npcb->remote_ip, current_iphdr_src); 802ef0a: 4b28 ldr r3, [pc, #160] ; (802efac ) 802ef0c: 681b ldr r3, [r3, #0] 802ef0e: 6043 str r3, [r0, #4] npcb->remote_port = tcphdr->src; 802ef10: 4b1f ldr r3, [pc, #124] ; (802ef90 ) 802ef12: 681b ldr r3, [r3, #0] 802ef14: 7859 ldrb r1, [r3, #1] 802ef16: 781a ldrb r2, [r3, #0] 802ef18: ea42 2201 orr.w r2, r2, r1, lsl #8 802ef1c: 8382 strh r2, [r0, #28] npcb->state = SYN_RCVD; 802ef1e: 2203 movs r2, #3 802ef20: 7602 strb r2, [r0, #24] npcb->rcv_nxt = seqno + 1; 802ef22: 4a1d ldr r2, [pc, #116] ; (802ef98 ) 802ef24: 6812 ldr r2, [r2, #0] 802ef26: 1c51 adds r1, r2, #1 802ef28: 6281 str r1, [r0, #40] ; 0x28 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 802ef2a: 6301 str r1, [r0, #48] ; 0x30 npcb->snd_wnd = tcphdr->wnd; 802ef2c: 89db ldrh r3, [r3, #14] 802ef2e: f8a0 3060 strh.w r3, [r0, #96] ; 0x60 npcb->snd_wnd_max = tcphdr->wnd; 802ef32: f8a0 3062 strh.w r3, [r0, #98] ; 0x62 npcb->ssthresh = npcb->snd_wnd; 802ef36: 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; 802ef3a: 692b ldr r3, [r5, #16] 802ef3c: 6103 str r3, [r0, #16] #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 802ef3e: 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 */ 802ef40: 3a01 subs r2, #1 802ef42: 6542 str r2, [r0, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 802ef44: 6143 str r3, [r0, #20] #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; 802ef46: 7a2b ldrb r3, [r5, #8] 802ef48: f023 0373 bic.w r3, r3, #115 ; 0x73 802ef4c: 7203 strb r3, [r0, #8] /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 802ef4e: 4b16 ldr r3, [pc, #88] ; (802efa8 ) 802ef50: 681a ldr r2, [r3, #0] 802ef52: 6018 str r0, [r3, #0] 802ef54: 60c2 str r2, [r0, #12] 802ef56: f001 f887 bl 8030068 802ef5a: 4b17 ldr r3, [pc, #92] ; (802efb8 ) 802ef5c: 2201 movs r2, #1 /* Parse any options in the SYN. */ tcp_parseopt(npcb); 802ef5e: 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); 802ef60: 701a strb r2, [r3, #0] /* Parse any options in the SYN. */ tcp_parseopt(npcb); 802ef62: f7ff fc29 bl 802e7b8 #if TCP_CALCULATE_EFF_SEND_MSS npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip)); 802ef66: 1d21 adds r1, r4, #4 802ef68: 8ee0 ldrh r0, [r4, #54] ; 0x36 802ef6a: f7ff fc16 bl 802e79a 802ef6e: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ snmp_inc_tcppassiveopens(); 802ef70: f003 fb5c bl 803262c /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 802ef74: 4620 mov r0, r4 802ef76: 2112 movs r1, #18 802ef78: f000 fd28 bl 802f9cc if (rc != ERR_OK) { 802ef7c: b120 cbz r0, 802ef88 tcp_abandon(npcb, 0); 802ef7e: 4620 mov r0, r4 802ef80: 4641 mov r1, r8 802ef82: f7ff f9e1 bl 802e348 802ef86: e293 b.n 802f4b0 return rc; } return tcp_output(npcb); 802ef88: 4620 mov r0, r4 802ef8a: e770 b.n 802ee6e 802ef8c: 2000e1a8 .word 0x2000e1a8 802ef90: 2000e190 .word 0x2000e190 802ef94: 200110a4 .word 0x200110a4 802ef98: 2000e194 .word 0x2000e194 802ef9c: 2000e19c .word 0x2000e19c 802efa0: 2000e1a0 .word 0x2000e1a0 802efa4: 2000e198 .word 0x2000e198 802efa8: 2001107c .word 0x2001107c 802efac: 2001109c .word 0x2001109c 802efb0: 20011080 .word 0x20011080 802efb4: 20011084 .word 0x20011084 802efb8: 20011078 .word 0x20011078 recv_data = NULL; recv_flags = 0; if (flags & TCP_PSH) { p->flags |= PBUF_FLAG_PUSH; 802efbc: 7b73 ldrb r3, [r6, #13] 802efbe: f043 0301 orr.w r3, r3, #1 802efc2: 7373 strb r3, [r6, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 802efc4: 6f63 ldr r3, [r4, #116] ; 0x74 802efc6: b163 cbz r3, 802efe2 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 802efc8: 4620 mov r0, r4 802efca: f7ff fad1 bl 802e570 802efce: 300a adds r0, #10 802efd0: d004 beq.n 802efdc 802efd2: 6f63 ldr r3, [r4, #116] ; 0x74 802efd4: b12b cbz r3, 802efe2 ((pcb->refused_data != NULL) && (tcplen > 0))) { 802efd6: 4b9f ldr r3, [pc, #636] ; (802f254 ) 802efd8: 881b ldrh r3, [r3, #0] 802efda: b113 cbz r3, 802efe2 /* pcb has been aborted or refused data is still refused and the new segment contains data */ TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 802efdc: f003 fb56 bl 803268c goto aborted; 802efe0: e249 b.n 802f476 } } tcp_input_pcb = pcb; 802efe2: 4b9d ldr r3, [pc, #628] ; (802f258 ) 802efe4: 601c str r4, [r3, #0] err_t err; err = ERR_OK; /* Process incoming RST segments. */ if (flags & TCP_RST) { 802efe6: 4b9d ldr r3, [pc, #628] ; (802f25c ) 802efe8: 781b ldrb r3, [r3, #0] 802efea: f003 0204 and.w r2, r3, #4 802efee: b2d2 uxtb r2, r2 802eff0: b1aa cbz r2, 802f01e /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 802eff2: 7e23 ldrb r3, [r4, #24] 802eff4: 2b02 cmp r3, #2 802eff6: d106 bne.n 802f006 if (ackno == pcb->snd_nxt) { 802eff8: 4b99 ldr r3, [pc, #612] ; (802f260 ) 802effa: 681a ldr r2, [r3, #0] 802effc: 6d23 ldr r3, [r4, #80] ; 0x50 802effe: 429a cmp r2, r3 802f000: f040 82a1 bne.w 802f546 802f004: e296 b.n 802f534 acceptable = 1; } } else { if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 802f006: 4b97 ldr r3, [pc, #604] ; (802f264 ) 802f008: 681a ldr r2, [r3, #0] 802f00a: 6aa3 ldr r3, [r4, #40] ; 0x28 802f00c: 1ad3 subs r3, r2, r3 802f00e: f100 829a bmi.w 802f546 802f012: 8da1 ldrh r1, [r4, #44] ; 0x2c 802f014: 1a5b subs r3, r3, r1 802f016: 2b00 cmp r3, #0 802f018: f300 8295 bgt.w 802f546 802f01c: e28a b.n 802f534 seqno, pcb->rcv_nxt)); return ERR_OK; } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 802f01e: f003 0302 and.w r3, r3, #2 802f022: b2db uxtb r3, r3 802f024: b123 cbz r3, 802f030 802f026: 7e23 ldrb r3, [r4, #24] 802f028: 3b02 subs r3, #2 802f02a: 2b01 cmp r3, #1 802f02c: d900 bls.n 802f030 802f02e: e06b b.n 802f108 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); return ERR_OK; } if ((pcb->flags & TF_RXCLOSED) == 0) { 802f030: 7fa3 ldrb r3, [r4, #30] 802f032: f003 0310 and.w r3, r3, #16 802f036: b2db uxtb r3, r3 802f038: b913 cbnz r3, 802f040 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 802f03a: 4b8b ldr r3, [pc, #556] ; (802f268 ) 802f03c: 681b ldr r3, [r3, #0] 802f03e: 6263 str r3, [r4, #36] ; 0x24 } pcb->keep_cnt_sent = 0; 802f040: 2300 movs r3, #0 802f042: f884 3092 strb.w r3, [r4, #146] ; 0x92 tcp_parseopt(pcb); 802f046: 4620 mov r0, r4 802f048: f7ff fbb6 bl 802e7b8 /* Do different things depending on the TCP state. */ switch (pcb->state) { 802f04c: 7e23 ldrb r3, [r4, #24] 802f04e: 3b02 subs r3, #2 802f050: 2b07 cmp r3, #7 802f052: f200 8278 bhi.w 802f546 802f056: e8df f013 tbh [pc, r3, lsl #1] 802f05a: 0008 .short 0x0008 802f05c: 00c90077 .word 0x00c90077 802f060: 013000da .word 0x013000da 802f064: 015200c9 .word 0x015200c9 802f068: 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) 802f06a: 4b7c ldr r3, [pc, #496] ; (802f25c ) 802f06c: 781b ldrb r3, [r3, #0] 802f06e: f003 0312 and.w r3, r3, #18 802f072: 2b12 cmp r3, #18 802f074: d153 bne.n 802f11e && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { 802f076: 6f23 ldr r3, [r4, #112] ; 0x70 802f078: 4d79 ldr r5, [pc, #484] ; (802f260 ) 802f07a: 68db ldr r3, [r3, #12] 802f07c: 682e ldr r6, [r5, #0] 802f07e: 6858 ldr r0, [r3, #4] 802f080: f7fd fbc6 bl 802c810 802f084: 3001 adds r0, #1 802f086: 4286 cmp r6, r0 802f088: d149 bne.n 802f11e pcb->snd_buf++; 802f08a: 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)); 802f08e: 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++; 802f090: 3301 adds r3, #1 802f092: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->rcv_nxt = seqno + 1; 802f096: 4b73 ldr r3, [pc, #460] ; (802f264 ) 802f098: 681b ldr r3, [r3, #0] 802f09a: 1c5a adds r2, r3, #1 802f09c: 62a2 str r2, [r4, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 802f09e: 6322 str r2, [r4, #48] ; 0x30 pcb->lastack = ackno; 802f0a0: 682a ldr r2, [r5, #0] 802f0a2: 64a2 str r2, [r4, #72] ; 0x48 pcb->snd_wnd = tcphdr->wnd; 802f0a4: 4a71 ldr r2, [pc, #452] ; (802f26c ) 802f0a6: 6812 ldr r2, [r2, #0] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 802f0a8: 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; 802f0aa: 89d2 ldrh r2, [r2, #14] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 802f0ac: 6563 str r3, [r4, #84] ; 0x54 pcb->state = ESTABLISHED; 802f0ae: 2304 movs r3, #4 802f0b0: 7623 strb r3, [r4, #24] #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 802f0b2: 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; 802f0b4: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 pcb->snd_wnd_max = tcphdr->wnd; 802f0b8: 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)); 802f0bc: f7ff fb6d bl 802e79a #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; 802f0c0: 230a movs r3, #10 802f0c2: 4343 muls r3, r0 802f0c4: f8a4 304e strh.w r3, [r4, #78] ; 0x4e pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 802f0c8: 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)); 802f0cc: 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); 802f0ce: 2b01 cmp r3, #1 802f0d0: d101 bne.n 802f0d6 802f0d2: 0040 lsls r0, r0, #1 802f0d4: b280 uxth r0, r0 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 802f0d6: 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); 802f0da: 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; 802f0de: 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; 802f0e0: 3b01 subs r3, #1 802f0e2: 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; 802f0e6: 6803 ldr r3, [r0, #0] 802f0e8: 6723 str r3, [r4, #112] ; 0x70 tcp_seg_free(rseg); 802f0ea: f7fe ff70 bl 802dfce /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 802f0ee: 6f23 ldr r3, [r4, #112] ; 0x70 802f0f0: b91b cbnz r3, 802f0fa pcb->rtime = -1; 802f0f2: f64f 73ff movw r3, #65535 ; 0xffff 802f0f6: 86a3 strh r3, [r4, #52] ; 0x34 802f0f8: e003 b.n 802f102 else { pcb->rtime = 0; 802f0fa: 2300 movs r3, #0 802f0fc: 86a3 strh r3, [r4, #52] ; 0x34 pcb->nrtx = 0; 802f0fe: 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); 802f102: f8d4 3080 ldr.w r3, [r4, #128] ; 0x80 802f106: b91b cbnz r3, 802f110 if (err == ERR_ABRT) { return ERR_ABRT; } tcp_ack_now(pcb); 802f108: 7fa3 ldrb r3, [r4, #30] 802f10a: f043 0302 orr.w r3, r3, #2 802f10e: e219 b.n 802f544 pcb->nrtx = 0; } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 802f110: 2200 movs r2, #0 802f112: 6920 ldr r0, [r4, #16] 802f114: 4621 mov r1, r4 802f116: 4798 blx r3 if (err == ERR_ABRT) { 802f118: 300a adds r0, #10 802f11a: d1f5 bne.n 802f108 802f11c: e1ab b.n 802f476 return ERR_ABRT; } tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { 802f11e: 4b4f ldr r3, [pc, #316] ; (802f25c ) 802f120: 781b ldrb r3, [r3, #0] 802f122: f003 0310 and.w r3, r3, #16 802f126: b2db uxtb r3, r3 802f128: 2b00 cmp r3, #0 802f12a: f000 820c beq.w 802f546 /* 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); 802f12e: 4b4f ldr r3, [pc, #316] ; (802f26c ) 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(), 802f130: 4a48 ldr r2, [pc, #288] ; (802f254 ) tcphdr->dest, tcphdr->src); 802f132: 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(), 802f134: 8811 ldrh r1, [r2, #0] 802f136: 8858 ldrh r0, [r3, #2] 802f138: 4a4a ldr r2, [pc, #296] ; (802f264 ) 802f13a: 6812 ldr r2, [r2, #0] 802f13c: 9000 str r0, [sp, #0] 802f13e: 881b ldrh r3, [r3, #0] 802f140: 9301 str r3, [sp, #4] 802f142: 4b47 ldr r3, [pc, #284] ; (802f260 ) 802f144: 6818 ldr r0, [r3, #0] 802f146: e03a b.n 802f1be tcphdr->dest, tcphdr->src); } break; case SYN_RCVD: if (flags & TCP_ACK) { 802f148: 4b44 ldr r3, [pc, #272] ; (802f25c ) 802f14a: 781b ldrb r3, [r3, #0] 802f14c: f003 0210 and.w r2, r3, #16 802f150: b2d2 uxtb r2, r2 802f152: 2a00 cmp r2, #0 802f154: d039 beq.n 802f1ca /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { 802f156: 4b42 ldr r3, [pc, #264] ; (802f260 ) 802f158: 6818 ldr r0, [r3, #0] 802f15a: 6ca3 ldr r3, [r4, #72] ; 0x48 802f15c: 43db mvns r3, r3 802f15e: 42c3 cmn r3, r0 802f160: d423 bmi.n 802f1aa 802f162: 6d23 ldr r3, [r4, #80] ; 0x50 802f164: 1ac3 subs r3, r0, r3 802f166: 2b00 cmp r3, #0 802f168: dc1f bgt.n 802f1aa u16_t old_cwnd; pcb->state = ESTABLISHED; 802f16a: 2304 movs r3, #4 802f16c: 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); 802f16e: 6963 ldr r3, [r4, #20] 802f170: b903 cbnz r3, 802f174 802f172: e147 b.n 802f404 802f174: 6920 ldr r0, [r4, #16] 802f176: 4621 mov r1, r4 802f178: 2200 movs r2, #0 802f17a: 4798 blx r3 if (err != ERR_OK) { 802f17c: b118 cbz r0, 802f186 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 802f17e: 300a adds r0, #10 802f180: f040 8140 bne.w 802f404 802f184: e177 b.n 802f476 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); 802f186: 4620 mov r0, r4 if (err != ERR_ABRT) { tcp_abort(pcb); } return ERR_ABRT; } old_cwnd = pcb->cwnd; 802f188: 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); 802f18c: f7ff fb54 bl 802e838 /* Prevent ACK for SYN to generate a sent event */ if (pcb->acked != 0) { 802f190: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802f194: b113 cbz r3, 802f19c pcb->acked--; 802f196: 3b01 subs r3, #1 802f198: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->cwnd = ((old_cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 802f19c: 8ee3 ldrh r3, [r4, #54] ; 0x36 802f19e: 2d01 cmp r5, #1 802f1a0: bf08 it eq 802f1a2: 005b lsleq r3, r3, #1 802f1a4: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 802f1a8: e023 b.n 802f1f2 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); 802f1aa: 4b30 ldr r3, [pc, #192] ; (802f26c ) 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(), 802f1ac: 4a29 ldr r2, [pc, #164] ; (802f254 ) tcphdr->dest, tcphdr->src); 802f1ae: 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(), 802f1b0: 8811 ldrh r1, [r2, #0] 802f1b2: 885d ldrh r5, [r3, #2] 802f1b4: 4a2b ldr r2, [pc, #172] ; (802f264 ) 802f1b6: 6812 ldr r2, [r2, #0] 802f1b8: 9500 str r5, [sp, #0] 802f1ba: 881b ldrh r3, [r3, #0] 802f1bc: 9301 str r3, [sp, #4] 802f1be: 1889 adds r1, r1, r2 802f1c0: 4b2b ldr r3, [pc, #172] ; (802f270 ) 802f1c2: 4a2c ldr r2, [pc, #176] ; (802f274 ) 802f1c4: f000 fdb6 bl 802fd34 802f1c8: e1bd b.n 802f546 tcphdr->dest, tcphdr->src); } } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 802f1ca: f003 0302 and.w r3, r3, #2 802f1ce: b2db uxtb r3, r3 802f1d0: 2b00 cmp r3, #0 802f1d2: f000 81b8 beq.w 802f546 802f1d6: 4a23 ldr r2, [pc, #140] ; (802f264 ) 802f1d8: 6aa3 ldr r3, [r4, #40] ; 0x28 802f1da: 6812 ldr r2, [r2, #0] 802f1dc: 3b01 subs r3, #1 802f1de: 429a cmp r2, r3 802f1e0: f040 81b1 bne.w 802f546 /* Looks like another copy of the SYN - retransmit our SYN-ACK */ tcp_rexmit(pcb); 802f1e4: 4620 mov r0, r4 802f1e6: f000 fe03 bl 802fdf0 802f1ea: e1ac b.n 802f546 } break; case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 802f1ec: 4620 mov r0, r4 802f1ee: f7ff fb23 bl 802e838 if (recv_flags & TF_GOT_FIN) { /* passive close */ 802f1f2: 4b21 ldr r3, [pc, #132] ; (802f278 ) 802f1f4: 781b ldrb r3, [r3, #0] 802f1f6: f003 0320 and.w r3, r3, #32 802f1fa: b2db uxtb r3, r3 802f1fc: 2b00 cmp r3, #0 802f1fe: f000 81a2 beq.w 802f546 tcp_ack_now(pcb); 802f202: 7fa3 ldrb r3, [r4, #30] 802f204: f043 0302 orr.w r3, r3, #2 802f208: 77a3 strb r3, [r4, #30] pcb->state = CLOSE_WAIT; 802f20a: 2307 movs r3, #7 802f20c: e053 b.n 802f2b6 } break; case FIN_WAIT_1: tcp_receive(pcb); 802f20e: 4620 mov r0, r4 802f210: f7ff fb12 bl 802e838 if (recv_flags & TF_GOT_FIN) { 802f214: 4b18 ldr r3, [pc, #96] ; (802f278 ) 802f216: 781a ldrb r2, [r3, #0] 802f218: 4b10 ldr r3, [pc, #64] ; (802f25c ) if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 802f21a: 781b ldrb r3, [r3, #0] pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 802f21c: f002 0220 and.w r2, r2, #32 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 802f220: 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) { 802f224: b2d2 uxtb r2, r2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 802f226: b2db uxtb r3, r3 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 802f228: 2a00 cmp r2, #0 802f22a: d03a beq.n 802f2a2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 802f22c: 2b00 cmp r3, #0 802f22e: d032 beq.n 802f296 802f230: 4b0b ldr r3, [pc, #44] ; (802f260 ) 802f232: 681a ldr r2, [r3, #0] 802f234: 6d23 ldr r3, [r4, #80] ; 0x50 802f236: 429a cmp r2, r3 802f238: d12d bne.n 802f296 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); 802f23a: 7fa3 ldrb r3, [r4, #30] 802f23c: f043 0302 orr.w r3, r3, #2 802f240: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 802f242: 4620 mov r0, r4 802f244: f7fe feea bl 802e01c TCP_RMV_ACTIVE(pcb); 802f248: 4a0c ldr r2, [pc, #48] ; (802f27c ) 802f24a: 6813 ldr r3, [r2, #0] 802f24c: 42a3 cmp r3, r4 802f24e: d117 bne.n 802f280 802f250: e06d b.n 802f32e 802f252: bf00 nop 802f254: 2000e198 .word 0x2000e198 802f258: 20011094 .word 0x20011094 802f25c: 2000e1a0 .word 0x2000e1a0 802f260: 2000e19c .word 0x2000e19c 802f264: 2000e194 .word 0x2000e194 802f268: 20011080 .word 0x20011080 802f26c: 2000e190 .word 0x2000e190 802f270: 2001109c .word 0x2001109c 802f274: 200110a4 .word 0x200110a4 802f278: 2000e1a1 .word 0x2000e1a1 802f27c: 2001107c .word 0x2001107c 802f280: 4a8e ldr r2, [pc, #568] ; (802f4bc ) 802f282: 6013 str r3, [r2, #0] 802f284: e004 b.n 802f290 802f286: 68d9 ldr r1, [r3, #12] 802f288: 42a1 cmp r1, r4 802f28a: d100 bne.n 802f28e 802f28c: e057 b.n 802f33e 802f28e: 460b mov r3, r1 802f290: 2b00 cmp r3, #0 802f292: d1f8 bne.n 802f286 802f294: e05a b.n 802f34c pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } else { tcp_ack_now(pcb); 802f296: 7fa3 ldrb r3, [r4, #30] 802f298: f043 0302 orr.w r3, r3, #2 802f29c: 77a3 strb r3, [r4, #30] pcb->state = CLOSING; 802f29e: 2308 movs r3, #8 802f2a0: e009 b.n 802f2b6 } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 802f2a2: 2b00 cmp r3, #0 802f2a4: f000 814f beq.w 802f546 802f2a8: 4b85 ldr r3, [pc, #532] ; (802f4c0 ) 802f2aa: 681a ldr r2, [r3, #0] 802f2ac: 6d23 ldr r3, [r4, #80] ; 0x50 802f2ae: 429a cmp r2, r3 802f2b0: f040 8149 bne.w 802f546 pcb->state = FIN_WAIT_2; 802f2b4: 2306 movs r3, #6 802f2b6: 7623 strb r3, [r4, #24] 802f2b8: e145 b.n 802f546 } break; case FIN_WAIT_2: tcp_receive(pcb); 802f2ba: 4620 mov r0, r4 802f2bc: f7ff fabc bl 802e838 if (recv_flags & TF_GOT_FIN) { 802f2c0: 4b80 ldr r3, [pc, #512] ; (802f4c4 ) 802f2c2: 781b ldrb r3, [r3, #0] 802f2c4: f003 0320 and.w r3, r3, #32 802f2c8: b2db uxtb r3, r3 802f2ca: 2b00 cmp r3, #0 802f2cc: f000 813b beq.w 802f546 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); 802f2d0: 7fa3 ldrb r3, [r4, #30] 802f2d2: f043 0302 orr.w r3, r3, #2 802f2d6: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 802f2d8: 4620 mov r0, r4 802f2da: f7fe fe9f bl 802e01c TCP_RMV_ACTIVE(pcb); 802f2de: 4a7a ldr r2, [pc, #488] ; (802f4c8 ) 802f2e0: 6813 ldr r3, [r2, #0] 802f2e2: 42a3 cmp r3, r4 802f2e4: d100 bne.n 802f2e8 802f2e6: e022 b.n 802f32e 802f2e8: 4a74 ldr r2, [pc, #464] ; (802f4bc ) 802f2ea: 6013 str r3, [r2, #0] 802f2ec: e004 b.n 802f2f8 802f2ee: 68d9 ldr r1, [r3, #12] 802f2f0: 42a1 cmp r1, r4 802f2f2: d100 bne.n 802f2f6 802f2f4: e023 b.n 802f33e 802f2f6: 460b mov r3, r1 802f2f8: 2b00 cmp r3, #0 802f2fa: d1f8 bne.n 802f2ee 802f2fc: e026 b.n 802f34c pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } break; case CLOSING: tcp_receive(pcb); 802f2fe: 4620 mov r0, r4 802f300: f7ff fa9a bl 802e838 if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 802f304: 4b71 ldr r3, [pc, #452] ; (802f4cc ) 802f306: 781b ldrb r3, [r3, #0] 802f308: f003 0310 and.w r3, r3, #16 802f30c: b2db uxtb r3, r3 802f30e: 2b00 cmp r3, #0 802f310: f000 8119 beq.w 802f546 802f314: 4b6a ldr r3, [pc, #424] ; (802f4c0 ) 802f316: 681a ldr r2, [r3, #0] 802f318: 6d23 ldr r3, [r4, #80] ; 0x50 802f31a: 429a cmp r2, r3 802f31c: f040 8113 bne.w 802f546 LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 802f320: 4620 mov r0, r4 802f322: f7fe fe7b bl 802e01c TCP_RMV_ACTIVE(pcb); 802f326: 4a68 ldr r2, [pc, #416] ; (802f4c8 ) 802f328: 6813 ldr r3, [r2, #0] 802f32a: 42a3 cmp r3, r4 802f32c: d101 bne.n 802f332 802f32e: 68e3 ldr r3, [r4, #12] 802f330: e00c b.n 802f34c 802f332: 4a62 ldr r2, [pc, #392] ; (802f4bc ) 802f334: 6013 str r3, [r2, #0] 802f336: e007 b.n 802f348 802f338: 68d9 ldr r1, [r3, #12] 802f33a: 42a1 cmp r1, r4 802f33c: d103 bne.n 802f346 802f33e: 6013 str r3, [r2, #0] 802f340: 68e2 ldr r2, [r4, #12] 802f342: 60da str r2, [r3, #12] 802f344: e003 b.n 802f34e 802f346: 460b mov r3, r1 802f348: 2b00 cmp r3, #0 802f34a: d1f5 bne.n 802f338 802f34c: 6013 str r3, [r2, #0] 802f34e: 4b60 ldr r3, [pc, #384] ; (802f4d0 ) 802f350: 2201 movs r2, #1 802f352: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 802f354: 230a movs r3, #10 802f356: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 802f358: 4b5e ldr r3, [pc, #376] ; (802f4d4 ) 802f35a: 681a ldr r2, [r3, #0] 802f35c: 601c str r4, [r3, #0] 802f35e: 60e2 str r2, [r4, #12] 802f360: f000 fe82 bl 8030068 802f364: e0ef b.n 802f546 } break; case LAST_ACK: tcp_receive(pcb); 802f366: 4620 mov r0, r4 802f368: f7ff fa66 bl 802e838 if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 802f36c: 4b57 ldr r3, [pc, #348] ; (802f4cc ) 802f36e: 781b ldrb r3, [r3, #0] 802f370: f003 0310 and.w r3, r3, #16 802f374: b2db uxtb r3, r3 802f376: 2b00 cmp r3, #0 802f378: f000 80e5 beq.w 802f546 802f37c: 4b50 ldr r3, [pc, #320] ; (802f4c0 ) 802f37e: 681a ldr r2, [r3, #0] 802f380: 6d23 ldr r3, [r4, #80] ; 0x50 802f382: 429a cmp r2, r3 802f384: f040 80df bne.w 802f546 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; 802f388: 4b4e ldr r3, [pc, #312] ; (802f4c4 ) 802f38a: 781a ldrb r2, [r3, #0] 802f38c: f042 0210 orr.w r2, r2, #16 802f390: 701a strb r2, [r3, #0] 802f392: e0d8 b.n 802f546 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); 802f394: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 802f398: b19b cbz r3, 802f3c2 802f39a: 6920 ldr r0, [r4, #16] 802f39c: f06f 010a mvn.w r1, #10 802f3a0: e00e b.n 802f3c0 tcp_pcb_remove(&tcp_active_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); } else if (recv_flags & TF_CLOSED) { 802f3a2: f003 0310 and.w r3, r3, #16 802f3a6: b2db uxtb r3, r3 802f3a8: b1a3 cbz r3, 802f3d4 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 802f3aa: 7fa3 ldrb r3, [r4, #30] 802f3ac: f003 0310 and.w r3, r3, #16 802f3b0: b2db uxtb r3, r3 802f3b2: b933 cbnz r3, 802f3c2 /* 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); 802f3b4: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 802f3b8: b11b cbz r3, 802f3c2 802f3ba: 6920 ldr r0, [r4, #16] 802f3bc: f06f 010b mvn.w r1, #11 802f3c0: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 802f3c2: 4621 mov r1, r4 802f3c4: 4840 ldr r0, [pc, #256] ; (802f4c8 ) 802f3c6: f7fe ff91 bl 802e2ec memp_free(MEMP_TCP_PCB, pcb); 802f3ca: 2002 movs r0, #2 802f3cc: 4621 mov r1, r4 802f3ce: f7fe fa47 bl 802d860 802f3d2: e050 b.n 802f476 } 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) { 802f3d4: f8b4 2064 ldrh.w r2, [r4, #100] ; 0x64 802f3d8: b91a cbnz r2, 802f3e2 if (err == ERR_ABRT) { goto aborted; } } if (recv_data != NULL) { 802f3da: 4b3f ldr r3, [pc, #252] ; (802f4d8 ) 802f3dc: 681a ldr r2, [r3, #0] 802f3de: b94a cbnz r2, 802f3f4 802f3e0: e026 b.n 802f430 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); 802f3e2: 6fa3 ldr r3, [r4, #120] ; 0x78 802f3e4: 2b00 cmp r3, #0 802f3e6: d0f8 beq.n 802f3da 802f3e8: 6920 ldr r0, [r4, #16] 802f3ea: 4621 mov r1, r4 802f3ec: 4798 blx r3 if (err == ERR_ABRT) { 802f3ee: 300a adds r0, #10 802f3f0: d1f3 bne.n 802f3da 802f3f2: e040 b.n 802f476 } } if (recv_data != NULL) { LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); if (pcb->flags & TF_RXCLOSED) { 802f3f4: 7fa3 ldrb r3, [r4, #30] 802f3f6: f003 0310 and.w r3, r3, #16 802f3fa: b2db uxtb r3, r3 802f3fc: b133 cbz r3, 802f40c /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 802f3fe: 4610 mov r0, r2 802f400: f7fe fb38 bl 802da74 tcp_abort(pcb); 802f404: 4620 mov r0, r4 802f406: f7fe ffe5 bl 802e3d4 goto aborted; 802f40a: e034 b.n 802f476 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 802f40c: 6fe5 ldr r5, [r4, #124] ; 0x7c 802f40e: b11d cbz r5, 802f418 802f410: 6920 ldr r0, [r4, #16] 802f412: 4621 mov r1, r4 802f414: 47a8 blx r5 802f416: e004 b.n 802f422 802f418: 4628 mov r0, r5 802f41a: 4621 mov r1, r4 802f41c: 462b mov r3, r5 802f41e: f7ff f895 bl 802e54c if (err == ERR_ABRT) { 802f422: b243 sxtb r3, r0 802f424: 330a adds r3, #10 802f426: d026 beq.n 802f476 goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 802f428: b110 cbz r0, 802f430 pcb->refused_data = recv_data; 802f42a: 4b2b ldr r3, [pc, #172] ; (802f4d8 ) 802f42c: 681b ldr r3, [r3, #0] 802f42e: 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) { 802f430: 4b24 ldr r3, [pc, #144] ; (802f4c4 ) 802f432: 781b ldrb r3, [r3, #0] 802f434: f003 0320 and.w r3, r3, #32 802f438: b2db uxtb r3, r3 802f43a: b1b3 cbz r3, 802f46a if (pcb->refused_data != NULL) { 802f43c: 6f63 ldr r3, [r4, #116] ; 0x74 802f43e: b123 cbz r3, 802f44a /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 802f440: 7b5a ldrb r2, [r3, #13] 802f442: f042 0220 orr.w r2, r2, #32 802f446: 735a strb r2, [r3, #13] 802f448: e00f b.n 802f46a } else { /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 802f44a: 8da3 ldrh r3, [r4, #44] ; 0x2c 802f44c: f241 62d0 movw r2, #5840 ; 0x16d0 802f450: 4293 cmp r3, r2 802f452: d001 beq.n 802f458 pcb->rcv_wnd++; 802f454: 3301 adds r3, #1 802f456: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 802f458: 6fe5 ldr r5, [r4, #124] ; 0x7c 802f45a: b135 cbz r5, 802f46a 802f45c: 2200 movs r2, #0 802f45e: 6920 ldr r0, [r4, #16] 802f460: 4621 mov r1, r4 802f462: 4613 mov r3, r2 802f464: 47a8 blx r5 if (err == ERR_ABRT) { 802f466: 300a adds r0, #10 802f468: d005 beq.n 802f476 goto aborted; } } } tcp_input_pcb = NULL; 802f46a: 4b1c ldr r3, [pc, #112] ; (802f4dc ) 802f46c: 2200 movs r2, #0 /* Try to send something out. */ tcp_output(pcb); 802f46e: 4620 mov r0, r4 goto aborted; } } } tcp_input_pcb = NULL; 802f470: 601a str r2, [r3, #0] /* Try to send something out. */ tcp_output(pcb); 802f472: f000 fb3b bl 802faec } } /* 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; 802f476: 4b19 ldr r3, [pc, #100] ; (802f4dc ) recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 802f478: 4d19 ldr r5, [pc, #100] ; (802f4e0 ) } } /* 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; 802f47a: 2400 movs r4, #0 802f47c: 601c str r4, [r3, #0] recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 802f47e: 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; 802f480: 4b15 ldr r3, [pc, #84] ; (802f4d8 ) 802f482: 601c str r4, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) 802f484: 2800 cmp r0, #0 802f486: d067 beq.n 802f558 { pbuf_free(inseg.p); 802f488: f7fe faf4 bl 802da74 inseg.p = NULL; 802f48c: 606c str r4, [r5, #4] 802f48e: e063 b.n 802f558 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); 802f490: 4b14 ldr r3, [pc, #80] ; (802f4e4 ) 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, 802f492: 4a15 ldr r2, [pc, #84] ; (802f4e8 ) ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 802f494: 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, 802f496: 8811 ldrh r1, [r2, #0] 802f498: 8858 ldrh r0, [r3, #2] 802f49a: 4a14 ldr r2, [pc, #80] ; (802f4ec ) 802f49c: 6812 ldr r2, [r2, #0] 802f49e: 9000 str r0, [sp, #0] 802f4a0: 881b ldrh r3, [r3, #0] 802f4a2: 9301 str r3, [sp, #4] 802f4a4: 4b06 ldr r3, [pc, #24] ; (802f4c0 ) 802f4a6: 1889 adds r1, r1, r2 802f4a8: 6818 ldr r0, [r3, #0] 802f4aa: e517 b.n 802eedc LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 802f4ac: f003 f8ee bl 803268c pbuf_free(p); 802f4b0: 4630 mov r0, r6 } 802f4b2: b003 add sp, #12 802f4b4: 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); 802f4b8: f7fe badc b.w 802da74 802f4bc: 20011088 .word 0x20011088 802f4c0: 2000e19c .word 0x2000e19c 802f4c4: 2000e1a1 .word 0x2000e1a1 802f4c8: 2001107c .word 0x2001107c 802f4cc: 2000e1a0 .word 0x2000e1a0 802f4d0: 20011078 .word 0x20011078 802f4d4: 20011090 .word 0x20011090 802f4d8: 2000e1a4 .word 0x2000e1a4 802f4dc: 20011094 .word 0x20011094 802f4e0: 2000e1ac .word 0x2000e1ac 802f4e4: 2000e190 .word 0x2000e190 802f4e8: 2000e198 .word 0x2000e198 802f4ec: 2000e194 .word 0x2000e194 } 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) { 802f4f0: 4b1b ldr r3, [pc, #108] ; (802f560 ) 802f4f2: 681b ldr r3, [r3, #0] 802f4f4: e4bf b.n 802ee76 tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 802f4f6: 4b1b ldr r3, [pc, #108] ; (802f564 ) 802f4f8: 2100 movs r1, #0 802f4fa: 6019 str r1, [r3, #0] inseg.len = p->tot_len; 802f4fc: f8a3 8008 strh.w r8, [r3, #8] inseg.p = p; 802f500: 605e str r6, [r3, #4] inseg.tcphdr = tcphdr; 802f502: 60df str r7, [r3, #12] recv_data = NULL; 802f504: 4b18 ldr r3, [pc, #96] ; (802f568 ) recv_flags = 0; if (flags & TCP_PSH) { 802f506: f002 0208 and.w r2, r2, #8 inseg.next = NULL; inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; 802f50a: 6019 str r1, [r3, #0] recv_flags = 0; 802f50c: 4b17 ldr r3, [pc, #92] ; (802f56c ) if (flags & TCP_PSH) { 802f50e: b2d2 uxtb r2, r2 inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; recv_flags = 0; 802f510: 7019 strb r1, [r3, #0] if (flags & TCP_PSH) { 802f512: 2a00 cmp r2, #0 802f514: f47f ad52 bne.w 802efbc 802f518: e554 b.n 802efc4 #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) { 802f51a: 2b00 cmp r3, #0 802f51c: f47f acc4 bne.w 802eea8 802f520: e4c7 b.n 802eeb2 } 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)) { 802f522: 89b8 ldrh r0, [r7, #12] 802f524: f7fd f96d bl 802c802 802f528: f000 0004 and.w r0, r0, #4 802f52c: b280 uxth r0, r0 802f52e: 2800 cmp r0, #0 802f530: d1be bne.n 802f4b0 802f532: e7ad b.n 802f490 } 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; 802f534: 4b0d ldr r3, [pc, #52] ; (802f56c ) 802f536: 781a ldrb r2, [r3, #0] 802f538: f042 0208 orr.w r2, r2, #8 802f53c: 701a strb r2, [r3, #0] pcb->flags &= ~TF_ACK_DELAY; 802f53e: 7fa3 ldrb r3, [r4, #30] 802f540: f023 0301 bic.w r3, r3, #1 802f544: 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) { 802f546: 4b09 ldr r3, [pc, #36] ; (802f56c ) 802f548: 781b ldrb r3, [r3, #0] 802f54a: f003 0208 and.w r2, r3, #8 802f54e: b2d2 uxtb r2, r2 802f550: 2a00 cmp r2, #0 802f552: f47f af1f bne.w 802f394 802f556: e724 b.n 802f3a2 return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); } 802f558: b003 add sp, #12 802f55a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802f55e: bf00 nop 802f560: 20011090 .word 0x20011090 802f564: 2000e1ac .word 0x2000e1ac 802f568: 2000e1a4 .word 0x2000e1a4 802f56c: 2000e1a1 .word 0x2000e1a1 0802f570 : #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) { 802f570: 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) { 802f572: 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) { 802f574: 460c mov r4, r1 802f576: 461e mov r6, r3 802f578: 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) { 802f57a: d21a bcs.n 802f5b2 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 802f57c: f89d 3014 ldrb.w r3, [sp, #20] 802f580: f003 0302 and.w r3, r3, #2 802f584: b2db uxtb r3, r3 802f586: b95b cbnz r3, 802f5a0 (!(pcb->flags & TF_NODELAY) && 802f588: 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) || 802f58a: f003 0340 and.w r3, r3, #64 ; 0x40 802f58e: b2db uxtb r3, r3 802f590: b97b cbnz r3, 802f5b2 (!(pcb->flags & TF_NODELAY) && 802f592: f89d 3018 ldrb.w r3, [sp, #24] 802f596: b11b cbz r3, 802f5a0 (!first_seg || 802f598: 6ee9 ldr r1, [r5, #108] ; 0x6c 802f59a: b909 cbnz r1, 802f5a0 pcb->unsent != NULL || 802f59c: 6f2b ldr r3, [r5, #112] ; 0x70 802f59e: b143 cbz r3, 802f5b2 pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); 802f5a0: f204 51b7 addw r1, r4, #1463 ; 0x5b7 802f5a4: f021 0103 bic.w r1, r1, #3 802f5a8: 4291 cmp r1, r2 802f5aa: bfa8 it ge 802f5ac: 4611 movge r1, r2 802f5ae: b289 uxth r1, r1 802f5b0: e000 b.n 802f5b4 * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || (!(pcb->flags & TF_NODELAY) && (!first_seg || pcb->unsent != NULL || 802f5b2: 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); 802f5b4: 2200 movs r2, #0 802f5b6: f7fe faaa bl 802db0e if (p == NULL) { 802f5ba: b120 cbz r0, 802f5c6 return NULL; } LWIP_ASSERT("need unchained pbuf", p->next == NULL); *oversize = p->len - length; 802f5bc: 8943 ldrh r3, [r0, #10] 802f5be: 1b1b subs r3, r3, r4 802f5c0: 8033 strh r3, [r6, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 802f5c2: 8104 strh r4, [r0, #8] 802f5c4: 8144 strh r4, [r0, #10] return p; } 802f5c6: bd70 pop {r4, r5, r6, pc} 0802f5c8 : * 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) { 802f5c8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802f5cc: f89d 6020 ldrb.w r6, [sp, #32] struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 802f5d0: f006 0702 and.w r7, r6, #2 802f5d4: f016 0f01 tst.w r6, #1 802f5d8: 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) { 802f5da: 4680 mov r8, r0 802f5dc: 469a mov sl, r3 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 802f5de: bf0c ite eq 802f5e0: 2300 moveq r3, #0 802f5e2: 2304 movne r3, #4 802f5e4: 2f00 cmp r7, #0 802f5e6: bf14 ite ne 802f5e8: 270c movne r7, #12 802f5ea: 2700 moveq r7, #0 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 802f5ec: 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) { 802f5ee: 460d mov r5, r1 802f5f0: 4691 mov r9, r2 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 802f5f2: 18ff adds r7, r7, r3 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 802f5f4: f7fe f91e bl 802d834 802f5f8: 4604 mov r4, r0 802f5fa: b918 cbnz r0, 802f604 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 802f5fc: 4628 mov r0, r5 802f5fe: f7fe fa39 bl 802da74 return NULL; 802f602: e030 b.n 802f666 } seg->flags = optflags; 802f604: 7286 strb r6, [r0, #10] seg->next = NULL; seg->p = p; seg->len = p->tot_len - optlen; 802f606: 892b ldrh r3, [r5, #8] pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; seg->p = p; 802f608: 6045 str r5, [r0, #4] seg->len = p->tot_len - optlen; 802f60a: 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; 802f60c: 2600 movs r6, #0 802f60e: 6006 str r6, [r0, #0] seg->p = p; seg->len = p->tot_len - optlen; 802f610: 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)) { 802f612: 2114 movs r1, #20 802f614: 4628 mov r0, r5 802f616: f7fe fa02 bl 802da1e 802f61a: 4605 mov r5, r0 802f61c: b120 cbz r0, 802f628 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); 802f61e: 4620 mov r0, r4 802f620: f7fe fcd5 bl 802dfce return NULL; 802f624: 4634 mov r4, r6 802f626: e01e b.n 802f666 } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 802f628: 6863 ldr r3, [r4, #4] seg->tcphdr->src = htons(pcb->local_port); 802f62a: 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; 802f62e: 685e ldr r6, [r3, #4] 802f630: 60e6 str r6, [r4, #12] seg->tcphdr->src = htons(pcb->local_port); 802f632: f7fd f8e1 bl 802c7f8 802f636: 8030 strh r0, [r6, #0] seg->tcphdr->dest = htons(pcb->remote_port); 802f638: f8b8 001c ldrh.w r0, [r8, #28] 802f63c: 68e6 ldr r6, [r4, #12] 802f63e: f7fd f8db bl 802c7f8 802f642: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = htonl(seqno); 802f644: 4650 mov r0, sl 802f646: 68e6 ldr r6, [r4, #12] 802f648: f7fd f8e0 bl 802c80c /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 802f64c: 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); 802f64e: 6070 str r0, [r6, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 802f650: f507 40a0 add.w r0, r7, #20480 ; 0x5000 802f654: ea40 0009 orr.w r0, r0, r9 802f658: 68e6 ldr r6, [r4, #12] 802f65a: f7fd f8cd bl 802c7f8 802f65e: 81b0 strh r0, [r6, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 802f660: 68e3 ldr r3, [r4, #12] 802f662: 749d strb r5, [r3, #18] 802f664: 74dd strb r5, [r3, #19] return seg; } 802f666: 4620 mov r0, r4 802f668: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802f66c : 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); 802f66c: 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, 802f66e: 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); 802f670: 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, 802f672: 4605 mov r5, r0 802f674: 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); 802f676: 2001 movs r0, #1 802f678: 2200 movs r2, #0 802f67a: f7fe fa48 bl 802db0e if (p != NULL) { 802f67e: 4606 mov r6, r0 802f680: b1f8 cbz r0, 802f6c2 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 802f682: 6844 ldr r4, [r0, #4] tcphdr->src = htons(pcb->local_port); 802f684: 8b68 ldrh r0, [r5, #26] 802f686: f7fd f8b7 bl 802c7f8 802f68a: 8020 strh r0, [r4, #0] tcphdr->dest = htons(pcb->remote_port); 802f68c: 8ba8 ldrh r0, [r5, #28] 802f68e: f7fd f8b3 bl 802c7f8 tcphdr->seqno = seqno_be; 802f692: 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); 802f694: 8060 strh r0, [r4, #2] tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); 802f696: 6aa8 ldr r0, [r5, #40] ; 0x28 802f698: f7fd f8b8 bl 802c80c 802f69c: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); 802f69e: f245 0010 movw r0, #20496 ; 0x5010 802f6a2: f7fd f8a9 bl 802c7f8 802f6a6: 81a0 strh r0, [r4, #12] tcphdr->wnd = htons(pcb->rcv_ann_wnd); 802f6a8: 8de8 ldrh r0, [r5, #46] ; 0x2e 802f6aa: f7fd f8a5 bl 802c7f8 tcphdr->chksum = 0; 802f6ae: 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); 802f6b0: 81e0 strh r0, [r4, #14] tcphdr->chksum = 0; 802f6b2: 7423 strb r3, [r4, #16] 802f6b4: 7463 strb r3, [r4, #17] tcphdr->urgp = 0; 802f6b6: 74a3 strb r3, [r4, #18] 802f6b8: 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; 802f6ba: 8dea ldrh r2, [r5, #46] ; 0x2e 802f6bc: 6aab ldr r3, [r5, #40] ; 0x28 802f6be: 18d3 adds r3, r2, r3 802f6c0: 632b str r3, [r5, #48] ; 0x30 } return p; } 802f6c2: 4630 mov r0, r6 802f6c4: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802f6c6 : * - 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) { 802f6c6: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802f6ca: b08f sub sp, #60 ; 0x3c 802f6cc: 4691 mov r9, r2 802f6ce: 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; 802f6d0: 2300 movs r3, #0 802f6d2: 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) { 802f6d6: 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); 802f6d8: f8b0 2062 ldrh.w r2, [r0, #98] ; 0x62 802f6dc: 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)", 802f6de: 9106 str r1, [sp, #24] 802f6e0: 2900 cmp r1, #0 802f6e2: f000 8168 beq.w 802f9b6 802f6e6: 7e01 ldrb r1, [r0, #24] 802f6e8: 2907 cmp r1, #7 802f6ea: f200 8166 bhi.w 802f9ba 802f6ee: f990 1018 ldrsb.w r1, [r0, #24] 802f6f2: f04f 5064 mov.w r0, #956301312 ; 0x39000000 802f6f6: 4088 lsls r0, r1 802f6f8: f140 815f bpl.w 802f9ba (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) { 802f6fc: f1b9 0f00 cmp.w r9, #0 802f700: d00d beq.n 802f71e return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 802f702: f8b4 1066 ldrh.w r1, [r4, #102] ; 0x66 802f706: 4549 cmp r1, r9 802f708: d200 bcs.n 802f70c 802f70a: e003 b.n 802f714 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)) { 802f70c: f8b4 1068 ldrh.w r1, [r4, #104] ; 0x68 802f710: 2947 cmp r1, #71 ; 0x47 802f712: d904 bls.n 802f71e 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; 802f714: 7fa3 ldrb r3, [r4, #30] 802f716: f063 037f orn r3, r3, #127 ; 0x7f 802f71a: 77a3 strb r3, [r4, #30] 802f71c: e151 b.n 802f9c2 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); 802f71e: 0852 lsrs r2, r2, #1 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 802f720: 6ee6 ldr r6, [r4, #108] ; 0x6c err = tcp_write_checks(pcb, len); if (err != ERR_OK) { return err; } queuelen = pcb->snd_queuelen; 802f722: 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); 802f726: 429a cmp r2, r3 802f728: bf28 it cs 802f72a: 461a movcs r2, r3 802f72c: 920a str r2, [sp, #40] ; 0x28 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 802f72e: b90e cbnz r6, 802f734 802f730: e066 b.n 802f800 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); 802f732: 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; 802f734: 6833 ldr r3, [r6, #0] 802f736: 2b00 cmp r3, #0 802f738: d1fb bne.n 802f732 last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 802f73a: 7ab3 ldrb r3, [r6, #10] space = mss_local - (last_unsent->len + unsent_optlen); 802f73c: 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); 802f73e: 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; 802f740: 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); 802f744: f013 0f01 tst.w r3, #1 802f748: f003 0302 and.w r3, r3, #2 802f74c: bf0c ite eq 802f74e: 2100 moveq r1, #0 802f750: 2104 movne r1, #4 802f752: b2db uxtb r3, r3 802f754: 1bc2 subs r2, r0, r7 802f756: 2b00 cmp r3, #0 802f758: bf14 ite ne 802f75a: 230c movne r3, #12 802f75c: 2300 moveq r3, #0 space = mss_local - (last_unsent->len + unsent_optlen); 802f75e: 1a52 subs r2, r2, r1 802f760: 1ad2 subs r2, r2, r3 802f762: 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) { 802f764: b91d cbnz r5, 802f76e #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; 802f766: 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; 802f76a: 462b mov r3, r5 802f76c: e00a b.n 802f784 #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; 802f76e: 45a9 cmp r9, r5 802f770: bf34 ite cc 802f772: 464b movcc r3, r9 802f774: 462b movcs r3, r5 pos += oversize_used; oversize -= oversize_used; 802f776: 1aed subs r5, r5, r3 space -= oversize_used; 802f778: 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; 802f77a: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 space -= oversize_used; 802f77e: 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; 802f780: 461d mov r5, r3 oversize -= oversize_used; space -= oversize_used; 802f782: 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)) { 802f784: 454d cmp r5, r9 802f786: d23f bcs.n 802f808 802f788: 2a00 cmp r2, #0 802f78a: d03d beq.n 802f808 802f78c: 2f00 cmp r7, #0 802f78e: d03e beq.n 802f80e 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) { 802f790: 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; 802f792: ebc5 0a09 rsb sl, r5, r9 802f796: 4592 cmp sl, r2 802f798: bfa8 it ge 802f79a: 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) { 802f79c: 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; 802f79e: 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) { 802f7a2: d514 bpl.n 802f7ce /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 802f7a4: 2301 movs r3, #1 802f7a6: 9101 str r1, [sp, #4] 802f7a8: 9302 str r3, [sp, #8] 802f7aa: 9400 str r4, [sp, #0] 802f7ac: 2003 movs r0, #3 802f7ae: 4641 mov r1, r8 802f7b0: f10d 0336 add.w r3, sp, #54 ; 0x36 802f7b4: f7ff fedc bl 802f570 802f7b8: 4607 mov r7, r0 802f7ba: 2800 cmp r0, #0 802f7bc: f000 80e9 beq.w 802f992 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); 802f7c0: 9a06 ldr r2, [sp, #24] 802f7c2: 6840 ldr r0, [r0, #4] 802f7c4: 1951 adds r1, r2, r5 802f7c6: 4642 mov r2, r8 802f7c8: f7f2 f8c0 bl 802194c 802f7cc: e00b b.n 802f7e6 #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) { 802f7ce: 2003 movs r0, #3 802f7d0: 4641 mov r1, r8 802f7d2: 2201 movs r2, #1 802f7d4: f7fe f99b bl 802db0e 802f7d8: 4607 mov r7, r0 802f7da: 2800 cmp r0, #0 802f7dc: f000 80d9 beq.w 802f992 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; 802f7e0: 9806 ldr r0, [sp, #24] 802f7e2: 1943 adds r3, r0, r5 802f7e4: 607b str r3, [r7, #4] } pos += seglen; queuelen += pbuf_clen(concat_p); 802f7e6: 4638 mov r0, r7 802f7e8: f7fe fa18 bl 802dc1c #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 802f7ec: 44a8 add r8, r5 802f7ee: fa1f f888 uxth.w r8, r8 queuelen += pbuf_clen(concat_p); 802f7f2: 4458 add r0, fp 802f7f4: 46aa mov sl, r5 802f7f6: 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; 802f7fa: 4645 mov r5, r8 queuelen += pbuf_clen(concat_p); 802f7fc: 4633 mov r3, r6 802f7fe: e007 b.n 802f810 u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; u16_t oversize_used = 0; 802f800: 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 */ 802f802: 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; 802f804: 4633 mov r3, r6 802f806: e000 b.n 802f80a * * 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)) { 802f808: 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; 802f80a: 2700 movs r7, #0 802f80c: e000 b.n 802f810 * * 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)) { 802f80e: 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) { 802f810: 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) { 802f812: 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) { 802f816: 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) { 802f81a: 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) { 802f81e: 9108 str r1, [sp, #32] 802f820: e068 b.n 802f8f4 * 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; 802f822: ebc5 0309 rsb r3, r5, r9 u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 802f826: 9a0a ldr r2, [sp, #40] ; 0x28 802f828: b29b uxth r3, r3 802f82a: 4293 cmp r3, r2 802f82c: bf38 it cc 802f82e: 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) { 802f830: 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; 802f832: 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) { 802f834: b1db cbz r3, 802f86e /* 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) { 802f836: f1d8 0301 rsbs r3, r8, #1 802f83a: 9807 ldr r0, [sp, #28] 802f83c: 9400 str r4, [sp, #0] 802f83e: bf38 it cc 802f840: 2300 movcc r3, #0 802f842: 9001 str r0, [sp, #4] 802f844: 9302 str r3, [sp, #8] 802f846: 4611 mov r1, r2 802f848: 2000 movs r0, #0 802f84a: 9a0a ldr r2, [sp, #40] ; 0x28 802f84c: f10d 0336 add.w r3, sp, #54 ; 0x36 802f850: f7ff fe8e bl 802f570 802f854: 4684 mov ip, r0 802f856: 2800 cmp r0, #0 802f858: f000 809e beq.w 802f998 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); 802f85c: 9a06 ldr r2, [sp, #24] 802f85e: 6840 ldr r0, [r0, #4] 802f860: f8cd c014 str.w ip, [sp, #20] 802f864: 1951 adds r1, r2, r5 802f866: 9a09 ldr r2, [sp, #36] ; 0x24 802f868: f7f2 f870 bl 802194c 802f86c: e019 b.n 802f8a2 */ 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) { 802f86e: 9808 ldr r0, [sp, #32] 802f870: 9909 ldr r1, [sp, #36] ; 0x24 802f872: 2201 movs r2, #1 802f874: f7fe f94b bl 802db0e 802f878: 4603 mov r3, r0 802f87a: 2800 cmp r0, #0 802f87c: f000 808c beq.w 802f998 #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; 802f880: 9806 ldr r0, [sp, #24] 802f882: 1942 adds r2, r0, r5 /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 802f884: 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; 802f886: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 802f888: 4601 mov r1, r0 802f88a: 4602 mov r2, r0 802f88c: 9305 str r3, [sp, #20] 802f88e: f7fe f93e bl 802db0e 802f892: 9b05 ldr r3, [sp, #20] 802f894: b908 cbnz r0, 802f89a /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 802f896: 4618 mov r0, r3 802f898: e013 b.n 802f8c2 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*/); 802f89a: 4619 mov r1, r3 802f89c: 9005 str r0, [sp, #20] 802f89e: f7fe f9d3 bl 802dc48 802f8a2: f8dd c014 ldr.w ip, [sp, #20] } queuelen += pbuf_clen(p); 802f8a6: 4660 mov r0, ip 802f8a8: f8cd c014 str.w ip, [sp, #20] 802f8ac: f7fe f9b6 bl 802dc1c 802f8b0: 4458 add r0, fp 802f8b2: 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)) { 802f8b6: f1bb 0f48 cmp.w fp, #72 ; 0x48 802f8ba: f8dd c014 ldr.w ip, [sp, #20] 802f8be: d903 bls.n 802f8c8 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: queue too long %"U16_F" (%"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); pbuf_free(p); 802f8c0: 4660 mov r0, ip 802f8c2: f7fe f8d7 bl 802da74 goto memerr; 802f8c6: e067 b.n 802f998 } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 802f8c8: 6de3 ldr r3, [r4, #92] ; 0x5c 802f8ca: 2200 movs r2, #0 802f8cc: 18eb adds r3, r5, r3 802f8ce: 9200 str r2, [sp, #0] 802f8d0: 4620 mov r0, r4 802f8d2: 4661 mov r1, ip 802f8d4: f7ff fe78 bl 802f5c8 802f8d8: 4603 mov r3, r0 802f8da: 2800 cmp r0, #0 802f8dc: d05c beq.n 802f998 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) { 802f8de: f1b8 0f00 cmp.w r8, #0 802f8e2: d002 beq.n 802f8ea 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; 802f8e4: 990b ldr r1, [sp, #44] ; 0x2c 802f8e6: 6008 str r0, [r1, #0] 802f8e8: e000 b.n 802f8ec 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) { 802f8ea: 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; 802f8ec: 9a09 ldr r2, [sp, #36] ; 0x24 802f8ee: 930b str r3, [sp, #44] ; 0x2c 802f8f0: 1955 adds r5, r2, r5 802f8f2: 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) { 802f8f4: 454d cmp r5, r9 802f8f6: d394 bcc.n 802f822 /* * 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) { 802f8f8: f1ba 0f00 cmp.w sl, #0 802f8fc: d019 beq.n 802f932 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 802f8fe: 6875 ldr r5, [r6, #4] 802f900: e011 b.n 802f926 p->tot_len += oversize_used; 802f902: 892a ldrh r2, [r5, #8] 802f904: 4452 add r2, sl 802f906: 812a strh r2, [r5, #8] if (p->next == NULL) { 802f908: 682a ldr r2, [r5, #0] 802f90a: b95a cbnz r2, 802f924 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 802f90c: 686a ldr r2, [r5, #4] 802f90e: 8968 ldrh r0, [r5, #10] 802f910: 9906 ldr r1, [sp, #24] 802f912: 9305 str r3, [sp, #20] 802f914: 1810 adds r0, r2, r0 802f916: 4652 mov r2, sl 802f918: f7f2 f818 bl 802194c p->len += oversize_used; 802f91c: 896a ldrh r2, [r5, #10] 802f91e: 9b05 ldr r3, [sp, #20] 802f920: 4452 add r2, sl 802f922: 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) { 802f924: 682d ldr r5, [r5, #0] 802f926: 2d00 cmp r5, #0 802f928: d1eb bne.n 802f902 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; 802f92a: 8932 ldrh r2, [r6, #8] 802f92c: 4492 add sl, r2 802f92e: 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; 802f932: f8bd 2036 ldrh.w r2, [sp, #54] ; 0x36 802f936: 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) { 802f93a: b157 cbz r7, 802f952 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 802f93c: 6870 ldr r0, [r6, #4] 802f93e: 9305 str r3, [sp, #20] 802f940: 4639 mov r1, r7 802f942: f7fe f981 bl 802dc48 last_unsent->len += concat_p->tot_len; 802f946: 8939 ldrh r1, [r7, #8] 802f948: 8932 ldrh r2, [r6, #8] 802f94a: 9b05 ldr r3, [sp, #20] 802f94c: 188a adds r2, r1, r2 802f94e: 8132 strh r2, [r6, #8] 802f950: e003 b.n 802f95a /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 802f952: b916 cbnz r6, 802f95a pcb->unsent = queue; 802f954: f8c4 806c str.w r8, [r4, #108] ; 0x6c 802f958: e001 b.n 802f95e } else { last_unsent->next = queue; 802f95a: f8c6 8000 str.w r8, [r6] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 802f95e: 6de2 ldr r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; pcb->snd_queuelen = queuelen; 802f960: f8a4 b068 strh.w fp, [r4, #104] ; 0x68 } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 802f964: 444a add r2, r9 802f966: 65e2 str r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; 802f968: f8b4 2066 ldrh.w r2, [r4, #102] ; 0x66 802f96c: ebc9 0902 rsb r9, r9, r2 802f970: 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)) { 802f974: b333 cbz r3, 802f9c4 802f976: 68dc ldr r4, [r3, #12] 802f978: b30c cbz r4, 802f9be 802f97a: 9b07 ldr r3, [sp, #28] 802f97c: f003 0502 and.w r5, r3, #2 802f980: b2ed uxtb r5, r5 802f982: b9e5 cbnz r5, 802f9be TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 802f984: 2008 movs r0, #8 802f986: 89a6 ldrh r6, [r4, #12] 802f988: f7fc ff36 bl 802c7f8 802f98c: 4330 orrs r0, r6 802f98e: 81a0 strh r0, [r4, #12] 802f990: e015 b.n 802f9be */ 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; 802f992: f04f 0800 mov.w r8, #0 802f996: 4647 mov r7, r8 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: pcb->flags |= TF_NAGLEMEMERR; 802f998: 7fa3 ldrb r3, [r4, #30] 802f99a: f063 037f orn r3, r3, #127 ; 0x7f 802f99e: 77a3 strb r3, [r4, #30] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 802f9a0: b117 cbz r7, 802f9a8 pbuf_free(concat_p); 802f9a2: 4638 mov r0, r7 802f9a4: f7fe f866 bl 802da74 } if (queue != NULL) { 802f9a8: f1b8 0f00 cmp.w r8, #0 802f9ac: d009 beq.n 802f9c2 tcp_segs_free(queue); 802f9ae: 4640 mov r0, r8 802f9b0: f7fe fb1b bl 802dfea 802f9b4: e005 b.n 802f9c2 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)", 802f9b6: 23f2 movs r3, #242 ; 0xf2 802f9b8: e004 b.n 802f9c4 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; 802f9ba: 23f3 movs r3, #243 ; 0xf3 802f9bc: e002 b.n 802f9c4 /* 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; 802f9be: 2300 movs r3, #0 802f9c0: e000 b.n 802f9c4 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; 802f9c2: 23ff movs r3, #255 ; 0xff 802f9c4: b258 sxtb r0, r3 } 802f9c6: b00f add sp, #60 ; 0x3c 802f9c8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802f9cc : 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)) { 802f9cc: f8b0 3068 ldrh.w r3, [r0, #104] ; 0x68 802f9d0: 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) { 802f9d2: b573 push {r0, r1, r4, r5, r6, lr} 802f9d4: 4604 mov r4, r0 802f9d6: 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)) { 802f9d8: d900 bls.n 802f9dc 802f9da: e014 b.n 802fa06 /* 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) { 802f9dc: 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; 802f9e0: 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); 802f9e4: 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) { 802f9e6: 2b00 cmp r3, #0 802f9e8: d038 beq.n 802fa5c 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) { 802f9ea: 2000 movs r0, #0 802f9ec: 4602 mov r2, r0 802f9ee: f7fe f88e bl 802db0e 802f9f2: 4601 mov r1, r0 802f9f4: b900 cbnz r0, 802f9f8 802f9f6: e006 b.n 802fa06 } 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) { 802f9f8: 9600 str r6, [sp, #0] 802f9fa: 4620 mov r0, r4 802f9fc: 462a mov r2, r5 802f9fe: 6de3 ldr r3, [r4, #92] ; 0x5c 802fa00: f7ff fde2 bl 802f5c8 802fa04: b920 cbnz r0, 802fa10 pcb->flags |= TF_NAGLEMEMERR; 802fa06: 7fa3 ldrb r3, [r4, #30] 802fa08: f063 037f orn r3, r3, #127 ; 0x7f 802fa0c: 77a3 strb r3, [r4, #30] 802fa0e: e025 b.n 802fa5c 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) { 802fa10: 6ee3 ldr r3, [r4, #108] ; 0x6c 802fa12: b913 cbnz r3, 802fa1a pcb->unsent = seg; 802fa14: 66e0 str r0, [r4, #108] ; 0x6c 802fa16: e004 b.n 802fa22 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 802fa18: 4613 mov r3, r2 802fa1a: 681a ldr r2, [r3, #0] 802fa1c: 2a00 cmp r2, #0 802fa1e: d1fb bne.n 802fa18 useg->next = seg; 802fa20: 6018 str r0, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 802fa22: 2300 movs r3, #0 #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 802fa24: 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; 802fa26: 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)) { 802fa2a: d007 beq.n 802fa3c pcb->snd_lbb++; 802fa2c: 6de3 ldr r3, [r4, #92] ; 0x5c 802fa2e: 3301 adds r3, #1 802fa30: 65e3 str r3, [r4, #92] ; 0x5c /* optlen does not influence snd_buf */ pcb->snd_buf--; 802fa32: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 802fa36: 3b01 subs r3, #1 802fa38: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 } if (flags & TCP_FIN) { 802fa3c: 07ea lsls r2, r5, #31 802fa3e: d503 bpl.n 802fa48 pcb->flags |= TF_FIN; 802fa40: 7fa3 ldrb r3, [r4, #30] 802fa42: f043 0320 orr.w r3, r3, #32 802fa46: 77a3 strb r3, [r4, #30] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 802fa48: 6840 ldr r0, [r0, #4] 802fa4a: f8b4 5068 ldrh.w r5, [r4, #104] ; 0x68 802fa4e: f7fe f8e5 bl 802dc1c 802fa52: 1940 adds r0, r0, r5 802fa54: 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; 802fa58: 2000 movs r0, #0 802fa5a: e000 b.n 802fa5e * 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; 802fa5c: 20ff movs r0, #255 ; 0xff LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; } 802fa5e: b240 sxtb r0, r0 802fa60: bd7c pop {r2, r3, r4, r5, r6, pc} 0802fa62 : * @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) { 802fa62: b5f8 push {r3, r4, r5, r6, r7, lr} /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 802fa64: 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) { 802fa66: 4605 mov r5, r0 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 802fa68: b90c cbnz r4, 802fa6e 802fa6a: e00a b.n 802fa82 struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 802fa6c: 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; 802fa6e: 6823 ldr r3, [r4, #0] 802fa70: 2b00 cmp r3, #0 802fa72: d1fb bne.n 802fa6c last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 802fa74: 68e3 ldr r3, [r4, #12] 802fa76: 8998 ldrh r0, [r3, #12] 802fa78: f7fc fec3 bl 802c802 802fa7c: f010 0607 ands.w r6, r0, #7 802fa80: d005 beq.n 802fa8e pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 802fa82: 4628 mov r0, r5 802fa84: 2101 movs r1, #1 } 802fa86: 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); 802fa8a: f7ff bf9f b.w 802f9cc 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); 802fa8e: 68e4 ldr r4, [r4, #12] 802fa90: 2001 movs r0, #1 802fa92: 89a7 ldrh r7, [r4, #12] 802fa94: f7fc feb0 bl 802c7f8 802fa98: 4338 orrs r0, r7 802fa9a: 81a0 strh r0, [r4, #12] pcb->flags |= TF_FIN; 802fa9c: 7fab ldrb r3, [r5, #30] 802fa9e: f043 0320 orr.w r3, r3, #32 802faa2: 77ab strb r3, [r5, #30] return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); } 802faa4: 4630 mov r0, r6 802faa6: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802faa8 : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 802faa8: b537 push {r0, r1, r2, r4, r5, lr} 802faaa: 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)); 802faac: 6d00 ldr r0, [r0, #80] ; 0x50 802faae: f7fc fead bl 802c80c 802fab2: 2100 movs r1, #0 802fab4: 4602 mov r2, r0 802fab6: 4620 mov r0, r4 802fab8: f7ff fdd8 bl 802f66c if (p == NULL) { 802fabc: 4605 mov r5, r0 802fabe: b188 cbz r0, 802fae4 } 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); 802fac0: 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, 802fac2: 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); 802fac4: 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, 802fac8: 9200 str r2, [sp, #0] 802faca: 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); 802facc: 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, 802face: 9201 str r2, [sp, #4] 802fad0: 7aa3 ldrb r3, [r4, #10] 802fad2: 4621 mov r1, r4 802fad4: 1d22 adds r2, r4, #4 802fad6: f001 f8ab bl 8030c30 IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802fada: 4628 mov r0, r5 802fadc: f7fd ffca bl 802da74 return ERR_OK; 802fae0: 2000 movs r0, #0 802fae2: e000 b.n 802fae6 #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; 802fae4: 20fe movs r0, #254 ; 0xfe IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); return ERR_OK; } 802fae6: b240 sxtb r0, r0 802fae8: bd3e pop {r1, r2, r3, r4, r5, pc} 802faea: 0000 movs r0, r0 0802faec : /* 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) { 802faec: 4b8f ldr r3, [pc, #572] ; (802fd2c ) 802faee: 681b ldr r3, [r3, #0] 802faf0: 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) { 802faf2: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802faf6: 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) { 802faf8: f000 8113 beq.w 802fd22 return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 802fafc: f8b0 304c ldrh.w r3, [r0, #76] ; 0x4c 802fb00: f8b0 9060 ldrh.w r9, [r0, #96] ; 0x60 seg = pcb->unsent; 802fb04: 6ec5 ldr r5, [r0, #108] ; 0x6c with. */ if (tcp_input_pcb == pcb) { return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 802fb06: 4599 cmp r9, r3 802fb08: bf28 it cs 802fb0a: 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 && 802fb0c: 7f83 ldrb r3, [r0, #30] 802fb0e: f003 0302 and.w r3, r3, #2 802fb12: b2db uxtb r3, r3 802fb14: b183 cbz r3, 802fb38 802fb16: b92d cbnz r5, 802fb24 (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 802fb18: 4620 mov r0, r4 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 802fb1a: b003 add sp, #12 802fb1c: 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); 802fb20: f7ff bfc2 b.w 802faa8 * * 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)) { 802fb24: 68eb ldr r3, [r5, #12] 802fb26: 6858 ldr r0, [r3, #4] 802fb28: f7fc fe72 bl 802c810 802fb2c: 892a ldrh r2, [r5, #8] 802fb2e: 6ca3 ldr r3, [r4, #72] ; 0x48 802fb30: 1ad3 subs r3, r2, r3 802fb32: 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 || 802fb34: 4548 cmp r0, r9 802fb36: d8ef bhi.n 802fb18 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; 802fb38: 6f26 ldr r6, [r4, #112] ; 0x70 if (useg != NULL) { 802fb3a: b90e cbnz r6, 802fb40 802fb3c: e0d1 b.n 802fce2 for (; useg->next != NULL; useg = useg->next); 802fb3e: 461e mov r6, r3 802fb40: 6833 ldr r3, [r6, #0] 802fb42: 2b00 cmp r3, #0 802fb44: d1fb bne.n 802fb3e 802fb46: e0cc b.n 802fce2 } #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!", 802fb48: 68eb ldr r3, [r5, #12] 802fb4a: 8998 ldrh r0, [r3, #12] 802fb4c: f7fc fe59 bl 802c802 * - 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) && 802fb50: 6f23 ldr r3, [r4, #112] ; 0x70 802fb52: b19b cbz r3, 802fb7c 802fb54: 7fa2 ldrb r2, [r4, #30] 802fb56: f012 0f44 tst.w r2, #68 ; 0x44 802fb5a: d10f bne.n 802fb7c 802fb5c: 6ee3 ldr r3, [r4, #108] ; 0x6c 802fb5e: b12b cbz r3, 802fb6c 802fb60: 6819 ldr r1, [r3, #0] 802fb62: b959 cbnz r1, 802fb7c 802fb64: 8919 ldrh r1, [r3, #8] 802fb66: 8ee3 ldrh r3, [r4, #54] ; 0x36 802fb68: 4299 cmp r1, r3 802fb6a: d207 bcs.n 802fb7c 802fb6c: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 802fb70: b123 cbz r3, 802fb7c 802fb72: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 802fb76: 2b47 cmp r3, #71 ; 0x47 802fb78: f240 80ce bls.w 802fd18 pcb->lastack, ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ pcb->unsent = seg->next; 802fb7c: 682b ldr r3, [r5, #0] 802fb7e: 66e3 str r3, [r4, #108] ; 0x6c if (pcb->state != SYN_SENT) { 802fb80: 7e23 ldrb r3, [r4, #24] 802fb82: 2b02 cmp r3, #2 802fb84: d00c beq.n 802fba0 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 802fb86: 68ef ldr r7, [r5, #12] 802fb88: 2010 movs r0, #16 802fb8a: f8b7 b00c ldrh.w fp, [r7, #12] 802fb8e: f7fc fe33 bl 802c7f8 802fb92: ea40 000b orr.w r0, r0, fp 802fb96: 81b8 strh r0, [r7, #12] pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 802fb98: 7fa3 ldrb r3, [r4, #30] 802fb9a: f023 0303 bic.w r3, r3, #3 802fb9e: 77a3 strb r3, [r4, #30] u16_t len; struct netif *netif; u32_t *opts; /** @bug Exclude retransmitted segments from this count. */ snmp_inc_tcpoutsegs(); 802fba0: f002 fd64 bl 803266c /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = htonl(pcb->rcv_nxt); 802fba4: 6aa0 ldr r0, [r4, #40] ; 0x28 802fba6: 68ef ldr r7, [r5, #12] 802fba8: f7fc fe30 bl 802c80c 802fbac: 60b8 str r0, [r7, #8] /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); 802fbae: 8de0 ldrh r0, [r4, #46] ; 0x2e 802fbb0: 68ef ldr r7, [r5, #12] 802fbb2: f7fc fe21 bl 802c7f8 802fbb6: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 802fbb8: 8de2 ldrh r2, [r4, #46] ; 0x2e 802fbba: 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); 802fbbc: 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; 802fbbe: 18d3 adds r3, r2, r3 802fbc0: 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) { 802fbc2: 7aab ldrb r3, [r5, #10] 802fbc4: 07d8 lsls r0, r3, #31 802fbc6: d509 bpl.n 802fbdc u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 802fbc8: 4641 mov r1, r8 802fbca: f240 50b4 movw r0, #1460 ; 0x5b4 802fbce: f7fe fde4 bl 802e79a #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ *opts = TCP_BUILD_MSS_OPTION(mss); 802fbd2: f040 7001 orr.w r0, r0, #33816576 ; 0x2040000 802fbd6: f7fc fe19 bl 802c80c 802fbda: 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) { 802fbdc: f9b4 3034 ldrsh.w r3, [r4, #52] ; 0x34 802fbe0: 3301 adds r3, #1 802fbe2: d101 bne.n 802fbe8 pcb->rtime = 0; 802fbe4: 2300 movs r3, #0 802fbe6: 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))) { 802fbe8: 6823 ldr r3, [r4, #0] 802fbea: b92b cbnz r3, 802fbf8 netif = ip_route(&(pcb->remote_ip)); 802fbec: 4640 mov r0, r8 802fbee: f000 fecb bl 8030988 if (netif == NULL) { 802fbf2: b310 cbz r0, 802fc3a return; } ip_addr_copy(pcb->local_ip, netif->ip_addr); 802fbf4: 6843 ldr r3, [r0, #4] 802fbf6: 6023 str r3, [r4, #0] } if (pcb->rttest == 0) { 802fbf8: 6ba3 ldr r3, [r4, #56] ; 0x38 802fbfa: b93b cbnz r3, 802fc0c pcb->rttest = tcp_ticks; 802fbfc: f8da 3000 ldr.w r3, [sl] 802fc00: 63a3 str r3, [r4, #56] ; 0x38 pcb->rtseq = ntohl(seg->tcphdr->seqno); 802fc02: 68eb ldr r3, [r5, #12] 802fc04: 6858 ldr r0, [r3, #4] 802fc06: f7fc fe03 bl 802c810 802fc0a: 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); 802fc0c: 6868 ldr r0, [r5, #4] 802fc0e: 68eb ldr r3, [r5, #12] 802fc10: 6842 ldr r2, [r0, #4] seg->p->len -= len; 802fc12: 8941 ldrh r1, [r0, #10] seg->p->tot_len -= len; seg->p->payload = seg->tcphdr; 802fc14: 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); 802fc16: 1a9a subs r2, r3, r2 seg->p->len -= len; 802fc18: 1a89 subs r1, r1, r2 802fc1a: 8141 strh r1, [r0, #10] seg->p->tot_len -= len; 802fc1c: 8901 ldrh r1, [r0, #8] 802fc1e: 1a8a subs r2, r1, r2 802fc20: 8102 strh r2, [r0, #8] seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; 802fc22: 2200 movs r2, #0 802fc24: 741a strb r2, [r3, #16] 802fc26: 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, 802fc28: 7a62 ldrb r2, [r4, #9] 802fc2a: 7aa3 ldrb r3, [r4, #10] 802fc2c: 9200 str r2, [sp, #0] 802fc2e: 2206 movs r2, #6 802fc30: 9201 str r2, [sp, #4] 802fc32: 4621 mov r1, r4 802fc34: 4642 mov r2, r8 802fc36: f000 fffb bl 8030c30 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); 802fc3a: 68eb ldr r3, [r5, #12] 802fc3c: 6858 ldr r0, [r3, #4] 802fc3e: f7fc fde7 bl 802c810 802fc42: 68ea ldr r2, [r5, #12] 802fc44: f8b5 b008 ldrh.w fp, [r5, #8] 802fc48: 4607 mov r7, r0 802fc4a: 8990 ldrh r0, [r2, #12] 802fc4c: f7fc fdd9 bl 802c802 802fc50: f010 0003 ands.w r0, r0, #3 802fc54: bf18 it ne 802fc56: 2001 movne r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 802fc58: 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); 802fc5a: eb0b 0300 add.w r3, fp, r0 802fc5e: 19db adds r3, r3, r7 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 802fc60: 1ad2 subs r2, r2, r3 802fc62: 2a00 cmp r2, #0 pcb->snd_nxt = snd_nxt; 802fc64: bfb8 it lt 802fc66: 6523 strlt r3, [r4, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 802fc68: 68eb ldr r3, [r5, #12] 802fc6a: 892f ldrh r7, [r5, #8] 802fc6c: 8998 ldrh r0, [r3, #12] 802fc6e: f7fc fdc8 bl 802c802 802fc72: f010 0003 ands.w r0, r0, #3 802fc76: bf18 it ne 802fc78: 2001 movne r0, #1 802fc7a: 1838 adds r0, r7, r0 802fc7c: b360 cbz r0, 802fcd8 seg->next = NULL; 802fc7e: 2300 movs r3, #0 802fc80: 602b str r3, [r5, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 802fc82: 6f23 ldr r3, [r4, #112] ; 0x70 802fc84: b90b cbnz r3, 802fc8a pcb->unacked = seg; 802fc86: 6725 str r5, [r4, #112] ; 0x70 802fc88: e024 b.n 802fcd4 /* 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))) { 802fc8a: 68eb ldr r3, [r5, #12] 802fc8c: 6858 ldr r0, [r3, #4] 802fc8e: f7fc fdbf bl 802c810 802fc92: 68f3 ldr r3, [r6, #12] 802fc94: 4607 mov r7, r0 802fc96: 6858 ldr r0, [r3, #4] 802fc98: f7fc fdba bl 802c810 802fc9c: 1a38 subs r0, r7, r0 802fc9e: 2800 cmp r0, #0 802fca0: da17 bge.n 802fcd2 /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 802fca2: f104 0770 add.w r7, r4, #112 ; 0x70 while (*cur_seg && 802fca6: e000 b.n 802fcaa TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802fca8: 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 && 802fcaa: 683b ldr r3, [r7, #0] 802fcac: b91b cbnz r3, 802fcb6 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); 802fcae: 683b ldr r3, [r7, #0] 802fcb0: 602b str r3, [r5, #0] (*cur_seg) = seg; 802fcb2: 603d str r5, [r7, #0] 802fcb4: e013 b.n 802fcde * 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))) { 802fcb6: 68db ldr r3, [r3, #12] 802fcb8: 6858 ldr r0, [r3, #4] 802fcba: f7fc fda9 bl 802c810 802fcbe: 68eb ldr r3, [r5, #12] 802fcc0: 4683 mov fp, r0 802fcc2: 6858 ldr r0, [r3, #4] 802fcc4: f7fc fda4 bl 802c810 802fcc8: 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 && 802fccc: 2800 cmp r0, #0 802fcce: dbeb blt.n 802fca8 802fcd0: e7ed b.n 802fcae } seg->next = (*cur_seg); (*cur_seg) = seg; } else { /* add segment to tail of unacked list */ useg->next = seg; 802fcd2: 6035 str r5, [r6, #0] 802fcd4: 462e mov r6, r5 802fcd6: e002 b.n 802fcde useg = useg->next; } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 802fcd8: 4628 mov r0, r5 802fcda: f7fe f978 bl 802dfce } seg = pcb->unsent; 802fcde: 6ee5 ldr r5, [r4, #108] ; 0x6c 802fce0: e003 b.n 802fcea } ip_addr_copy(pcb->local_ip, netif->ip_addr); } if (pcb->rttest == 0) { pcb->rttest = tcp_ticks; 802fce2: f8df a04c ldr.w sl, [pc, #76] ; 802fd30 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); 802fce6: 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 && 802fcea: b915 cbnz r5, 802fcf2 tcp_seg_free(seg); } seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 802fcec: 6ee3 ldr r3, [r4, #108] ; 0x6c 802fcee: b973 cbnz r3, 802fd0e 802fcf0: e00b b.n 802fd0a 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) { 802fcf2: 68eb ldr r3, [r5, #12] 802fcf4: 6858 ldr r0, [r3, #4] 802fcf6: f7fc fd8b bl 802c810 802fcfa: 892a ldrh r2, [r5, #8] 802fcfc: 6ca3 ldr r3, [r4, #72] ; 0x48 802fcfe: 1ad3 subs r3, r2, r3 802fd00: 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 && 802fd02: 4548 cmp r0, r9 802fd04: f67f af20 bls.w 802fb48 802fd08: e7f0 b.n 802fcec seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 802fd0a: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; 802fd0e: 7fa3 ldrb r3, [r4, #30] 802fd10: f003 037f and.w r3, r3, #127 ; 0x7f 802fd14: 77a3 strb r3, [r4, #30] return ERR_OK; 802fd16: e004 b.n 802fd22 * - 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) && 802fd18: f012 0fa0 tst.w r2, #160 ; 0xa0 802fd1c: f47f af2e bne.w 802fb7c 802fd20: e7e4 b.n 802fcec } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 802fd22: 2000 movs r0, #0 802fd24: b003 add sp, #12 802fd26: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802fd2a: bf00 nop 802fd2c: 20011094 .word 0x20011094 802fd30: 20011080 .word 0x20011080 0802fd34 : */ 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) { 802fd34: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802fd38: 4681 mov r9, r0 802fd3a: 460d mov r5, r1 802fd3c: 4690 mov r8, r2 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 802fd3e: 2001 movs r0, #1 802fd40: 2114 movs r1, #20 802fd42: 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) { 802fd44: 461f mov r7, r3 802fd46: f8bd b030 ldrh.w fp, [sp, #48] ; 0x30 802fd4a: f8bd a034 ldrh.w sl, [sp, #52] ; 0x34 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 802fd4e: f7fd fede bl 802db0e if (p == NULL) { 802fd52: 4606 mov r6, r0 802fd54: 2800 cmp r0, #0 802fd56: d030 beq.n 802fdba return; } LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= sizeof(struct tcp_hdr))); tcphdr = (struct tcp_hdr *)p->payload; 802fd58: 6844 ldr r4, [r0, #4] tcphdr->src = htons(local_port); 802fd5a: 4658 mov r0, fp 802fd5c: f7fc fd4c bl 802c7f8 802fd60: 8020 strh r0, [r4, #0] tcphdr->dest = htons(remote_port); 802fd62: 4650 mov r0, sl 802fd64: f7fc fd48 bl 802c7f8 802fd68: 8060 strh r0, [r4, #2] tcphdr->seqno = htonl(seqno); 802fd6a: 4648 mov r0, r9 802fd6c: f7fc fd4e bl 802c80c 802fd70: 6060 str r0, [r4, #4] tcphdr->ackno = htonl(ackno); 802fd72: 4628 mov r0, r5 802fd74: f7fc fd4a bl 802c80c 802fd78: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 802fd7a: f245 0014 movw r0, #20500 ; 0x5014 802fd7e: f7fc fd3b bl 802c7f8 tcphdr->wnd = PP_HTONS(TCP_WND); 802fd82: 2316 movs r3, #22 802fd84: 2500 movs r5, #0 802fd86: 73a3 strb r3, [r4, #14] 802fd88: 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); 802fd8c: 81a0 strh r0, [r4, #12] tcphdr->wnd = PP_HTONS(TCP_WND); 802fd8e: 73e3 strb r3, [r4, #15] tcphdr->chksum = 0; 802fd90: 7425 strb r5, [r4, #16] 802fd92: 7465 strb r5, [r4, #17] tcphdr->urgp = 0; 802fd94: 74a5 strb r5, [r4, #18] 802fd96: 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(); 802fd98: f002 fc80 bl 803269c /* 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); 802fd9c: 2306 movs r3, #6 802fd9e: 9301 str r3, [sp, #4] 802fda0: 9500 str r5, [sp, #0] 802fda2: 4630 mov r0, r6 802fda4: 4641 mov r1, r8 802fda6: 463a mov r2, r7 802fda8: 23ff movs r3, #255 ; 0xff 802fdaa: f000 ff41 bl 8030c30 pbuf_free(p); 802fdae: 4630 mov r0, r6 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 802fdb0: b003 add sp, #12 802fdb2: 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); 802fdb6: f7fd be5d b.w 802da74 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 802fdba: b003 add sp, #12 802fdbc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802fdc0 : void tcp_rexmit_rto(struct tcp_pcb *pcb) { struct tcp_seg *seg; if (pcb->unacked == NULL) { 802fdc0: 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) { 802fdc2: b510 push {r4, lr} struct tcp_seg *seg; if (pcb->unacked == NULL) { 802fdc4: b19a cbz r2, 802fdee 802fdc6: 4611 mov r1, r2 802fdc8: e000 b.n 802fdcc return; } /* Move all unacked segments to the head of the unsent queue */ for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 802fdca: 4619 mov r1, r3 802fdcc: 680b ldr r3, [r1, #0] 802fdce: 2b00 cmp r3, #0 802fdd0: d1fb bne.n 802fdca /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 802fdd2: 6ec4 ldr r4, [r0, #108] ; 0x6c 802fdd4: 600c str r4, [r1, #0] /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 802fdd6: 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; 802fdd8: 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; 802fddc: 6703 str r3, [r0, #112] ; 0x70 /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 802fdde: 3201 adds r2, #1 802fde0: f880 2046 strb.w r2, [r0, #70] ; 0x46 /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 802fde4: 6383 str r3, [r0, #56] ; 0x38 /* Do the actual retransmission */ tcp_output(pcb); } 802fde6: 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); 802fdea: f7ff be7f b.w 802faec 802fdee: bd10 pop {r4, pc} 0802fdf0 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 802fdf0: b5f8 push {r3, r4, r5, r6, r7, lr} struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 802fdf2: 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) { 802fdf4: 4604 mov r4, r0 struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 802fdf6: 2d00 cmp r5, #0 802fdf8: d027 beq.n 802fe4a } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 802fdfa: 682b ldr r3, [r5, #0] cur_seg = &(pcb->unsent); 802fdfc: 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; 802fe00: 6703 str r3, [r0, #112] ; 0x70 cur_seg = &(pcb->unsent); while (*cur_seg && 802fe02: e000 b.n 802fe06 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802fe04: 6836 ldr r6, [r6, #0] /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 802fe06: 6833 ldr r3, [r6, #0] 802fe08: b92b cbnz r3, 802fe16 TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; 802fe0a: 6833 ldr r3, [r6, #0] 802fe0c: 602b str r3, [r5, #0] *cur_seg = seg; 802fe0e: 6035 str r5, [r6, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 802fe10: 682b ldr r3, [r5, #0] 802fe12: b97b cbnz r3, 802fe34 802fe14: e00c b.n 802fe30 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))) { 802fe16: 68db ldr r3, [r3, #12] 802fe18: 6858 ldr r0, [r3, #4] 802fe1a: f7fc fcf9 bl 802c810 802fe1e: 68eb ldr r3, [r5, #12] 802fe20: 4607 mov r7, r0 802fe22: 6858 ldr r0, [r3, #4] 802fe24: f7fc fcf4 bl 802c810 802fe28: 1a38 subs r0, r7, r0 /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 802fe2a: 2800 cmp r0, #0 802fe2c: dbea blt.n 802fe04 802fe2e: e7ec b.n 802fe0a 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; 802fe30: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ ++pcb->nrtx; 802fe34: f894 3046 ldrb.w r3, [r4, #70] ; 0x46 802fe38: 3301 adds r3, #1 802fe3a: f884 3046 strb.w r3, [r4, #70] ; 0x46 /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 802fe3e: 2300 movs r3, #0 802fe40: 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. */ } 802fe42: 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(); 802fe46: f002 bc19 b.w 803267c 802fe4a: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802fe4c : * @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)) { 802fe4c: 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) { 802fe4e: b510 push {r4, lr} 802fe50: 4604 mov r4, r0 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 802fe52: b333 cbz r3, 802fea2 802fe54: 7f83 ldrb r3, [r0, #30] 802fe56: f003 0304 and.w r3, r3, #4 802fe5a: b2db uxtb r3, r3 802fe5c: bb0b cbnz r3, 802fea2 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); 802fe5e: f7ff ffc7 bl 802fdf0 /* Set ssthresh to half of the minimum of the current * cwnd and the advertised window */ if (pcb->cwnd > pcb->snd_wnd) { 802fe62: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 802fe66: f8b4 2060 ldrh.w r2, [r4, #96] ; 0x60 802fe6a: 4293 cmp r3, r2 802fe6c: d903 bls.n 802fe76 pcb->ssthresh = pcb->snd_wnd / 2; 802fe6e: 0852 lsrs r2, r2, #1 802fe70: f8a4 204e strh.w r2, [r4, #78] ; 0x4e 802fe74: e002 b.n 802fe7c } else { pcb->ssthresh = pcb->cwnd / 2; 802fe76: 085b lsrs r3, r3, #1 802fe78: f8a4 304e strh.w r3, [r4, #78] ; 0x4e } /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < 2*pcb->mss) { 802fe7c: 8ee3 ldrh r3, [r4, #54] ; 0x36 802fe7e: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 802fe82: 005a lsls r2, r3, #1 802fe84: 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; 802fe86: bfb8 it lt 802fe88: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 802fe8c: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 802fe90: 2103 movs r1, #3 802fe92: fb01 2303 mla r3, r1, r3, r2 802fe96: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->flags |= TF_INFR; 802fe9a: 7fa3 ldrb r3, [r4, #30] 802fe9c: f043 0304 orr.w r3, r3, #4 802fea0: 77a3 strb r3, [r4, #30] 802fea2: bd10 pop {r4, pc} 0802fea4 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ void tcp_keepalive(struct tcp_pcb *pcb) { 802fea4: b537 push {r0, r1, r2, r4, r5, lr} 802fea6: 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)); 802fea8: 6d00 ldr r0, [r0, #80] ; 0x50 802feaa: 3801 subs r0, #1 802feac: f7fc fcae bl 802c80c 802feb0: 2100 movs r1, #0 802feb2: 4602 mov r2, r0 802feb4: 4620 mov r0, r4 802feb6: f7ff fbd9 bl 802f66c if(p == NULL) { 802feba: 4605 mov r5, r0 802febc: b178 cbz r0, 802fede /* 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); 802febe: 2200 movs r2, #0 802fec0: f04f 0e06 mov.w lr, #6 802fec4: e88d 4004 stmia.w sp, {r2, lr} 802fec8: 7aa3 ldrb r3, [r4, #10] 802feca: 4621 mov r1, r4 802fecc: 1d22 adds r2, r4, #4 802fece: f000 feaf bl 8030c30 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802fed2: 4628 mov r0, r5 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802fed4: b003 add sp, #12 802fed6: 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); 802feda: f7fd bdcb b.w 802da74 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802fede: b003 add sp, #12 802fee0: bd30 pop {r4, r5, pc} 0802fee2 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 802fee2: 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; 802fee6: 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) { 802fee8: 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) { 802feea: b914 cbnz r4, 802fef2 seg = pcb->unsent; 802feec: 6ec4 ldr r4, [r0, #108] ; 0x6c } if(seg == NULL) { 802feee: 2c00 cmp r4, #0 802fef0: d042 beq.n 802ff78 return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 802fef2: 68e3 ldr r3, [r4, #12] 802fef4: 8998 ldrh r0, [r3, #12] 802fef6: f7fc fc84 bl 802c802 802fefa: f010 0001 ands.w r0, r0, #1 802fefe: d005 beq.n 802ff0c 802ff00: 8921 ldrh r1, [r4, #8] 802ff02: f1d1 0101 rsbs r1, r1, #1 802ff06: bf38 it cc 802ff08: 2100 movcc r1, #0 802ff0a: e000 b.n 802ff0e 802ff0c: 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); 802ff0e: 68e3 ldr r3, [r4, #12] } if(seg == NULL) { return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 802ff10: 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); 802ff14: 4628 mov r0, r5 802ff16: f081 0101 eor.w r1, r1, #1 802ff1a: 685a ldr r2, [r3, #4] 802ff1c: f7ff fba6 bl 802f66c if(p == NULL) { 802ff20: 4606 mov r6, r0 802ff22: 2800 cmp r0, #0 802ff24: d028 beq.n 802ff78 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return; } tcphdr = (struct tcp_hdr *)p->payload; 802ff26: 6847 ldr r7, [r0, #4] if (is_fin) { 802ff28: f1b8 0f00 cmp.w r8, #0 802ff2c: d009 beq.n 802ff42 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 802ff2e: 89bc ldrh r4, [r7, #12] 802ff30: 2011 movs r0, #17 802ff32: f7fc fc61 bl 802c7f8 802ff36: f424 547c bic.w r4, r4, #16128 ; 0x3f00 802ff3a: b2a4 uxth r4, r4 802ff3c: 4320 orrs r0, r4 802ff3e: 81b8 strh r0, [r7, #12] 802ff40: e009 b.n 802ff56 /* 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); 802ff42: 6860 ldr r0, [r4, #4] 802ff44: 8923 ldrh r3, [r4, #8] 802ff46: 8902 ldrh r2, [r0, #8] 802ff48: 1ad3 subs r3, r2, r3 802ff4a: f107 0114 add.w r1, r7, #20 802ff4e: 2201 movs r2, #1 802ff50: b29b uxth r3, r3 802ff52: f7fd fedd bl 802dd10 /* 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); 802ff56: 2200 movs r2, #0 802ff58: f04f 0c06 mov.w ip, #6 802ff5c: e88d 1004 stmia.w sp, {r2, ip} 802ff60: 7aab ldrb r3, [r5, #10] 802ff62: 4630 mov r0, r6 802ff64: 4629 mov r1, r5 802ff66: 1d2a adds r2, r5, #4 802ff68: f000 fe62 bl 8030c30 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802ff6c: 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)); } 802ff6e: b002 add sp, #8 802ff70: 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); 802ff74: f7fd bd7e b.w 802da74 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802ff78: b002 add sp, #8 802ff7a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802ff7e: 0000 movs r0, r0 0802ff80 : 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 */ { 802ff80: b570 push {r4, r5, r6, lr} 802ff82: 4604 mov r4, r0 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 802ff84: 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 */ { 802ff86: 460d mov r5, r1 802ff88: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 802ff8a: f7fd fc53 bl 802d834 if (timeout == NULL) { 802ff8e: 4603 mov r3, r0 802ff90: b308 cbz r0, 802ffd6 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) { 802ff92: 4911 ldr r1, [pc, #68] ; (802ffd8 ) 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; 802ff94: 2200 movs r2, #0 timeout->h = handler; timeout->arg = arg; timeout->time = msecs; 802ff96: 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) { 802ff9a: 680a ldr r2, [r1, #0] 802ff9c: b902 cbnz r2, 802ffa0 802ff9e: e005 b.n 802ffac next_timeout = timeout; return; } if (next_timeout->time > msecs) { 802ffa0: 6850 ldr r0, [r2, #4] 802ffa2: 42a0 cmp r0, r4 802ffa4: d90c bls.n 802ffc0 next_timeout->time -= msecs; 802ffa6: 1b04 subs r4, r0, r4 802ffa8: 6054 str r4, [r2, #4] timeout->next = next_timeout; 802ffaa: 601a str r2, [r3, #0] next_timeout = timeout; 802ffac: 600b str r3, [r1, #0] 802ffae: 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) { 802ffb0: 684c ldr r4, [r1, #4] 802ffb2: 4284 cmp r4, r0 802ffb4: d80c bhi.n 802ffd0 802ffb6: 460a mov r2, r1 802ffb8: e002 b.n 802ffc0 if (t->next != NULL) { t->next->time -= timeout->time; } timeout->next = t->next; 802ffba: 6019 str r1, [r3, #0] t->next = timeout; 802ffbc: 6013 str r3, [r2, #0] break; 802ffbe: 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; 802ffc0: 6851 ldr r1, [r2, #4] 802ffc2: 6858 ldr r0, [r3, #4] 802ffc4: 1a40 subs r0, r0, r1 if (t->next == NULL || t->next->time > timeout->time) { 802ffc6: 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; 802ffc8: 6058 str r0, [r3, #4] if (t->next == NULL || t->next->time > timeout->time) { 802ffca: 2900 cmp r1, #0 802ffcc: d1f0 bne.n 802ffb0 802ffce: e7f4 b.n 802ffba if (t->next != NULL) { t->next->time -= timeout->time; 802ffd0: 1a20 subs r0, r4, r0 802ffd2: 6048 str r0, [r1, #4] 802ffd4: e7f1 b.n 802ffba 802ffd6: bd70 pop {r4, r5, r6, pc} 802ffd8: 2000e1c0 .word 0x2000e1c0 0802ffdc : } #endif /* LWIP_DNS */ /** Initialize this module */ void sys_timeouts_init(void) { 802ffdc: 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); 802ffde: 2200 movs r2, #0 802ffe0: f241 3088 movw r0, #5000 ; 0x1388 802ffe4: 4908 ldr r1, [pc, #32] ; (8030008 ) 802ffe6: f7ff ffcb bl 802ff80 #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 802ffea: 2200 movs r2, #0 802ffec: f64e 2060 movw r0, #60000 ; 0xea60 802fff0: 4906 ldr r1, [pc, #24] ; (803000c ) 802fff2: f7ff ffc5 bl 802ff80 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 802fff6: 4906 ldr r1, [pc, #24] ; (8030010 ) 802fff8: f44f 70fa mov.w r0, #500 ; 0x1f4 802fffc: 2200 movs r2, #0 #if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now(); #endif } 802fffe: 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); 8030002: f7ff bfbd b.w 802ff80 8030006: bf00 nop 8030008: 0803004d .word 0x0803004d 803000c: 08030031 .word 0x08030031 8030010: 08030015 .word 0x08030015 08030014 : * * @param arg unused argument */ static void dhcp_timer_fine(void *arg) { 8030014: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); 8030016: f7fd f9c9 bl 802d3ac sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 803001a: 4904 ldr r1, [pc, #16] ; (803002c ) 803001c: f44f 70fa mov.w r0, #500 ; 0x1f4 8030020: 2200 movs r2, #0 } 8030022: 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); 8030026: f7ff bfab b.w 802ff80 803002a: bf00 nop 803002c: 08030015 .word 0x08030015 08030030 : * * @param arg unused argument */ static void dhcp_timer_coarse(void *arg) { 8030030: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); 8030032: f7fd f939 bl 802d2a8 sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 8030036: 4904 ldr r1, [pc, #16] ; (8030048 ) 8030038: f64e 2060 movw r0, #60000 ; 0xea60 803003c: 2200 movs r2, #0 } 803003e: 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); 8030042: f7ff bf9d b.w 802ff80 8030046: bf00 nop 8030048: 08030031 .word 0x08030031 0803004c : * * @param arg unused argument */ static void arp_timer(void *arg) { 803004c: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); 803004e: f004 fd1d bl 8034a8c sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8030052: 4904 ldr r1, [pc, #16] ; (8030064 ) 8030054: f241 3088 movw r0, #5000 ; 0x1388 8030058: 2200 movs r2, #0 } 803005a: 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); 803005e: f7ff bf8f b.w 802ff80 8030062: bf00 nop 8030064: 0803004d .word 0x0803004d 08030068 : */ void tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8030068: 4b08 ldr r3, [pc, #32] ; (803008c ) 803006a: 681b ldr r3, [r3, #0] 803006c: b96b cbnz r3, 803008a 803006e: 4b08 ldr r3, [pc, #32] ; (8030090 ) 8030070: 681b ldr r3, [r3, #0] 8030072: b913 cbnz r3, 803007a 8030074: 4b07 ldr r3, [pc, #28] ; (8030094 ) 8030076: 681b ldr r3, [r3, #0] 8030078: b13b cbz r3, 803008a /* enable and start timer */ tcpip_tcp_timer_active = 1; 803007a: 4b04 ldr r3, [pc, #16] ; (803008c ) sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 803007c: 4906 ldr r1, [pc, #24] ; (8030098 ) 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; 803007e: 2201 movs r2, #1 8030080: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8030082: 20fa movs r0, #250 ; 0xfa 8030084: 2200 movs r2, #0 8030086: f7ff bf7b b.w 802ff80 803008a: 4770 bx lr 803008c: 2000e1bc .word 0x2000e1bc 8030090: 2001107c .word 0x2001107c 8030094: 20011090 .word 0x20011090 8030098: 0803009d .word 0x0803009d 0803009c : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 803009c: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 803009e: f7fe fad3 bl 802e648 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 80300a2: 4b08 ldr r3, [pc, #32] ; (80300c4 ) 80300a4: 681b ldr r3, [r3, #0] 80300a6: b913 cbnz r3, 80300ae 80300a8: 4b07 ldr r3, [pc, #28] ; (80300c8 ) 80300aa: 681b ldr r3, [r3, #0] 80300ac: b133 cbz r3, 80300bc /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 80300ae: 4907 ldr r1, [pc, #28] ; (80300cc ) 80300b0: 20fa movs r0, #250 ; 0xfa 80300b2: 2200 movs r2, #0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; } } 80300b4: 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); 80300b8: f7ff bf62 b.w 802ff80 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 80300bc: 4a04 ldr r2, [pc, #16] ; (80300d0 ) 80300be: 6013 str r3, [r2, #0] 80300c0: bd08 pop {r3, pc} 80300c2: bf00 nop 80300c4: 2001107c .word 0x2001107c 80300c8: 20011090 .word 0x20011090 80300cc: 0803009d .word 0x0803009d 80300d0: 2000e1bc .word 0x2000e1bc 080300d4 : void sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80300d4: 4b10 ldr r3, [pc, #64] ; (8030118 ) 80300d6: 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) { 80300d8: b510 push {r4, lr} struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 80300da: b1e3 cbz r3, 8030116 80300dc: 2200 movs r2, #0 80300de: e000 b.n 80300e2 return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 80300e0: 4623 mov r3, r4 if ((t->h == handler) && (t->arg == arg)) { 80300e2: 689c ldr r4, [r3, #8] 80300e4: 4284 cmp r4, r0 80300e6: d112 bne.n 803010e 80300e8: 68dc ldr r4, [r3, #12] 80300ea: 428c cmp r4, r1 80300ec: d10f bne.n 803010e 80300ee: 6819 ldr r1, [r3, #0] /* We have a match */ /* Unlink from previous in list */ if (prev_t == NULL) { 80300f0: b902 cbnz r2, 80300f4 next_timeout = t->next; 80300f2: 4a09 ldr r2, [pc, #36] ; (8030118 ) } else { prev_t->next = t->next; 80300f4: 6011 str r1, [r2, #0] } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { 80300f6: 681a ldr r2, [r3, #0] 80300f8: b11a cbz r2, 8030102 t->next->time += t->time; 80300fa: 6850 ldr r0, [r2, #4] 80300fc: 6859 ldr r1, [r3, #4] 80300fe: 1841 adds r1, r0, r1 8030100: 6051 str r1, [r2, #4] } memp_free(MEMP_SYS_TIMEOUT, t); 8030102: 2009 movs r0, #9 8030104: 4619 mov r1, r3 return; } } return; } 8030106: 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); 803010a: f7fd bba9 b.w 802d860 if (next_timeout == NULL) { return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 803010e: 681c ldr r4, [r3, #0] 8030110: 461a mov r2, r3 8030112: 2c00 cmp r4, #0 8030114: d1e4 bne.n 80300e0 8030116: bd10 pop {r4, pc} 8030118: 2000e1c0 .word 0x2000e1c0 0803011c : * @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) { 803011c: 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) { 8030120: 4e18 ldr r6, [pc, #96] ; (8030184 ) * @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) { 8030122: 4604 mov r4, r0 8030124: 460d mov r5, r1 8030126: 4637 mov r7, r6 struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 8030128: 6832 ldr r2, [r6, #0] 803012a: b92a cbnz r2, 8030138 time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 803012c: 4620 mov r0, r4 803012e: 4629 mov r1, r5 } else { next_timeout->time = 0; } } } } 8030130: 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); 8030134: f005 b8d6 b.w 80352e4 } else { if (next_timeout->time > 0) { 8030138: 6852 ldr r2, [r2, #4] 803013a: b96a cbnz r2, 8030158 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; 803013c: 6839 ldr r1, [r7, #0] next_timeout = tmptimeout->next; 803013e: 680a ldr r2, [r1, #0] handler = tmptimeout->h; 8030140: 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; 8030144: 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); 8030146: 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; 8030148: 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); 803014c: f7fd fb88 bl 802d860 if (handler != NULL) { 8030150: f1b8 0f00 cmp.w r8, #0 8030154: d0e8 beq.n 8030128 8030156: e006 b.n 8030166 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); 8030158: 4620 mov r0, r4 803015a: 4629 mov r1, r5 803015c: f005 f8c2 bl 80352e4 } else { time_needed = SYS_ARCH_TIMEOUT; } if (time_needed == SYS_ARCH_TIMEOUT) { 8030160: 1c43 adds r3, r0, #1 8030162: d0eb beq.n 803013c 8030164: e002 b.n 803016c 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); 8030166: 4648 mov r0, r9 8030168: 47c0 blx r8 803016a: e7dd b.n 8030128 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) { 803016c: 4b05 ldr r3, [pc, #20] ; (8030184 ) 803016e: 681b ldr r3, [r3, #0] 8030170: 6859 ldr r1, [r3, #4] 8030172: 4288 cmp r0, r1 next_timeout->time -= time_needed; 8030174: bf34 ite cc 8030176: ebc0 0201 rsbcc r2, r0, r1 } else { next_timeout->time = 0; 803017a: 2200 movcs r2, #0 803017c: 605a str r2, [r3, #4] 803017e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8030182: bf00 nop 8030184: 2000e1c0 .word 0x2000e1c0 08030188 : /** * Initialize this module. */ void udp_init(void) { 8030188: 4770 bx lr 803018a: 0000 movs r0, r0 0803018c : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 803018c: 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; 8030190: 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))) { 8030194: 8903 ldrh r3, [r0, #8] * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8030196: 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))) { 8030198: f899 1000 ldrb.w r1, [r9] 803019c: f001 010f and.w r1, r1, #15 80301a0: 1c8a adds r2, r1, #2 80301a2: 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) { 80301a6: b085 sub sp, #20 80301a8: 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))) { 80301aa: db05 blt.n 80301b8 80301ac: 0089 lsls r1, r1, #2 80301ae: 4249 negs r1, r1 80301b0: f7fd fc35 bl 802da1e 80301b4: 4683 mov fp, r0 80301b6: b110 cbz r0, 80301be /* 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(); 80301b8: f002 fa88 bl 80326cc 80301bc: e096 b.n 80302ec } udphdr = (struct udp_hdr *)p->payload; /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 80301be: f8df a150 ldr.w sl, [pc, #336] ; 8030310 snmp_inc_udpinerrors(); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 80301c2: 686c ldr r4, [r5, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 80301c4: f8da 0000 ldr.w r0, [sl] 80301c8: 4631 mov r1, r6 80301ca: f000 faed bl 80307a8 80301ce: 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); 80301d0: 8820 ldrh r0, [r4, #0] 80301d2: f7fc fb16 bl 802c802 80301d6: 4607 mov r7, r0 dest = ntohs(udphdr->dest); 80301d8: 8860 ldrh r0, [r4, #2] 80301da: f7fc fb12 bl 802c802 #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) { 80301de: 2844 cmp r0, #68 ; 0x44 80301e0: d10f bne.n 8030202 /* all packets for DHCP_CLIENT_PORT not coming from DHCP_SERVER_PORT are dropped! */ if (src == DHCP_SERVER_PORT) { 80301e2: 2f43 cmp r7, #67 ; 0x43 80301e4: d14f bne.n 8030286 if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { 80301e6: 6a33 ldr r3, [r6, #32] 80301e8: 2b00 cmp r3, #0 80301ea: d04c beq.n 8030286 80301ec: 685c ldr r4, [r3, #4] 80301ee: 2c00 cmp r4, #0 80301f0: d049 beq.n 8030286 /* 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) || 80301f2: 6863 ldr r3, [r4, #4] 80301f4: 2b00 cmp r3, #0 80301f6: d04e beq.n 8030296 ip_addr_cmp(&(inp->dhcp->pcb->remote_ip), ¤t_iphdr_src))) { 80301f8: 4a43 ldr r2, [pc, #268] ; (8030308 ) 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) || 80301fa: 6812 ldr r2, [r2, #0] 80301fc: 4293 cmp r3, r2 80301fe: d142 bne.n 8030286 8030200: e049 b.n 8030296 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) { 8030202: 4b42 ldr r3, [pc, #264] ; (803030c ) /* 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) || 8030204: 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) { 8030208: 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))) { 803020c: 4b3e ldr r3, [pc, #248] ; (8030308 ) 803020e: 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) { 8030210: 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))) { 8030212: 9303 str r3, [sp, #12] } } } else #endif /* LWIP_DHCP */ { prev = NULL; 8030214: 4659 mov r1, fp local_match = 0; uncon_pcb = NULL; 8030216: 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) { 8030218: e032 b.n 8030280 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) { 803021a: 8a62 ldrh r2, [r4, #18] 803021c: 4282 cmp r2, r0 803021e: d12d bne.n 803027c 8030220: 6822 ldr r2, [r4, #0] if ( 8030222: f1b8 0f00 cmp.w r8, #0 8030226: d100 bne.n 803022a (!broadcast && ip_addr_isany(&pcb->local_ip)) || 8030228: b15a cbz r2, 8030242 803022a: 4552 cmp r2, sl 803022c: d009 beq.n 8030242 ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 803022e: f1b8 0f00 cmp.w r8, #0 8030232: d023 beq.n 803027c (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) || 8030234: b12a cbz r2, 8030242 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { 8030236: ea8a 0b02 eor.w fp, sl, r2 803023a: 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) || 803023c: ea1b 0f02 tst.w fp, r2 8030240: d11c bne.n 803027c ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 8030242: 2b00 cmp r3, #0 8030244: d158 bne.n 80302f8 ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) { 8030246: 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) && 8030248: f003 0304 and.w r3, r3, #4 803024c: b2db uxtb r3, r3 803024e: 2b00 cmp r3, #0 8030250: bf0c ite eq 8030252: 4623 moveq r3, r4 8030254: 2300 movne r3, #0 8030256: e04f b.n 80302f8 } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8030258: f8d4 b004 ldr.w fp, [r4, #4] 803025c: f1bb 0f00 cmp.w fp, #0 8030260: d101 bne.n 8030266 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { 8030262: b921 cbnz r1, 803026e 8030264: e017 b.n 8030296 } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 8030266: 9a03 ldr r2, [sp, #12] 8030268: 4593 cmp fp, r2 803026a: d107 bne.n 803027c 803026c: e7f9 b.n 8030262 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; 803026e: 68e3 ldr r3, [r4, #12] 8030270: 60cb str r3, [r1, #12] pcb->next = udp_pcbs; udp_pcbs = pcb; 8030272: 4b26 ldr r3, [pc, #152] ; (803030c ) /* 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; 8030274: f8c4 c00c str.w ip, [r4, #12] udp_pcbs = pcb; 8030278: 601c str r4, [r3, #0] 803027a: e00c b.n 8030296 803027c: 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) { 803027e: 68e4 ldr r4, [r4, #12] 8030280: 2c00 cmp r4, #0 8030282: d1ca bne.n 803021a 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)) { 8030284: b933 cbnz r3, 8030294 8030286: 4b22 ldr r3, [pc, #136] ; (8030310 ) 8030288: 6872 ldr r2, [r6, #4] 803028a: 681b ldr r3, [r3, #0] 803028c: 429a cmp r2, r3 803028e: d12d bne.n 80302ec 8030290: 2400 movs r4, #0 8030292: e000 b.n 8030296 8030294: 461c mov r4, r3 goto end; } } #endif /* CHECKSUM_CHECK_UDP */ } if(pbuf_header(p, -UDP_HLEN)) { 8030296: 4628 mov r0, r5 8030298: f06f 0107 mvn.w r1, #7 803029c: f7fd fbbf bl 802da1e 80302a0: 2800 cmp r0, #0 80302a2: d189 bne.n 80301b8 UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); pbuf_free(p); goto end; } if (pcb != NULL) { 80302a4: b154 cbz r4, 80302bc snmp_inc_udpindatagrams(); 80302a6: f002 fa01 bl 80326ac pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 80302aa: 69a6 ldr r6, [r4, #24] 80302ac: b1f6 cbz r6, 80302ec /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 80302ae: 9700 str r7, [sp, #0] 80302b0: 69e0 ldr r0, [r4, #28] 80302b2: 4b15 ldr r3, [pc, #84] ; (8030308 ) 80302b4: 4621 mov r1, r4 80302b6: 462a mov r2, r5 80302b8: 47b0 blx r6 80302ba: e021 b.n 8030300 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 && 80302bc: f1b8 0f00 cmp.w r8, #0 80302c0: d112 bne.n 80302e8 !ip_addr_ismulticast(¤t_iphdr_dest)) { 80302c2: 4b13 ldr r3, [pc, #76] ; (8030310 ) 80302c4: 681b ldr r3, [r3, #0] 80302c6: 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 && 80302ca: 2be0 cmp r3, #224 ; 0xe0 80302cc: d00c beq.n 80302e8 !ip_addr_ismulticast(¤t_iphdr_dest)) { /* move payload pointer back to ip header */ pbuf_header(p, (IPH_HL(iphdr) * 4) + UDP_HLEN); 80302ce: f899 1000 ldrb.w r1, [r9] 80302d2: f001 010f and.w r1, r1, #15 80302d6: 3102 adds r1, #2 80302d8: 0089 lsls r1, r1, #2 80302da: 4628 mov r0, r5 80302dc: f7fd fb9f bl 802da1e LWIP_ASSERT("p->payload == iphdr", (p->payload == iphdr)); icmp_dest_unreach(p, ICMP_DUR_PORT); 80302e0: 4628 mov r0, r5 80302e2: 2103 movs r1, #3 80302e4: f000 f9d2 bl 803068c } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); 80302e8: f002 f9e8 bl 80326bc pbuf_free(p); 80302ec: 4628 mov r0, r5 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 80302ee: b005 add sp, #20 80302f0: 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); 80302f4: f7fd bbbe b.w 802da74 uncon_pcb = pcb; } } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && 80302f8: 8aa2 ldrh r2, [r4, #20] 80302fa: 42ba cmp r2, r7 80302fc: d1be bne.n 803027c 80302fe: e7ab b.n 8030258 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 8030300: b005 add sp, #20 8030302: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8030306: bf00 nop 8030308: 2001109c .word 0x2001109c 803030c: 20011098 .word 0x20011098 8030310: 200110a4 .word 0x200110a4 08030314 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8030314: 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) { 8030316: 4b25 ldr r3, [pc, #148] ; (80303ac ) * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 8030318: 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) { 803031a: 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; 803031c: 2500 movs r5, #0 /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 803031e: 4603 mov r3, r0 8030320: e012 b.n 8030348 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8030322: 429c cmp r4, r3 8030324: d00e beq.n 8030344 !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) && 8030326: 8a5e ldrh r6, [r3, #18] 8030328: 4296 cmp r6, r2 803032a: d10c bne.n 8030346 /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 803032c: 681f ldr r7, [r3, #0] 803032e: b90f cbnz r7, 8030334 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; 8030330: 20f8 movs r0, #248 ; 0xf8 8030332: e039 b.n 80303a8 /* 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)) || 8030334: 2900 cmp r1, #0 8030336: d0fb beq.n 8030330 ip_addr_isany(ipaddr) || 8030338: 680e ldr r6, [r1, #0] 803033a: 2e00 cmp r6, #0 803033c: d0f8 beq.n 8030330 803033e: 42b7 cmp r7, r6 8030340: d101 bne.n 8030346 8030342: e7f5 b.n 8030330 /* 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; 8030344: 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) { 8030346: 68db ldr r3, [r3, #12] 8030348: 2b00 cmp r3, #0 803034a: d1ea bne.n 8030322 return ERR_USE; } } } ip_addr_set(&pcb->local_ip, ipaddr); 803034c: b101 cbz r1, 8030350 803034e: 6809 ldr r1, [r1, #0] 8030350: 6021 str r1, [r4, #0] /* no port specified? */ if (port == 0) { 8030352: b9fa cbnz r2, 8030394 8030354: 4b16 ldr r3, [pc, #88] ; (80303b0 ) 8030356: 881a ldrh r2, [r3, #0] 8030358: f44f 4180 mov.w r1, #16384 ; 0x4000 { u16_t n = 0; struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 803035c: f64f 76ff movw r6, #65535 ; 0xffff 8030360: 42b2 cmp r2, r6 8030362: d002 beq.n 803036a 8030364: 3201 adds r2, #1 8030366: b292 uxth r2, r2 8030368: e001 b.n 803036e udp_port = UDP_LOCAL_PORT_RANGE_START; 803036a: f44f 4240 mov.w r2, #49152 ; 0xc000 } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 803036e: 4603 mov r3, r0 8030370: e00a b.n 8030388 if (pcb->local_port == udp_port) { 8030372: 8a5f ldrh r7, [r3, #18] 8030374: 4297 cmp r7, r2 8030376: d106 bne.n 8030386 8030378: 3901 subs r1, #1 803037a: b289 uxth r1, r1 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 803037c: 2900 cmp r1, #0 803037e: d1ef bne.n 8030360 8030380: 4b0b ldr r3, [pc, #44] ; (80303b0 ) 8030382: 801a strh r2, [r3, #0] 8030384: e7d4 b.n 8030330 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) { 8030386: 68db ldr r3, [r3, #12] 8030388: 2b00 cmp r3, #0 803038a: d1f2 bne.n 8030372 803038c: 4b08 ldr r3, [pc, #32] ; (80303b0 ) 803038e: 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) { 8030390: 2a00 cmp r2, #0 8030392: d0cd beq.n 8030330 /* 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; 8030394: 8262 strh r2, [r4, #18] snmp_insert_udpidx_tree(pcb); 8030396: 4620 mov r0, r4 8030398: f002 f9a8 bl 80326ec /* pcb not active yet? */ if (rebind == 0) { 803039c: b91d cbnz r5, 80303a6 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 803039e: 4b03 ldr r3, [pc, #12] ; (80303ac ) 80303a0: 681a ldr r2, [r3, #0] udp_pcbs = pcb; 80303a2: 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; 80303a4: 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; 80303a6: 2000 movs r0, #0 } 80303a8: b240 sxtb r0, r0 80303aa: bdf8 pop {r3, r4, r5, r6, r7, pc} 80303ac: 20011098 .word 0x20011098 80303b0: 200015f2 .word 0x200015f2 080303b4 : * @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) { 80303b4: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 80303b8: 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) { 80303ba: 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) { 80303bc: f8dd 8030 ldr.w r8, [sp, #48] ; 0x30 80303c0: 4605 mov r5, r0 80303c2: 460e mov r6, r1 80303c4: 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) { 80303c6: b132 cbz r2, 80303d6 return err; } } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { 80303c8: 4630 mov r0, r6 80303ca: 2108 movs r1, #8 80303cc: f7fd fb27 bl 802da1e 80303d0: b940 cbnz r0, 80303e4 80303d2: 4634 mov r4, r6 80303d4: e013 b.n 80303fe #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); 80303d6: 4601 mov r1, r0 80303d8: f7ff ff9c bl 8030314 if (err != ERR_OK) { 80303dc: 4607 mov r7, r0 80303de: 2800 cmp r0, #0 80303e0: d0f2 beq.n 80303c8 80303e2: e044 b.n 803046e } /* 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); 80303e4: 2001 movs r0, #1 80303e6: 2108 movs r1, #8 80303e8: 2200 movs r2, #0 80303ea: f7fd fb90 bl 802db0e /* new header pbuf could not be allocated? */ if (q == NULL) { 80303ee: 4604 mov r4, r0 80303f0: 2800 cmp r0, #0 80303f2: d039 beq.n 8030468 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) { 80303f4: 8933 ldrh r3, [r6, #8] 80303f6: b113 cbz r3, 80303fe /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 80303f8: 4631 mov r1, r6 80303fa: f7fd fc36 bl 802dc6a } 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); 80303fe: 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; 8030400: 6867 ldr r7, [r4, #4] udphdr->src = htons(pcb->local_port); 8030402: f7fc f9f9 bl 802c7f8 8030406: 8038 strh r0, [r7, #0] udphdr->dest = htons(dst_port); 8030408: 4648 mov r0, r9 803040a: f7fc f9f5 bl 802c7f8 /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 803040e: 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); 8030410: 8078 strh r0, [r7, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 8030412: 71bb strb r3, [r7, #6] 8030414: 71fb strb r3, [r7, #7] } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8030416: 682b ldr r3, [r5, #0] 8030418: b913 cbnz r3, 8030420 /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 803041a: f108 0904 add.w r9, r8, #4 803041e: e00a b.n 8030436 } 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))) { 8030420: f8d8 2004 ldr.w r2, [r8, #4] 8030424: 4293 cmp r3, r2 8030426: d005 beq.n 8030434 /* local_ip doesn't match, drop the packet */ if (q != p) { 8030428: 42b4 cmp r4, r6 803042a: d01f beq.n 803046c /* free the header pbuf */ pbuf_free(q); 803042c: 4620 mov r0, r4 803042e: f7fd fb21 bl 802da74 8030432: e01b b.n 803046c } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 8030434: 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); 8030436: 8920 ldrh r0, [r4, #8] 8030438: f7fc f9de bl 802c7f8 803043c: 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); 803043e: 7a6a ldrb r2, [r5, #9] 8030440: 7aab ldrb r3, [r5, #10] 8030442: 9200 str r2, [sp, #0] 8030444: 2211 movs r2, #17 8030446: 9201 str r2, [sp, #4] 8030448: 4649 mov r1, r9 803044a: 4652 mov r2, sl 803044c: f8cd 8008 str.w r8, [sp, #8] 8030450: 4620 mov r0, r4 8030452: f000 fb9d bl 8030b90 8030456: 4607 mov r7, r0 NETIF_SET_HWADDRHINT(netif, NULL); } /* TODO: must this be increased even if error occured? */ snmp_inc_udpoutdatagrams(); 8030458: f002 f940 bl 80326dc /* did we chain a separate header pbuf earlier? */ if (q != p) { 803045c: 42b4 cmp r4, r6 803045e: d006 beq.n 803046e /* free the header pbuf */ pbuf_free(q); 8030460: 4620 mov r0, r4 8030462: f7fd fb07 bl 802da74 8030466: e002 b.n 803046e /* 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; 8030468: 27ff movs r7, #255 ; 0xff 803046a: e000 b.n 803046e /* free the header pbuf */ pbuf_free(q); q = NULL; /* p is still referenced by the caller, and will live on */ } return ERR_VAL; 803046c: 27fa movs r7, #250 ; 0xfa /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; } 803046e: b278 sxtb r0, r7 8030470: b004 add sp, #16 8030472: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08030476 : * @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) { 8030476: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8030478: 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); 803047a: 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) { 803047c: 460f mov r7, r1 803047e: 4614 mov r4, r2 8030480: 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); 8030482: f000 fa81 bl 8030988 #endif /* LWIP_IGMP */ /* no outgoing network interface could be found? */ if (netif == NULL) { 8030486: b138 cbz r0, 8030498 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); 8030488: 9000 str r0, [sp, #0] 803048a: 4639 mov r1, r7 803048c: 4628 mov r0, r5 803048e: 4622 mov r2, r4 8030490: 4633 mov r3, r6 8030492: f7ff ff8f bl 80303b4 8030496: e000 b.n 803049a /* 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; 8030498: 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 */ } 803049a: b240 sxtb r0, r0 803049c: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 0803049e : */ 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); 803049e: 8a83 ldrh r3, [r0, #20] 80304a0: 1d02 adds r2, r0, #4 80304a2: f7ff bfe8 b.w 8030476 80304a6: 0000 movs r0, r0 080304a8 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80304a8: b570 push {r4, r5, r6, lr} 80304aa: 4616 mov r6, r2 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 80304ac: 8a42 ldrh r2, [r0, #18] * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80304ae: 4604 mov r4, r0 80304b0: 460d mov r5, r1 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 80304b2: b10a cbz r2, 80304b8 if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80304b4: b935 cbnz r5, 80304c4 80304b6: e006 b.n 80304c6 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); 80304b8: 4601 mov r1, r0 80304ba: f7ff ff2b bl 8030314 if (err != ERR_OK) { 80304be: 2800 cmp r0, #0 80304c0: d0f8 beq.n 80304b4 80304c2: e013 b.n 80304ec return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80304c4: 682d ldr r5, [r5, #0] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 80304c6: 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) { 80304c8: 4a09 ldr r2, [pc, #36] ; (80304f0 ) if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 80304ca: 6065 str r5, [r4, #4] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 80304cc: f043 0304 orr.w r3, r3, #4 80304d0: 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) { 80304d2: 6813 ldr r3, [r2, #0] return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; 80304d4: 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) { 80304d6: 4618 mov r0, r3 80304d8: e002 b.n 80304e0 if (pcb == ipcb) { 80304da: 4284 cmp r4, r0 80304dc: d005 beq.n 80304ea 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) { 80304de: 68c0 ldr r0, [r0, #12] 80304e0: 2800 cmp r0, #0 80304e2: d1fa bne.n 80304da /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 80304e4: 60e3 str r3, [r4, #12] udp_pcbs = pcb; 80304e6: 6014 str r4, [r2, #0] return ERR_OK; 80304e8: e000 b.n 80304ec /* 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; 80304ea: 2000 movs r0, #0 } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; udp_pcbs = pcb; return ERR_OK; } 80304ec: b240 sxtb r0, r0 80304ee: bd70 pop {r4, r5, r6, pc} 80304f0: 20011098 .word 0x20011098 080304f4 : */ void udp_disconnect(struct udp_pcb *pcb) { /* reset remote address association */ ip_addr_set_any(&pcb->remote_ip); 80304f4: 2300 movs r3, #0 80304f6: 6043 str r3, [r0, #4] pcb->remote_port = 0; 80304f8: 8283 strh r3, [r0, #20] /* mark PCB as unconnected */ pcb->flags &= ~UDP_FLAGS_CONNECTED; 80304fa: 7c03 ldrb r3, [r0, #16] 80304fc: f023 0304 bic.w r3, r3, #4 8030500: 7403 strb r3, [r0, #16] 8030502: 4770 bx lr 08030504 : */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 8030504: 6181 str r1, [r0, #24] pcb->recv_arg = recv_arg; 8030506: 61c2 str r2, [r0, #28] 8030508: 4770 bx lr 803050a: 0000 movs r0, r0 0803050c : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 803050c: b510 push {r4, lr} 803050e: 4604 mov r4, r0 struct udp_pcb *pcb2; snmp_delete_udpidx_tree(pcb); 8030510: f002 f930 bl 8032774 /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 8030514: 4a0a ldr r2, [pc, #40] ; (8030540 ) 8030516: 6813 ldr r3, [r2, #0] 8030518: 42a3 cmp r3, r4 803051a: d109 bne.n 8030530 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 803051c: 68e3 ldr r3, [r4, #12] 803051e: 6013 str r3, [r2, #0] 8030520: e008 b.n 8030534 /* 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) { 8030522: 68da ldr r2, [r3, #12] 8030524: b11a cbz r2, 803052e 8030526: 42a2 cmp r2, r4 /* remove pcb from list */ pcb2->next = pcb->next; 8030528: bf04 itt eq 803052a: 68e2 ldreq r2, [r4, #12] 803052c: 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) { 803052e: 68db ldr r3, [r3, #12] 8030530: 2b00 cmp r3, #0 8030532: d1f6 bne.n 8030522 /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 8030534: 2001 movs r0, #1 8030536: 4621 mov r1, r4 } 8030538: e8bd 4010 ldmia.w sp!, {r4, lr} /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 803053c: f7fd b990 b.w 802d860 8030540: 20011098 .word 0x20011098 08030544 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8030544: b510 push {r4, lr} struct udp_pcb *pcb; pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 8030546: 2001 movs r0, #1 8030548: f7fd f974 bl 802d834 /* could allocate UDP PCB? */ if (pcb != NULL) { 803054c: 4604 mov r4, r0 803054e: b128 cbz r0, 803055c /* 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)); 8030550: 2100 movs r1, #0 8030552: 2220 movs r2, #32 8030554: f7f1 fab4 bl 8021ac0 pcb->ttl = UDP_TTL; 8030558: 23ff movs r3, #255 ; 0xff 803055a: 72a3 strb r3, [r4, #10] } return pcb; } 803055c: 4620 mov r0, r4 803055e: bd10 pop {r4, pc} 08030560 : * @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) { 8030560: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8030564: 4604 mov r4, r0 8030566: b085 sub sp, #20 8030568: 460f mov r7, r1 struct icmp_echo_hdr *iecho; struct ip_hdr *iphdr; s16_t hlen; ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); 803056a: f002 f837 bl 80325dc iphdr = (struct ip_hdr *)p->payload; 803056e: 6865 ldr r5, [r4, #4] hlen = IPH_HL(iphdr) * 4; 8030570: f895 8000 ldrb.w r8, [r5] 8030574: f008 080f and.w r8, r8, #15 8030578: ea4f 0888 mov.w r8, r8, lsl #2 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { 803057c: f1c8 0900 rsb r9, r8, #0 8030580: 4620 mov r0, r4 8030582: fa0f f189 sxth.w r1, r9 8030586: f7fd fa4a bl 802da1e 803058a: 2800 cmp r0, #0 803058c: d172 bne.n 8030674 803058e: 8923 ldrh r3, [r4, #8] 8030590: 2b03 cmp r3, #3 8030592: d96f bls.n 8030674 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8030594: 6863 ldr r3, [r4, #4] #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload)+1); #endif /* LWIP_DEBUG */ switch (type) { 8030596: 781b ldrb r3, [r3, #0] 8030598: 2b08 cmp r3, #8 803059a: d165 bne.n 8030668 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 803059c: 4b39 ldr r3, [pc, #228] ; (8030684 ) 803059e: 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)) { 80305a0: 4639 mov r1, r7 80305a2: 4630 mov r0, r6 80305a4: f000 f900 bl 80307a8 80305a8: 2800 cmp r0, #0 80305aa: d15d bne.n 8030668 #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 80305ac: 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) { 80305b0: 2ee0 cmp r6, #224 ; 0xe0 80305b2: d100 bne.n 80305b6 80305b4: e058 b.n 8030668 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)) { 80305b6: 8923 ldrh r3, [r4, #8] 80305b8: 2b07 cmp r3, #7 80305ba: d95b bls.n 8030674 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } if (inet_chksum_pbuf(p) != 0) { 80305bc: 4620 mov r0, r4 80305be: f000 f8cf bl 8030760 80305c2: b100 cbz r0, 80305c6 80305c4: e056 b.n 8030674 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))) { 80305c6: 4620 mov r0, r4 80305c8: 2122 movs r1, #34 ; 0x22 ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); iphdr = (struct ip_hdr *)p->payload; hlen = IPH_HL(iphdr) * 4; 80305ca: 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))) { 80305ce: f7fd fa26 bl 802da1e 80305d2: b1f8 cbz r0, 8030614 /* 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)) { 80305d4: 4620 mov r0, r4 80305d6: 4641 mov r1, r8 80305d8: f7fd fa21 bl 802da1e 80305dc: 4602 mov r2, r0 80305de: 2800 cmp r0, #0 80305e0: d148 bne.n 8030674 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); 80305e2: 2002 movs r0, #2 80305e4: 8921 ldrh r1, [r4, #8] 80305e6: f7fd fa92 bl 802db0e if (r == NULL) { 80305ea: 4606 mov r6, r0 80305ec: 2800 cmp r0, #0 80305ee: d041 beq.n 8030674 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) { 80305f0: 4621 mov r1, r4 80305f2: f7fd fb43 bl 802dc7c 80305f6: 2800 cmp r0, #0 80305f8: d13c bne.n 8030674 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)) { 80305fa: 4630 mov r0, r6 80305fc: 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; 8030600: 6875 ldr r5, [r6, #4] /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 8030602: f7fd fa0c bl 802da1e 8030606: 2800 cmp r0, #0 8030608: d134 bne.n 8030674 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); goto memerr; } /* free the original p */ pbuf_free(p); 803060a: 4620 mov r0, r4 803060c: f7fd fa32 bl 802da74 8030610: 4634 mov r4, r6 8030612: e006 b.n 8030622 /* 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))) { 8030614: 4620 mov r0, r4 8030616: f06f 0121 mvn.w r1, #33 ; 0x21 803061a: f7fd fa00 bl 802da1e 803061e: 2800 cmp r0, #0 8030620: d128 bne.n 8030674 #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()); 8030622: f8df 9060 ldr.w r9, [pc, #96] ; 8030684 } #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; 8030626: 6863 ldr r3, [r4, #4] ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 8030628: f8d9 2000 ldr.w r2, [r9] 803062c: 60ea str r2, [r5, #12] ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 803062e: 4a16 ldr r2, [pc, #88] ; (8030688 ) 8030630: 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); 8030632: 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()); 8030634: 612a str r2, [r5, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 8030636: 2200 movs r2, #0 8030638: 701a strb r2, [r3, #0] //----------------------------------------------------------- // Добавил фикс 15.08.15. // Фикс исправляет баг с пингом. #ifdef CHECKSUM_BY_HARDWARE iecho->chksum = 0; 803063a: 709a strb r2, [r3, #2] 803063c: 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); 803063e: 72aa strb r2, [r5, #10] 8030640: 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); 8030642: 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(); 8030644: f001 ffda bl 80325fc /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); 8030648: f001 ffe8 bl 803261c if(pbuf_header(p, hlen)) { 803064c: 4620 mov r0, r4 803064e: 4641 mov r1, r8 8030650: f7fd f9e5 bl 802da1e 8030654: 4602 mov r2, r0 8030656: b938 cbnz r0, 8030668 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, 8030658: 2301 movs r3, #1 803065a: e88d 0089 stmia.w sp, {r0, r3, r7} 803065e: 4620 mov r0, r4 8030660: 4649 mov r1, r9 8030662: 4633 mov r3, r6 8030664: f000 fa94 bl 8030b90 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); 8030668: 4620 mov r0, r4 pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 803066a: b005 add sp, #20 803066c: 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); 8030670: f7fd ba00 b.w 802da74 ICMP_STATS_INC(icmp.lenerr); snmp_inc_icmpinerrors(); return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); 8030674: 4620 mov r0, r4 8030676: f7fd f9fd bl 802da74 ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 803067a: b005 add sp, #20 803067c: 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(); 8030680: f001 bfb4 b.w 80325ec 8030684: 200110a4 .word 0x200110a4 8030688: 2001109c .word 0x2001109c 0803068c : * 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) { 803068c: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 8030690: 4607 mov r7, r0 8030692: 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, 8030694: 2001 movs r0, #1 8030696: 2124 movs r1, #36 ; 0x24 8030698: 2200 movs r2, #0 803069a: f7fd fa38 bl 802db0e PBUF_RAM); if (q == NULL) { 803069e: 4606 mov r6, r0 80306a0: b358 cbz r0, 80306fa 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; 80306a2: 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; 80306a4: 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; 80306a8: 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; 80306aa: 2303 movs r3, #3 icmphdr->code = code; icmphdr->id = 0; 80306ac: 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; 80306ae: 7023 strb r3, [r4, #0] icmphdr->code = code; icmphdr->id = 0; 80306b0: 7125 strb r5, [r4, #4] 80306b2: 7165 strb r5, [r4, #5] icmphdr->seqno = 0; 80306b4: 71a5 strb r5, [r4, #6] 80306b6: 71e5 strb r5, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 80306b8: 6840 ldr r0, [r0, #4] 80306ba: 6879 ldr r1, [r7, #4] 80306bc: 221c movs r2, #28 80306be: 3008 adds r0, #8 80306c0: f7f1 f944 bl 802194c IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); /* calculate checksum */ icmphdr->chksum = 0; 80306c4: 70a5 strb r5, [r4, #2] 80306c6: 70e5 strb r5, [r4, #3] icmphdr->chksum = inet_chksum(icmphdr, q->len); 80306c8: 8971 ldrh r1, [r6, #10] 80306ca: 4620 mov r0, r4 80306cc: f000 f842 bl 8030754 80306d0: 8060 strh r0, [r4, #2] ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 80306d2: f001 ff93 bl 80325fc /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); 80306d6: f001 ff99 bl 803260c ip_addr_copy(iphdr_src, iphdr->src); 80306da: f8d8 300c ldr.w r3, [r8, #12] 80306de: aa04 add r2, sp, #16 ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 80306e0: 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); 80306e2: f842 3d04 str.w r3, [r2, #-4]! ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 80306e6: 2301 movs r3, #1 80306e8: 9301 str r3, [sp, #4] 80306ea: 9500 str r5, [sp, #0] 80306ec: 4629 mov r1, r5 80306ee: 23ff movs r3, #255 ; 0xff 80306f0: f000 fa9e bl 8030c30 pbuf_free(q); 80306f4: 4630 mov r0, r6 80306f6: f7fd f9bd bl 802da74 */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { icmp_send_response(p, ICMP_DUR, t); } 80306fa: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 080306fe : * @return host order (!) lwip checksum (non-inverted Internet sum) */ static u16_t lwip_standard_chksum(void *dataptr, int len) { 80306fe: b513 push {r0, r1, r4, lr} u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 8030700: 2300 movs r3, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 8030702: 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; 8030706: 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) { 803070a: d006 beq.n 803071a 803070c: 4299 cmp r1, r3 803070e: dd04 ble.n 803071a ((u8_t *)&t)[1] = *pb++; 8030710: f810 3b01 ldrb.w r3, [r0], #1 len--; 8030714: 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++; 8030716: 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; 803071a: 2300 movs r3, #0 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 803071c: e003 b.n 8030726 sum += *ps++; 803071e: f830 4b02 ldrh.w r4, [r0], #2 len -= 2; 8030722: 3902 subs r1, #2 } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { sum += *ps++; 8030724: 191b adds r3, r3, r4 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 8030726: 2901 cmp r1, #1 8030728: dcf9 bgt.n 803071e len -= 2; } /* Consume left-over byte, if any */ if (len > 0) { ((u8_t *)&t)[0] = *(u8_t *)ps; 803072a: bf04 itt eq 803072c: 7801 ldrbeq r1, [r0, #0] 803072e: f88d 1006 strbeq.w r1, [sp, #6] } /* Add end bytes */ sum += t; 8030732: f8bd 0006 ldrh.w r0, [sp, #6] 8030736: 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); 8030738: b298 uxth r0, r3 803073a: eb00 4313 add.w r3, r0, r3, lsr #16 sum = FOLD_U32T(sum); 803073e: b298 uxth r0, r3 8030740: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 8030744: b122 cbz r2, 8030750 sum = SWAP_BYTES_IN_WORD(sum); 8030746: 0603 lsls r3, r0, #24 8030748: f3c0 2007 ubfx r0, r0, #8, #8 803074c: ea40 4013 orr.w r0, r0, r3, lsr #16 } return (u16_t)sum; } 8030750: b280 uxth r0, r0 8030752: bd1c pop {r2, r3, r4, pc} 08030754 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(void *dataptr, u16_t len) { 8030754: b508 push {r3, lr} return ~LWIP_CHKSUM(dataptr, len); 8030756: f7ff ffd2 bl 80306fe 803075a: 43c0 mvns r0, r0 } 803075c: b280 uxth r0, r0 803075e: bd08 pop {r3, pc} 08030760 : * @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) { 8030760: b570 push {r4, r5, r6, lr} u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; 8030762: 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) { 8030764: 4605 mov r5, r0 u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; 8030766: 4634 mov r4, r6 swapped = 0; for(q = p; q != NULL; q = q->next) { 8030768: e013 b.n 8030792 acc += LWIP_CHKSUM(q->payload, q->len); 803076a: 8969 ldrh r1, [r5, #10] 803076c: 6868 ldr r0, [r5, #4] 803076e: f7ff ffc6 bl 80306fe acc = FOLD_U32T(acc); if (q->len % 2 != 0) { 8030772: 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); 8030774: 1900 adds r0, r0, r4 acc = FOLD_U32T(acc); 8030776: b284 uxth r4, r0 if (q->len % 2 != 0) { 8030778: 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); 803077a: eb04 4410 add.w r4, r4, r0, lsr #16 if (q->len % 2 != 0) { 803077e: d507 bpl.n 8030790 swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); 8030780: 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; 8030782: f1c6 0601 rsb r6, r6, #1 acc = SWAP_BYTES_IN_WORD(acc); 8030786: 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; 803078a: b2f6 uxtb r6, r6 acc = SWAP_BYTES_IN_WORD(acc); 803078c: 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) { 8030790: 682d ldr r5, [r5, #0] 8030792: 2d00 cmp r5, #0 8030794: d1e9 bne.n 803076a swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); } } if (swapped) { 8030796: b126 cbz r6, 80307a2 acc = SWAP_BYTES_IN_WORD(acc); 8030798: 0623 lsls r3, r4, #24 803079a: f3c4 2407 ubfx r4, r4, #8, #8 803079e: ea44 4413 orr.w r4, r4, r3, lsr #16 } return (u16_t)~(acc & 0xffffUL); 80307a2: 43e0 mvns r0, r4 } 80307a4: b280 uxth r0, r0 80307a6: bd70 pop {r4, r5, r6, pc} 080307a8 : { ip_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 80307a8: 1e43 subs r3, r0, #1 80307aa: 3303 adds r3, #3 80307ac: d811 bhi.n 80307d2 (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 80307ae: f891 302d ldrb.w r3, [r1, #45] ; 0x2d 80307b2: f003 0302 and.w r3, r3, #2 80307b6: b2db uxtb r3, r3 80307b8: b16b cbz r3, 80307d6 /* 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)) { 80307ba: 684a ldr r2, [r1, #4] 80307bc: 4290 cmp r0, r2 80307be: d00a beq.n 80307d6 return 0; /* on the same (sub) network... */ } else if (ip_addr_netcmp(&ipaddr, &(netif->ip_addr), &(netif->netmask)) 80307c0: 688b ldr r3, [r1, #8] 80307c2: 4042 eors r2, r0 80307c4: 421a tst r2, r3 80307c6: d000 beq.n 80307ca 80307c8: e005 b.n 80307d6 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(&netif->netmask)) == 80307ca: 43db mvns r3, r3 80307cc: 4018 ands r0, r3 80307ce: 4298 cmp r0, r3 80307d0: d101 bne.n 80307d6 ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; 80307d2: 2001 movs r0, #1 80307d4: 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; 80307d6: 2000 movs r0, #0 /* => network broadcast address */ return 1; } else { return 0; } } 80307d8: 4770 bx lr 080307da : * @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) { 80307da: b5f0 push {r4, r5, r6, r7, lr} u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 80307dc: 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) { 80307de: b085 sub sp, #20 80307e0: 460e mov r6, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 80307e2: 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) 80307e4: aa00 add r2, sp, #0 80307e6: 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)) 80307e8: f1a3 0230 sub.w r2, r3, #48 ; 0x30 80307ec: 2a09 cmp r2, #9 80307ee: d86d bhi.n 80308cc return (0); val = 0; base = 10; if (c == '0') { 80307f0: 2b30 cmp r3, #48 ; 0x30 80307f2: d10b bne.n 803080c c = *++cp; 80307f4: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 80307f6: 2b78 cmp r3, #120 ; 0x78 80307f8: d004 beq.n 8030804 80307fa: 2b58 cmp r3, #88 ; 0x58 80307fc: d002 beq.n 8030804 if (!isdigit(c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; 80307fe: 3001 adds r0, #1 if (c == 'x' || c == 'X') { base = 16; c = *++cp; } else base = 8; 8030800: 2508 movs r5, #8 8030802: e004 b.n 803080e base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; c = *++cp; 8030804: 7883 ldrb r3, [r0, #2] val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8030806: 2510 movs r5, #16 c = *++cp; 8030808: 3002 adds r0, #2 803080a: e000 b.n 803080e * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); val = 0; base = 10; 803080c: 250a movs r5, #10 803080e: 4602 mov r2, r0 if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 8030810: 2000 movs r0, #0 8030812: e000 b.n 8030816 8030814: 3201 adds r2, #1 c = *++cp; } else base = 8; } for (;;) { if (isdigit(c)) { 8030816: f1a3 0130 sub.w r1, r3, #48 ; 0x30 803081a: 2909 cmp r1, #9 803081c: d803 bhi.n 8030826 val = (val * base) + (int)(c - '0'); 803081e: fb05 3000 mla r0, r5, r0, r3 8030822: 3830 subs r0, #48 ; 0x30 8030824: e013 b.n 803084e c = *++cp; } else if (base == 16 && isxdigit(c)) { 8030826: 2d10 cmp r5, #16 8030828: d113 bne.n 8030852 803082a: f1a3 0161 sub.w r1, r3, #97 ; 0x61 803082e: b2c9 uxtb r1, r1 8030830: 2905 cmp r1, #5 8030832: d904 bls.n 803083e 8030834: f1a3 0c41 sub.w ip, r3, #65 ; 0x41 8030838: f1bc 0f05 cmp.w ip, #5 803083c: d809 bhi.n 8030852 val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); 803083e: 330a adds r3, #10 8030840: 2919 cmp r1, #25 8030842: bf8c ite hi 8030844: 2141 movhi r1, #65 ; 0x41 8030846: 2161 movls r1, #97 ; 0x61 8030848: 1a5b subs r3, r3, r1 803084a: ea43 1000 orr.w r0, r3, r0, lsl #4 c = *++cp; 803084e: 7853 ldrb r3, [r2, #1] 8030850: e7e0 b.n 8030814 } else break; } if (c == '.') { 8030852: 2b2e cmp r3, #46 ; 0x2e 8030854: d107 bne.n 8030866 * 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) { 8030856: 2c0c cmp r4, #12 8030858: d038 beq.n 80308cc return (0); } *pp++ = val; 803085a: f84d 0004 str.w r0, [sp, r4] c = *++cp; 803085e: 7853 ldrb r3, [r2, #1] 8030860: 1c50 adds r0, r2, #1 8030862: 3404 adds r4, #4 } else break; } 8030864: e7be b.n 80307e4 8030866: 2b0d cmp r3, #13 8030868: d803 bhi.n 8030872 803086a: 2b09 cmp r3, #9 803086c: d203 bcs.n 8030876 803086e: b113 cbz r3, 8030876 8030870: e02c b.n 80308cc 8030872: 2b20 cmp r3, #32 8030874: d12a bne.n 80308cc } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 8030876: 466b mov r3, sp 8030878: 1afb subs r3, r7, r3 803087a: 109b asrs r3, r3, #2 803087c: 3301 adds r3, #1 803087e: 2b04 cmp r3, #4 8030880: d81f bhi.n 80308c2 8030882: e8df f003 tbb [pc, r3] 8030886: 1e23 .short 0x1e23 8030888: 0a03 .short 0x0a03 803088a: 13 .byte 0x13 803088b: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 803088c: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 8030890: d21c bcs.n 80308cc return (0); } val |= parts[0] << 24; 8030892: 9b00 ldr r3, [sp, #0] 8030894: ea40 6003 orr.w r0, r0, r3, lsl #24 break; 8030898: e013 b.n 80308c2 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 803089a: f5b0 3f80 cmp.w r0, #65536 ; 0x10000 803089e: d215 bcs.n 80308cc return (0); } val |= (parts[0] << 24) | (parts[1] << 16); 80308a0: 9b00 ldr r3, [sp, #0] 80308a2: 061a lsls r2, r3, #24 80308a4: 9b01 ldr r3, [sp, #4] 80308a6: ea42 4303 orr.w r3, r2, r3, lsl #16 80308aa: e009 b.n 80308c0 break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 80308ac: 28ff cmp r0, #255 ; 0xff 80308ae: d80d bhi.n 80308cc return (0); } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 80308b0: 9b00 ldr r3, [sp, #0] 80308b2: 061a lsls r2, r3, #24 80308b4: 9b01 ldr r3, [sp, #4] 80308b6: ea42 4203 orr.w r2, r2, r3, lsl #16 80308ba: 9b02 ldr r3, [sp, #8] 80308bc: ea42 2303 orr.w r3, r2, r3, lsl #8 80308c0: 4318 orrs r0, r3 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 80308c2: b12e cbz r6, 80308d0 ip4_addr_set_u32(addr, htonl(val)); 80308c4: f7fb ffa2 bl 802c80c 80308c8: 6030 str r0, [r6, #0] 80308ca: e001 b.n 80308d0 * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); 80308cc: 2000 movs r0, #0 80308ce: e000 b.n 80308d2 break; } if (addr) { ip4_addr_set_u32(addr, htonl(val)); } return (1); 80308d0: 2001 movs r0, #1 } 80308d2: b005 add sp, #20 80308d4: bdf0 pop {r4, r5, r6, r7, pc} 080308d6 : * @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) { 80308d6: b507 push {r0, r1, r2, lr} ip_addr_t val; if (ipaddr_aton(cp, &val)) { 80308d8: a901 add r1, sp, #4 80308da: f7ff ff7e bl 80307da 80308de: b108 cbz r0, 80308e4 return ip4_addr_get_u32(&val); 80308e0: 9801 ldr r0, [sp, #4] 80308e2: e001 b.n 80308e8 } return (IPADDR_NONE); 80308e4: f04f 30ff mov.w r0, #4294967295 } 80308e8: bd0e pop {r1, r2, r3, pc} 080308ea : * @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) { 80308ea: 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); 80308ee: 6803 ldr r3, [r0, #0] 80308f0: 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) 80308f2: 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); 80308f6: f840 3d04 str.w r3, [r0, #-4]! rp = buf; 80308fa: 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) 80308fc: 3801 subs r0, #1 char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 80308fe: 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; 8030900: f04f 0c0a mov.w ip, #10 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8030904: f04f 092e mov.w r9, #46 ; 0x2e 8030908: 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) 803090a: 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; 803090c: fbb3 f6fc udiv r6, r3, ip *ap /= (u8_t)10; inv[i++] = '0' + rem; 8030910: 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; 8030914: fb0c 3a16 mls sl, ip, r6, r3 *ap /= (u8_t)10; inv[i++] = '0' + rem; 8030918: eb0b 0305 add.w r3, fp, r5 803091c: f10a 0a30 add.w sl, sl, #48 ; 0x30 8030920: 3501 adds r5, #1 8030922: f803 ac08 strb.w sl, [r3, #-8] } while(*ap); 8030926: 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; 803092a: b2ed uxtb r5, r5 } while(*ap); 803092c: d1ee bne.n 803090c 803092e: 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) 8030930: 1be6 subs r6, r4, r7 8030932: f800 3f01 strb.w r3, [r0, #1]! 8030936: b2ed uxtb r5, r5 8030938: 463b mov r3, r7 803093a: 4637 mov r7, r6 803093c: e00b b.n 8030956 803093e: 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) { 8030940: 4293 cmp r3, r2 8030942: b2e4 uxtb r4, r4 8030944: da16 bge.n 8030974 return NULL; } *rp++ = inv[i]; 8030946: f10d 0a08 add.w sl, sp, #8 803094a: 4455 add r5, sl 803094c: f815 5c08 ldrb.w r5, [r5, #-8] 8030950: 54fd strb r5, [r7, r3] 8030952: 3301 adds r3, #1 8030954: 4625 mov r5, r4 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 8030956: 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) 8030958: 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--) { 803095c: d1ef bne.n 803093e if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; } if (len++ >= buflen) { 803095e: 1c5f adds r7, r3, #1 8030960: 4293 cmp r3, r2 8030962: da07 bge.n 8030974 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 8030964: 4540 cmp r0, r8 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 8030966: 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++) { 803096a: d1cd bne.n 8030908 return NULL; } *rp++ = '.'; ap++; } *--rp = 0; 803096c: 2300 movs r3, #0 803096e: f804 3c01 strb.w r3, [r4, #-1] 8030972: e000 b.n 8030976 *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { return NULL; 8030974: 2100 movs r1, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 8030976: 4608 mov r0, r1 8030978: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 0803097c : */ char * ipaddr_ntoa(const ip_addr_t *addr) { static char str[16]; return ipaddr_ntoa_r(addr, str, 16); 803097c: 4901 ldr r1, [pc, #4] ; (8030984 ) 803097e: 2210 movs r2, #16 8030980: f7ff bfb3 b.w 80308ea 8030984: 2000e1c4 .word 0x2000e1c4 08030988 : return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 8030988: 4b0f ldr r3, [pc, #60] ; (80309c8 ) * @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) { 803098a: b510 push {r4, lr} return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 803098c: 681c ldr r4, [r3, #0] 803098e: e00a b.n 80309a6 /* network mask matches? */ if (netif_is_up(netif)) { 8030990: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8030994: 07d9 lsls r1, r3, #31 8030996: d505 bpl.n 80309a4 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { 8030998: 6803 ldr r3, [r0, #0] 803099a: 6862 ldr r2, [r4, #4] 803099c: 405a eors r2, r3 803099e: 68a3 ldr r3, [r4, #8] 80309a0: 421a tst r2, r3 80309a2: d00e beq.n 80309c2 return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 80309a4: 6824 ldr r4, [r4, #0] 80309a6: 2c00 cmp r4, #0 80309a8: d1f2 bne.n 8030990 /* return netif on which to forward IP packet */ return netif; } } } if ((netif_default == NULL) || (!netif_is_up(netif_default))) { 80309aa: 4b08 ldr r3, [pc, #32] ; (80309cc ) 80309ac: 681b ldr r3, [r3, #0] 80309ae: b12b cbz r3, 80309bc 80309b0: f893 202d ldrb.w r2, [r3, #45] ; 0x2d 80309b4: 07d2 lsls r2, r2, #31 80309b6: bf48 it mi 80309b8: 461c movmi r4, r3 80309ba: d402 bmi.n 80309c2 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(); 80309bc: f001 fcd8 bl 8032370 return NULL; 80309c0: e7ff b.n 80309c2 } /* no matching netif found, use default netif */ return netif_default; } 80309c2: 4620 mov r0, r4 80309c4: bd10 pop {r4, pc} 80309c6: bf00 nop 80309c8: 20011070 .word 0x20011070 80309cc: 20011074 .word 0x20011074 080309d0 : * @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) { 80309d0: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80309d4: 4604 mov r4, r0 80309d6: 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(); 80309d8: f001 fc8a bl 80322f0 /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 80309dc: 6866 ldr r6, [r4, #4] if (IPH_V(iphdr) != 4) { 80309de: f896 8000 ldrb.w r8, [r6] 80309e2: ea4f 1318 mov.w r3, r8, lsr #4 80309e6: 2b04 cmp r3, #4 80309e8: d005 beq.n 80309f6 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); 80309ea: 4620 mov r0, r4 80309ec: f7fd f842 bl 802da74 IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); snmp_inc_ipinhdrerrors(); 80309f0: f001 fc86 bl 8032300 return ERR_OK; 80309f4: e0be b.n 8030b74 /* 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)); 80309f6: 8870 ldrh r0, [r6, #2] 80309f8: f7fb ff03 bl 802c802 return ERR_OK; } #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); 80309fc: 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)) { 8030a00: 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; 8030a02: 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)) { 8030a06: 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)); 8030a08: 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); 8030a0a: 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)) { 8030a0c: d302 bcc.n 8030a14 8030a0e: 8923 ldrh r3, [r4, #8] 8030a10: 428b cmp r3, r1 8030a12: d202 bcs.n 8030a1a 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); 8030a14: f7fd f82e bl 802da74 8030a18: e045 b.n 8030aa6 } #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); 8030a1a: f7fd f852 bl 802dac2 /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 8030a1e: 6932 ldr r2, [r6, #16] 8030a20: 4b56 ldr r3, [pc, #344] ; (8030b7c ) } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8030a22: f8df b168 ldr.w fp, [pc, #360] ; 8030b8c /* 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); 8030a26: 601a str r2, [r3, #0] ip_addr_copy(current_iphdr_src, iphdr->src); 8030a28: 68f1 ldr r1, [r6, #12] 8030a2a: 4a55 ldr r2, [pc, #340] ; (8030b80 ) 8030a2c: 463d mov r5, r7 8030a2e: 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; 8030a30: 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)) || 8030a34: 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)))) { 8030a36: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8030a3a: 07d8 lsls r0, r3, #31 8030a3c: d403 bmi.n 8030a46 /* break out of for loop */ break; } #endif /* LWIP_AUTOIP */ } if (first) { 8030a3e: f1b9 0f00 cmp.w r9, #0 8030a42: d10e bne.n 8030a62 8030a44: e010 b.n 8030a68 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)))) { 8030a46: 686b ldr r3, [r5, #4] 8030a48: 2b00 cmp r3, #0 8030a4a: d0f8 beq.n 8030a3e /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 8030a4c: f8da 0000 ldr.w r0, [sl] 8030a50: 4298 cmp r0, r3 8030a52: f000 8088 beq.w 8030b66 /* or broadcast on this interface network address? */ ip_addr_isbroadcast(¤t_iphdr_dest, netif)) { 8030a56: 4629 mov r1, r5 8030a58: f7ff fea6 bl 80307a8 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)) || 8030a5c: 2800 cmp r0, #0 8030a5e: d0ee beq.n 8030a3e 8030a60: e081 b.n 8030b66 } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 8030a62: f8db 5000 ldr.w r5, [fp] 8030a66: e000 b.n 8030a6a } else { netif = netif->next; 8030a68: 682d ldr r5, [r5, #0] } if (netif == inp) { 8030a6a: 42bd cmp r5, r7 netif = netif->next; 8030a6c: bf08 it eq 8030a6e: 682d ldreq r5, [r5, #0] 8030a70: f04f 0900 mov.w r9, #0 } } while(netif != NULL); 8030a74: 2d00 cmp r5, #0 8030a76: d1de bne.n 8030a36 8030a78: e072 b.n 8030b60 /* 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)) { 8030a7a: eb06 0308 add.w r3, r6, r8 8030a7e: 885b ldrh r3, [r3, #2] 8030a80: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 8030a84: d16f bne.n 8030b66 8030a86: e011 b.n 8030aac /* 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)) || 8030a88: 4639 mov r1, r7 8030a8a: f7ff fe8d bl 80307a8 8030a8e: b928 cbnz r0, 8030a9c (ip_addr_ismulticast(¤t_iphdr_src))) { 8030a90: f8d8 3000 ldr.w r3, [r8] 8030a94: 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)) || 8030a98: 2be0 cmp r3, #224 ; 0xe0 8030a9a: d108 bne.n 8030aae (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); 8030a9c: 4620 mov r0, r4 8030a9e: f7fc ffe9 bl 802da74 IP_STATS_INC(ip.drop); snmp_inc_ipinaddrerrors(); 8030aa2: f001 fc35 bl 8032310 snmp_inc_ipindiscards(); 8030aa6: f001 fc43 bl 8032330 return ERR_OK; 8030aaa: e063 b.n 8030b74 /* 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)) { 8030aac: 463d mov r5, r7 return ERR_OK; } } /* packet not for us? */ if (netif == NULL) { 8030aae: b93d cbnz r5, 8030ac0 /* try to forward IP packet on (other) interfaces */ ip_forward(p, iphdr, inp); } else #endif /* IP_FORWARD */ { snmp_inc_ipinaddrerrors(); 8030ab0: f001 fc2e bl 8032310 snmp_inc_ipindiscards(); 8030ab4: f001 fc3c bl 8032330 } pbuf_free(p); 8030ab8: 4620 mov r0, r4 8030aba: f7fc ffdb bl 802da74 return ERR_OK; 8030abe: e059 b.n 8030b74 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8030ac0: 88f3 ldrh r3, [r6, #6] 8030ac2: f023 03c0 bic.w r3, r3, #192 ; 0xc0 8030ac6: b29b uxth r3, r3 8030ac8: b12b cbz r3, 8030ad6 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); 8030aca: 4620 mov r0, r4 8030acc: f7fc ffd2 bl 802da74 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(); 8030ad0: f001 fc26 bl 8032320 return ERR_OK; 8030ad4: e04e b.n 8030b74 /* 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; 8030ad6: 4b2b ldr r3, [pc, #172] ; (8030b84 ) 8030ad8: 601f str r7, [r3, #0] current_header = iphdr; 8030ada: 4b2b ldr r3, [pc, #172] ; (8030b88 ) #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8030adc: 4620 mov r0, r4 8030ade: 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; 8030ae0: 601e str r6, [r3, #0] #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 8030ae2: f7fd f947 bl 802dd74 8030ae6: bb88 cbnz r0, 8030b4c #endif /* LWIP_RAW */ { switch (IPH_PROTO(iphdr)) { 8030ae8: 7a73 ldrb r3, [r6, #9] 8030aea: 2b06 cmp r3, #6 8030aec: d00b beq.n 8030b06 8030aee: 2b11 cmp r3, #17 8030af0: d002 beq.n 8030af8 8030af2: 2b01 cmp r3, #1 8030af4: d115 bne.n 8030b22 8030af6: e00d b.n 8030b14 #if LWIP_UDP case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ snmp_inc_ipindelivers(); 8030af8: f001 fc22 bl 8032340 udp_input(p, inp); 8030afc: 4620 mov r0, r4 8030afe: 4639 mov r1, r7 8030b00: f7ff fb44 bl 803018c break; 8030b04: e022 b.n 8030b4c #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: snmp_inc_ipindelivers(); 8030b06: f001 fc1b bl 8032340 tcp_input(p, inp); 8030b0a: 4620 mov r0, r4 8030b0c: 4639 mov r1, r7 8030b0e: f7fe f8e7 bl 802ece0 break; 8030b12: e01b b.n 8030b4c #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: snmp_inc_ipindelivers(); 8030b14: f001 fc14 bl 8032340 icmp_input(p, inp); 8030b18: 4620 mov r0, r4 8030b1a: 4639 mov r1, r7 8030b1c: f7ff fd20 bl 8030560 break; 8030b20: e014 b.n 8030b4c 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) && 8030b22: 4d16 ldr r5, [pc, #88] ; (8030b7c ) 8030b24: 4639 mov r1, r7 8030b26: 6828 ldr r0, [r5, #0] 8030b28: f7ff fe3e bl 80307a8 8030b2c: b948 cbnz r0, 8030b42 !ip_addr_ismulticast(¤t_iphdr_dest)) { 8030b2e: 682b ldr r3, [r5, #0] 8030b30: 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) && 8030b34: 2be0 cmp r3, #224 ; 0xe0 8030b36: d004 beq.n 8030b42 !ip_addr_ismulticast(¤t_iphdr_dest)) { p->payload = iphdr; 8030b38: 6066 str r6, [r4, #4] icmp_dest_unreach(p, ICMP_DUR_PROTO); 8030b3a: 4620 mov r0, r4 8030b3c: 2102 movs r1, #2 8030b3e: f7ff fda5 bl 803068c } #endif /* LWIP_ICMP */ pbuf_free(p); 8030b42: 4620 mov r0, r4 8030b44: f7fc ff96 bl 802da74 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(); 8030b48: f001 fbea bl 8032320 } } current_netif = NULL; 8030b4c: 4a0d ldr r2, [pc, #52] ; (8030b84 ) 8030b4e: 2300 movs r3, #0 8030b50: 6013 str r3, [r2, #0] current_header = NULL; 8030b52: 4a0d ldr r2, [pc, #52] ; (8030b88 ) 8030b54: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_src); 8030b56: 4a0a ldr r2, [pc, #40] ; (8030b80 ) 8030b58: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_dest); 8030b5a: 4a08 ldr r2, [pc, #32] ; (8030b7c ) 8030b5c: 6013 str r3, [r2, #0] return ERR_OK; 8030b5e: e009 b.n 8030b74 * * #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) { 8030b60: 7a73 ldrb r3, [r6, #9] 8030b62: 2b11 cmp r3, #17 8030b64: d089 beq.n 8030a7a #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)) 8030b66: f8df 8018 ldr.w r8, [pc, #24] ; 8030b80 8030b6a: f8d8 0000 ldr.w r0, [r8] 8030b6e: 2800 cmp r0, #0 8030b70: d09d beq.n 8030aae 8030b72: e789 b.n 8030a88 current_header = NULL; ip_addr_set_any(¤t_iphdr_src); ip_addr_set_any(¤t_iphdr_dest); return ERR_OK; } 8030b74: 2000 movs r0, #0 8030b76: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8030b7a: bf00 nop 8030b7c: 200110a4 .word 0x200110a4 8030b80: 2001109c .word 0x2001109c 8030b84: 200110a0 .word 0x200110a0 8030b88: 200110a8 .word 0x200110a8 8030b8c: 20011070 .word 0x20011070 08030b90 : */ 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) { 8030b90: e92d 47f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} 8030b94: 4615 mov r5, r2 8030b96: 4606 mov r6, r0 8030b98: 4689 mov r9, r1 8030b9a: 469a mov sl, r3 8030b9c: 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(); 8030b9e: f001 fbd7 bl 8032350 /* Should the IP header be generated or is it already included in p? */ if (dest != IP_HDRINCL) { 8030ba2: b3b5 cbz r5, 8030c12 } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_header(p, IP_HLEN)) { 8030ba4: 4630 mov r0, r6 8030ba6: 2114 movs r1, #20 8030ba8: f7fc ff39 bl 802da1e 8030bac: 4680 mov r8, r0 8030bae: b118 cbz r0, 8030bb8 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(); 8030bb0: f001 fbd6 bl 8032360 return ERR_BUF; 8030bb4: 20fe movs r0, #254 ; 0xfe 8030bb6: e036 b.n 8030c26 } iphdr = (struct ip_hdr *)p->payload; 8030bb8: 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); 8030bba: 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); 8030bbe: f884 a008 strb.w sl, [r4, #8] IPH_PROTO_SET(iphdr, proto); 8030bc2: 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); 8030bc4: 682b ldr r3, [r5, #0] 8030bc6: 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); 8030bc8: 2345 movs r3, #69 ; 0x45 8030bca: 7023 strb r3, [r4, #0] IPH_TOS_SET(iphdr, tos); 8030bcc: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8030bd0: 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)); 8030bd2: 8930 ldrh r0, [r6, #8] 8030bd4: f7fb fe10 bl 802c7f8 #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 8030bd8: f884 8006 strb.w r8, [r4, #6] 8030bdc: f884 8007 strb.w r8, [r4, #7] IPH_ID_SET(iphdr, htons(ip_id)); 8030be0: f8df 8048 ldr.w r8, [pc, #72] ; 8030c2c 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)); 8030be4: 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)); 8030be6: f8b8 0000 ldrh.w r0, [r8] 8030bea: f7fb fe05 bl 802c7f8 8030bee: 80a0 strh r0, [r4, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 8030bf0: f8b8 3000 ldrh.w r3, [r8] 8030bf4: 3301 adds r3, #1 8030bf6: f8a8 3000 strh.w r3, [r8] if (ip_addr_isany(src)) { 8030bfa: f1b9 0f00 cmp.w r9, #0 8030bfe: d002 beq.n 8030c06 8030c00: f8d9 3000 ldr.w r3, [r9] 8030c04: b903 cbnz r3, 8030c08 ip_addr_copy(iphdr->src, netif->ip_addr); 8030c06: 687b ldr r3, [r7, #4] } else { /* src cannot be NULL here */ ip_addr_copy(iphdr->src, *src); 8030c08: 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); 8030c0a: 2300 movs r3, #0 8030c0c: 72a3 strb r3, [r4, #10] 8030c0e: 72e3 strb r3, [r4, #11] 8030c10: e004 b.n 8030c1c #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); 8030c12: 6873 ldr r3, [r6, #4] 8030c14: ad02 add r5, sp, #8 8030c16: 691b ldr r3, [r3, #16] 8030c18: 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); 8030c1c: 697b ldr r3, [r7, #20] 8030c1e: 4638 mov r0, r7 8030c20: 4631 mov r1, r6 8030c22: 462a mov r2, r5 8030c24: 4798 blx r3 } 8030c26: b240 sxtb r0, r0 8030c28: e8bd 87fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} 8030c2c: 2000e1d4 .word 0x2000e1d4 08030c30 : * 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) { 8030c30: b5f0 push {r4, r5, r6, r7, lr} 8030c32: 4605 mov r5, r0 8030c34: 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) { 8030c36: 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) { 8030c38: 460f mov r7, r1 8030c3a: 4614 mov r4, r2 8030c3c: 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) { 8030c3e: f7ff fea3 bl 8030988 8030c42: b168 cbz r0, 8030c60 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); 8030c44: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8030c48: 9002 str r0, [sp, #8] 8030c4a: 9300 str r3, [sp, #0] 8030c4c: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c 8030c50: 4628 mov r0, r5 8030c52: 9301 str r3, [sp, #4] 8030c54: 4639 mov r1, r7 8030c56: 4622 mov r2, r4 8030c58: 4633 mov r3, r6 8030c5a: f7ff ff99 bl 8030b90 8030c5e: e000 b.n 8030c62 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; 8030c60: 20fc movs r0, #252 ; 0xfc } return ip_output_if(p, src, dest, ttl, tos, proto, netif); } 8030c62: b240 sxtb r0, r0 8030c64: b005 add sp, #20 8030c66: bdf0 pop {r4, r5, r6, r7, pc} 08030c68 : * @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) { 8030c68: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8030c6a: 2300 movs r3, #0 while (p != NULL) 8030c6c: e00c b.n 8030c88 { base = plen; plen += p->len; 8030c6e: 8944 ldrh r4, [r0, #10] 8030c70: 191c adds r4, r3, r4 8030c72: b2a4 uxth r4, r4 if (ofs < plen) 8030c74: 42a1 cmp r1, r4 8030c76: d205 bcs.n 8030c84 { msg_ptr = (u8_t*)p->payload; 8030c78: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8030c7a: 1acb subs r3, r1, r3 *type = *msg_ptr; 8030c7c: 5cc3 ldrb r3, [r0, r3] return ERR_OK; 8030c7e: 2000 movs r0, #0 plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; *type = *msg_ptr; 8030c80: 7013 strb r3, [r2, #0] return ERR_OK; 8030c82: e004 b.n 8030c8e } p = p->next; 8030c84: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8030c86: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8030c88: 2800 cmp r0, #0 8030c8a: d1f0 bne.n 8030c6e return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8030c8c: 20f2 movs r0, #242 ; 0xf2 } 8030c8e: b240 sxtb r0, r0 8030c90: bd10 pop {r4, pc} 08030c92 : * @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) { 8030c92: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8030c94: 2500 movs r5, #0 while (p != NULL) 8030c96: e079 b.n 8030d8c { base = plen; plen += p->len; 8030c98: 8944 ldrh r4, [r0, #10] 8030c9a: 192c adds r4, r5, r4 8030c9c: b2a4 uxth r4, r4 if (ofs < plen) 8030c9e: 42a1 cmp r1, r4 8030ca0: d272 bcs.n 8030d88 { msg_ptr = (u8_t*)p->payload; 8030ca2: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; 8030ca6: 1b4f subs r7, r1, r5 8030ca8: eb0c 0507 add.w r5, ip, r7 if (*msg_ptr < 0x80) 8030cac: f81c 6007 ldrb.w r6, [ip, r7] 8030cb0: f016 0f80 tst.w r6, #128 ; 0x80 8030cb4: d105 bne.n 8030cc2 { /* primitive definite length format */ *octets_used = 1; 8030cb6: 2101 movs r1, #1 8030cb8: 7011 strb r1, [r2, #0] *length = *msg_ptr; 8030cba: f81c 2007 ldrb.w r2, [ip, r7] 8030cbe: 801a strh r2, [r3, #0] 8030cc0: e05a b.n 8030d78 return ERR_OK; } else if (*msg_ptr == 0x80) 8030cc2: 2e80 cmp r6, #128 ; 0x80 8030cc4: d12a bne.n 8030d1c { /* constructed indefinite length format, termination with two zero octets */ u8_t zeros; u8_t i; *length = 0; 8030cc6: 2600 movs r6, #0 8030cc8: 801e strh r6, [r3, #0] 8030cca: e022 b.n 8030d12 { i = 2; while (i > 0) { i--; (*length) += 1; 8030ccc: f8b3 c000 ldrh.w ip, [r3] ofs += 1; 8030cd0: 3101 adds r1, #1 8030cd2: b289 uxth r1, r1 { i = 2; while (i > 0) { i--; (*length) += 1; 8030cd4: f10c 0c01 add.w ip, ip, #1 ofs += 1; if (ofs >= plen) 8030cd8: 42a1 cmp r1, r4 { i = 2; while (i > 0) { i--; (*length) += 1; 8030cda: f8a3 c000 strh.w ip, [r3] ofs += 1; if (ofs >= plen) 8030cde: d308 bcc.n 8030cf2 { /* next octet in next pbuf */ p = p->next; 8030ce0: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030ce2: b900 cbnz r0, 8030ce6 8030ce4: e04e b.n 8030d84 msg_ptr = (u8_t*)p->payload; plen += p->len; 8030ce6: 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; 8030cea: 6845 ldr r5, [r0, #4] plen += p->len; 8030cec: 4464 add r4, ip 8030cee: b2a4 uxth r4, r4 8030cf0: e000 b.n 8030cf4 } else { /* next octet in same pbuf */ msg_ptr++; 8030cf2: 3501 adds r5, #1 } if (*msg_ptr == 0) 8030cf4: f895 c000 ldrb.w ip, [r5] 8030cf8: f1bc 0f00 cmp.w ip, #0 8030cfc: d104 bne.n 8030d08 { zeros++; 8030cfe: 3601 adds r6, #1 8030d00: b2f6 uxtb r6, r6 if (zeros == 2) 8030d02: 2e02 cmp r6, #2 8030d04: d101 bne.n 8030d0a 8030d06: e007 b.n 8030d18 i = 0; } } else { zeros = 0; 8030d08: 2600 movs r6, #0 *length = 0; zeros = 0; while (zeros != 2) { i = 2; while (i > 0) 8030d0a: 42b9 cmp r1, r7 8030d0c: d1de bne.n 8030ccc u8_t zeros; u8_t i; *length = 0; zeros = 0; while (zeros != 2) 8030d0e: 2e02 cmp r6, #2 8030d10: d002 beq.n 8030d18 * @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) 8030d12: 1c8f adds r7, r1, #2 8030d14: b2bf uxth r7, r7 8030d16: e7d9 b.n 8030ccc { zeros = 0; } } } *octets_used = 1; 8030d18: 2301 movs r3, #1 8030d1a: e02c b.n 8030d76 return ERR_OK; } else if (*msg_ptr == 0x81) 8030d1c: 2e81 cmp r6, #129 ; 0x81 8030d1e: d10c bne.n 8030d3a { /* constructed definite length format, one octet */ ofs += 1; 8030d20: 3101 adds r1, #1 if (ofs >= plen) 8030d22: b289 uxth r1, r1 8030d24: 42a1 cmp r1, r4 8030d26: d303 bcc.n 8030d30 { /* next octet in next pbuf */ p = p->next; 8030d28: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030d2a: b359 cbz r1, 8030d84 msg_ptr = (u8_t*)p->payload; 8030d2c: 684d ldr r5, [r1, #4] 8030d2e: e000 b.n 8030d32 } else { /* next octet in same pbuf */ msg_ptr++; 8030d30: 3501 adds r5, #1 } *length = *msg_ptr; 8030d32: 7829 ldrb r1, [r5, #0] 8030d34: 8019 strh r1, [r3, #0] *octets_used = 2; 8030d36: 2302 movs r3, #2 8030d38: e01d b.n 8030d76 return ERR_OK; } else if (*msg_ptr == 0x82) 8030d3a: 2e82 cmp r6, #130 ; 0x82 8030d3c: d11e bne.n 8030d7c /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 8030d3e: 1c4e adds r6, r1, #1 if (ofs >= plen) 8030d40: b2b6 uxth r6, r6 8030d42: 42a6 cmp r6, r4 8030d44: d201 bcs.n 8030d4a plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8030d46: 3501 adds r5, #1 8030d48: e005 b.n 8030d56 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8030d4a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030d4c: b1d0 cbz r0, 8030d84 msg_ptr = (u8_t*)p->payload; plen += p->len; 8030d4e: 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; 8030d50: 6845 ldr r5, [r0, #4] plen += p->len; 8030d52: 19a4 adds r4, r4, r6 8030d54: b2a4 uxth r4, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8030d56: 782e ldrb r6, [r5, #0] /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 8030d58: 3102 adds r1, #2 if (ofs >= plen) 8030d5a: b289 uxth r1, r1 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8030d5c: 0236 lsls r6, r6, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8030d5e: 42a1 cmp r1, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 8030d60: 801e strh r6, [r3, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 8030d62: d201 bcs.n 8030d68 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 8030d64: 3501 adds r5, #1 8030d66: e002 b.n 8030d6e i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 8030d68: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030d6a: b159 cbz r1, 8030d84 msg_ptr = (u8_t*)p->payload; 8030d6c: 684d ldr r5, [r1, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *length |= *msg_ptr; 8030d6e: 7829 ldrb r1, [r5, #0] 8030d70: 430e orrs r6, r1 8030d72: 801e strh r6, [r3, #0] { /* most significant length octet */ *length = (*msg_ptr) << 8; } } *octets_used = 3; 8030d74: 2303 movs r3, #3 8030d76: 7013 strb r3, [r2, #0] return ERR_OK; 8030d78: 2000 movs r0, #0 8030d7a: e00a b.n 8030d92 } 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); 8030d7c: f006 067f and.w r6, r6, #127 ; 0x7f 8030d80: 3601 adds r6, #1 8030d82: 7016 strb r6, [r2, #0] return ERR_ARG; 8030d84: 20f2 movs r0, #242 ; 0xf2 8030d86: e004 b.n 8030d92 } } p = p->next; 8030d88: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8030d8a: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8030d8c: 2800 cmp r0, #0 8030d8e: d183 bne.n 8030c98 8030d90: e7f8 b.n 8030d84 p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8030d92: b240 sxtb r0, r0 8030d94: bdf0 pop {r4, r5, r6, r7, pc} 08030d96 : * 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) { 8030d96: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8030d9a: 2500 movs r5, #0 while (p != NULL) 8030d9c: e049 b.n 8030e32 { base = plen; plen += p->len; 8030d9e: 8944 ldrh r4, [r0, #10] 8030da0: 192c adds r4, r5, r4 8030da2: b2a4 uxth r4, r4 if (ofs < plen) 8030da4: 42a1 cmp r1, r4 8030da6: d242 bcs.n 8030e2e { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8030da8: 1e56 subs r6, r2, #1 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 8030daa: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 8030dae: b2b6 uxth r6, r6 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8030db0: 1b4f subs r7, r1, r5 if ((len > 0) && (len < 6)) 8030db2: 2e04 cmp r6, #4 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8030db4: eb0c 0507 add.w r5, ip, r7 if ((len > 0) && (len < 6)) 8030db8: d901 bls.n 8030dbe *value |= *msg_ptr; return ERR_OK; } else { return ERR_ARG; 8030dba: 20f2 movs r0, #242 ; 0xf2 8030dbc: e03c b.n 8030e38 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) { /* start from zero */ *value = 0; 8030dbe: f04f 0800 mov.w r8, #0 8030dc2: f8c3 8000 str.w r8, [r3] if (*msg_ptr & 0x80) 8030dc6: f81c 7007 ldrb.w r7, [ip, r7] 8030dca: f017 0f80 tst.w r7, #128 ; 0x80 8030dce: d1f4 bne.n 8030dba return ERR_ARG; } else { /* positive */ if ((len > 1) && (*msg_ptr == 0)) 8030dd0: 2a01 cmp r2, #1 8030dd2: d00e beq.n 8030df2 8030dd4: b96f cbnz r7, 8030df2 { /* skip leading "sign byte" octet 0x00 */ len--; ofs += 1; 8030dd6: 3101 adds r1, #1 8030dd8: b289 uxth r1, r1 if (ofs >= plen) 8030dda: 42a1 cmp r1, r4 { /* positive */ if ((len > 1) && (*msg_ptr == 0)) { /* skip leading "sign byte" octet 0x00 */ len--; 8030ddc: 4632 mov r2, r6 ofs += 1; if (ofs >= plen) 8030dde: d307 bcc.n 8030df0 { /* next octet in next pbuf */ p = p->next; 8030de0: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030de2: 2800 cmp r0, #0 8030de4: d0e9 beq.n 8030dba msg_ptr = (u8_t*)p->payload; plen += p->len; 8030de6: 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; 8030de8: 6845 ldr r5, [r0, #4] plen += p->len; 8030dea: 19a4 adds r4, r4, r6 8030dec: b2a4 uxth r4, r4 8030dee: e000 b.n 8030df2 } else { /* next octet in same pbuf */ msg_ptr++; 8030df0: 3501 adds r5, #1 8030df2: 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) 8030df4: 188a adds r2, r1, r2 8030df6: b2b6 uxth r6, r6 8030df8: b292 uxth r2, r2 8030dfa: e010 b.n 8030e1e } /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; 8030dfc: 7829 ldrb r1, [r5, #0] 8030dfe: 430f orrs r7, r1 *value <<= 8; 8030e00: 023f lsls r7, r7, #8 ofs += 1; if (ofs >= plen) 8030e02: 42a6 cmp r6, r4 /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; *value <<= 8; 8030e04: 601f str r7, [r3, #0] ofs += 1; if (ofs >= plen) 8030e06: d307 bcc.n 8030e18 { /* next octet in next pbuf */ p = p->next; 8030e08: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030e0a: 2800 cmp r0, #0 8030e0c: d0d5 beq.n 8030dba msg_ptr = (u8_t*)p->payload; plen += p->len; 8030e0e: 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; 8030e10: 6845 ldr r5, [r0, #4] plen += p->len; 8030e12: 1864 adds r4, r4, r1 8030e14: b2a4 uxth r4, r4 8030e16: e000 b.n 8030e1a } else { /* next octet in same pbuf */ msg_ptr++; 8030e18: 3501 adds r5, #1 8030e1a: 3601 adds r6, #1 8030e1c: b2b6 uxth r6, r6 msg_ptr++; } } } /* OR octets with value */ while (len > 1) 8030e1e: 4296 cmp r6, r2 8030e20: 681f ldr r7, [r3, #0] 8030e22: d1eb bne.n 8030dfc { /* next octet in same pbuf */ msg_ptr++; } } *value |= *msg_ptr; 8030e24: 782a ldrb r2, [r5, #0] 8030e26: 4317 orrs r7, r2 8030e28: 601f str r7, [r3, #0] return ERR_OK; 8030e2a: 2000 movs r0, #0 8030e2c: e004 b.n 8030e38 else { return ERR_ARG; } } p = p->next; 8030e2e: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8030e30: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 8030e32: 2800 cmp r0, #0 8030e34: d1b3 bne.n 8030d9e 8030e36: e7c0 b.n 8030dba } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8030e38: b240 sxtb r0, r0 8030e3a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08030e3e : * * @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) { 8030e3e: 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; 8030e42: 2500 movs r5, #0 while (p != NULL) 8030e44: e04e b.n 8030ee4 { base = plen; plen += p->len; 8030e46: 8944 ldrh r4, [r0, #10] 8030e48: 192c adds r4, r5, r4 8030e4a: b2a4 uxth r4, r4 if (ofs < plen) 8030e4c: 42a1 cmp r1, r4 8030e4e: d247 bcs.n 8030ee0 { msg_ptr = (u8_t*)p->payload; 8030e50: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 5)) 8030e52: 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; 8030e56: 1b4e subs r6, r1, r5 if ((len > 0) && (len < 5)) 8030e58: f1bc 0f03 cmp.w ip, #3 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8030e5c: eb07 0506 add.w r5, r7, r6 if ((len > 0) && (len < 5)) 8030e60: d901 bls.n 8030e66 } return ERR_OK; } else { return ERR_ARG; 8030e62: 20f2 movs r0, #242 ; 0xf2 8030e64: e041 b.n 8030eea { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 5)) { if (*msg_ptr & 0x80) 8030e66: 57be ldrsb r6, [r7, r6] 8030e68: 2e00 cmp r6, #0 8030e6a: da0b bge.n 8030e84 { /* negative, start from -1 */ *value = -1; 8030e6c: f04f 36ff mov.w r6, #4294967295 8030e70: 601e str r6, [r3, #0] sign = 1; 8030e72: 2601 movs r6, #1 8030e74: 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) 8030e78: 1852 adds r2, r2, r1 8030e7a: fa1f fc8c uxth.w ip, ip 8030e7e: b292 uxth r2, r2 len--; if (sign) { *lsb_ptr &= *msg_ptr; *value <<= 8; *lsb_ptr |= 255; 8030e80: 21ff movs r1, #255 ; 0xff 8030e82: e022 b.n 8030eca sign = 1; } else { /* positive, start from 0 */ *value = 0; 8030e84: 2600 movs r6, #0 8030e86: 601e str r6, [r3, #0] 8030e88: e7f4 b.n 8030e74 8030e8a: f895 8000 ldrb.w r8, [r5] } /* OR/AND octets with value */ while (len > 1) { len--; if (sign) 8030e8e: b13e cbz r6, 8030ea0 { *lsb_ptr &= *msg_ptr; 8030e90: ea08 0707 and.w r7, r8, r7 8030e94: 701f strb r7, [r3, #0] *value <<= 8; 8030e96: 681f ldr r7, [r3, #0] 8030e98: 023f lsls r7, r7, #8 8030e9a: 601f str r7, [r3, #0] *lsb_ptr |= 255; 8030e9c: 7019 strb r1, [r3, #0] 8030e9e: e005 b.n 8030eac } else { *lsb_ptr |= *msg_ptr; 8030ea0: ea48 0707 orr.w r7, r8, r7 8030ea4: 701f strb r7, [r3, #0] *value <<= 8; 8030ea6: 681f ldr r7, [r3, #0] 8030ea8: 023f lsls r7, r7, #8 8030eaa: 601f str r7, [r3, #0] } ofs += 1; if (ofs >= plen) 8030eac: 45a4 cmp ip, r4 8030eae: d307 bcc.n 8030ec0 { /* next octet in next pbuf */ p = p->next; 8030eb0: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030eb2: 2800 cmp r0, #0 8030eb4: d0d5 beq.n 8030e62 msg_ptr = (u8_t*)p->payload; plen += p->len; 8030eb6: 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; 8030eb8: 6845 ldr r5, [r0, #4] plen += p->len; 8030eba: 19e4 adds r4, r4, r7 8030ebc: b2a4 uxth r4, r4 8030ebe: e000 b.n 8030ec2 } else { /* next octet in same pbuf */ msg_ptr++; 8030ec0: 3501 adds r5, #1 8030ec2: f10c 0c01 add.w ip, ip, #1 8030ec6: fa1f fc8c uxth.w ip, ip /* positive, start from 0 */ *value = 0; sign = 0; } /* OR/AND octets with value */ while (len > 1) 8030eca: 4594 cmp ip, r2 8030ecc: 781f ldrb r7, [r3, #0] 8030ece: d1dc bne.n 8030e8a 8030ed0: 782a ldrb r2, [r5, #0] { /* next octet in same pbuf */ msg_ptr++; } } if (sign) 8030ed2: b11e cbz r6, 8030edc { *lsb_ptr &= *msg_ptr; 8030ed4: 4017 ands r7, r2 8030ed6: 701f strb r7, [r3, #0] } else { *lsb_ptr |= *msg_ptr; } return ERR_OK; 8030ed8: 2000 movs r0, #0 8030eda: e006 b.n 8030eea { *lsb_ptr &= *msg_ptr; } else { *lsb_ptr |= *msg_ptr; 8030edc: 4317 orrs r7, r2 8030ede: e7fa b.n 8030ed6 else { return ERR_ARG; } } p = p->next; 8030ee0: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8030ee2: 4625 mov r5, r4 u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; while (p != NULL) 8030ee4: 2800 cmp r0, #0 8030ee6: d1ae bne.n 8030e46 8030ee8: e7bb b.n 8030e62 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8030eea: b240 sxtb r0, r0 8030eec: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08030ef0 : * @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) { 8030ef0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; 8030ef4: 2600 movs r6, #0 while (p != NULL) 8030ef6: e08d b.n 8031014 { base = plen; plen += p->len; 8030ef8: 8944 ldrh r4, [r0, #10] 8030efa: 1934 adds r4, r6, r4 8030efc: b2a4 uxth r4, r4 if (ofs < plen) 8030efe: 42a1 cmp r1, r4 8030f00: f080 8086 bcs.w 8031010 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; oid->len = 0; 8030f04: f04f 0800 mov.w r8, #0 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 8030f08: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; oid->len = 0; 8030f0a: f883 8000 strb.w r8, [r3] oid_ptr = &oid->id[0]; if (len > 0) 8030f0e: b90a cbnz r2, 8030f14 } else { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; 8030f10: 2000 movs r0, #0 8030f12: e083 b.n 803101c base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8030f14: 1b8e subs r6, r1, r6 8030f16: 19bd adds r5, r7, r6 oid->len = 0; oid_ptr = &oid->id[0]; if (len > 0) { /* first compressed octet */ if (*msg_ptr == 0x2B) 8030f18: f817 c006 ldrb.w ip, [r7, r6] 8030f1c: f1bc 0f2b cmp.w ip, #43 ; 0x2b 8030f20: d103 bne.n 8030f2a { /* (most) common case 1.3 (iso.org) */ *oid_ptr = 1; 8030f22: 2601 movs r6, #1 8030f24: 605e str r6, [r3, #4] oid_ptr++; *oid_ptr = 3; 8030f26: 2603 movs r6, #3 8030f28: e016 b.n 8030f58 oid_ptr++; } else if (*msg_ptr < 40) 8030f2a: f1bc 0f27 cmp.w ip, #39 ; 0x27 8030f2e: d803 bhi.n 8030f38 { *oid_ptr = 0; 8030f30: f8c3 8004 str.w r8, [r3, #4] oid_ptr++; *oid_ptr = *msg_ptr; 8030f34: 5dbe ldrb r6, [r7, r6] 8030f36: e00f b.n 8030f58 oid_ptr++; } else if (*msg_ptr < 80) 8030f38: f1bc 0f4f cmp.w ip, #79 ; 0x4f 8030f3c: d806 bhi.n 8030f4c { *oid_ptr = 1; 8030f3e: f04f 0c01 mov.w ip, #1 8030f42: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 40; 8030f46: 5dbe ldrb r6, [r7, r6] 8030f48: 3e28 subs r6, #40 ; 0x28 8030f4a: e005 b.n 8030f58 oid_ptr++; } else { *oid_ptr = 2; 8030f4c: f04f 0c02 mov.w ip, #2 8030f50: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 8030f54: 5dbe ldrb r6, [r7, r6] 8030f56: 3e50 subs r6, #80 ; 0x50 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8030f58: 3a01 subs r2, #1 *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; } oid->len = 2; 8030f5a: 2702 movs r7, #2 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 8030f5c: b292 uxth r2, r2 } else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 8030f5e: 609e str r6, [r3, #8] oid_ptr++; } oid->len = 2; 8030f60: 701f strb r7, [r3, #0] else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; 8030f62: 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) 8030f66: 2a00 cmp r2, #0 8030f68: d04b beq.n 8031002 { ofs += 1; 8030f6a: 3101 adds r1, #1 8030f6c: b289 uxth r1, r1 if (ofs >= plen) 8030f6e: 42a1 cmp r1, r4 8030f70: d308 bcc.n 8030f84 { /* next octet in next pbuf */ p = p->next; 8030f72: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030f74: b908 cbnz r0, 8030f7a 8030f76: 20f2 movs r0, #242 ; 0xf2 8030f78: e050 b.n 803101c msg_ptr = (u8_t*)p->payload; plen += p->len; 8030f7a: 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; 8030f7c: 6845 ldr r5, [r0, #4] plen += p->len; 8030f7e: 19e4 adds r4, r4, r7 8030f80: b2a4 uxth r4, r4 8030f82: e03e b.n 8031002 } else { /* next octet in same pbuf */ msg_ptr++; 8030f84: 3501 adds r5, #1 8030f86: e03c b.n 8031002 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8030f88: 782f ldrb r7, [r5, #0] 8030f8a: f017 0f80 tst.w r7, #128 ; 0x80 8030f8e: d023 beq.n 8030fd8 8030f90: e014 b.n 8030fbc while ((*msg_ptr & 0x80) && (len > 1)) { len--; sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); ofs += 1; 8030f92: 3101 adds r1, #1 8030f94: b289 uxth r1, r1 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 8030f96: 3a01 subs r2, #1 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 8030f98: f02c 0c80 bic.w ip, ip, #128 ; 0x80 ofs += 1; if (ofs >= plen) 8030f9c: 42a1 cmp r1, r4 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 8030f9e: b292 uxth r2, r2 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 8030fa0: eb0c 17c7 add.w r7, ip, r7, lsl #7 ofs += 1; if (ofs >= plen) 8030fa4: d308 bcc.n 8030fb8 { /* next octet in next pbuf */ p = p->next; 8030fa6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030fa8: 2800 cmp r0, #0 8030faa: d0e4 beq.n 8030f76 msg_ptr = (u8_t*)p->payload; plen += p->len; 8030fac: 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; 8030fb0: 6845 ldr r5, [r0, #4] plen += p->len; 8030fb2: 4464 add r4, ip 8030fb4: b2a4 uxth r4, r4 8030fb6: e002 b.n 8030fbe } else { /* next octet in same pbuf */ msg_ptr++; 8030fb8: 3501 adds r5, #1 8030fba: e000 b.n 8030fbe } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 8030fbc: 2700 movs r7, #0 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) 8030fbe: f895 c000 ldrb.w ip, [r5] 8030fc2: f01c 0f80 tst.w ip, #128 ; 0x80 8030fc6: d02c beq.n 8031022 8030fc8: 2a01 cmp r2, #1 8030fca: d1e2 bne.n 8030f92 8030fcc: e009 b.n 8030fe2 } } if (!(*msg_ptr & 0x80) && (len > 0)) { /* last octet sub-identifier */ len--; 8030fce: 3a01 subs r2, #1 8030fd0: b292 uxth r2, r2 sub_id = (sub_id << 7) + *msg_ptr; 8030fd2: eb0c 17c7 add.w r7, ip, r7, lsl #7 8030fd6: e001 b.n 8030fdc } } else { /* !(*msg_ptr & 0x80) sub-identifier uses single octet */ len--; 8030fd8: 3a01 subs r2, #1 8030fda: b292 uxth r2, r2 *oid_ptr = *msg_ptr; 8030fdc: f846 7c04 str.w r7, [r6, #-4] } if (len > 0) 8030fe0: b162 cbz r2, 8030ffc { /* remaining oid bytes available ... */ ofs += 1; 8030fe2: 3101 adds r1, #1 8030fe4: b289 uxth r1, r1 if (ofs >= plen) 8030fe6: 42a1 cmp r1, r4 8030fe8: d307 bcc.n 8030ffa { /* next octet in next pbuf */ p = p->next; 8030fea: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8030fec: 2800 cmp r0, #0 8030fee: d0c2 beq.n 8030f76 msg_ptr = (u8_t*)p->payload; plen += p->len; 8030ff0: 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; 8030ff2: 6845 ldr r5, [r0, #4] plen += p->len; 8030ff4: 19e4 adds r4, r4, r7 8030ff6: b2a4 uxth r4, r4 8030ff8: e000 b.n 8030ffc } else { /* next octet in same pbuf */ msg_ptr++; 8030ffa: 3501 adds r5, #1 } } oid_ptr++; oid->len++; 8030ffc: 781f ldrb r7, [r3, #0] 8030ffe: 3701 adds r7, #1 8031000: 701f strb r7, [r3, #0] 8031002: 3604 adds r6, #4 { /* next octet in same pbuf */ msg_ptr++; } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) 8031004: 2a00 cmp r2, #0 8031006: d083 beq.n 8030f10 8031008: 781f ldrb r7, [r3, #0] 803100a: 2f1f cmp r7, #31 803100c: d9bc bls.n 8030f88 803100e: e7b2 b.n 8030f76 /* len > 0, oid->len == LWIP_SNMP_OBJ_ID_LEN or malformed encoding */ return ERR_ARG; } } p = p->next; 8031010: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 8031012: 4626 mov r6, r4 u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; while (p != NULL) 8031014: 2800 cmp r0, #0 8031016: f47f af6f bne.w 8030ef8 803101a: e7ac b.n 8030f76 803101c: b240 sxtb r0, r0 803101e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} { /* next octet in same pbuf */ msg_ptr++; } } if (!(*msg_ptr & 0x80) && (len > 0)) 8031022: 2a00 cmp r2, #0 8031024: d1d3 bne.n 8030fce 8031026: e7e9 b.n 8030ffc 08031028 : * @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) { 8031028: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; if (len > 0) 803102a: 2a00 cmp r2, #0 803102c: d12d bne.n 803108a 803102e: e027 b.n 8031080 { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8031030: 8944 ldrh r4, [r0, #10] 8031032: 1934 adds r4, r6, r4 8031034: b2a4 uxth r4, r4 if (ofs < plen) 8031036: 42a1 cmp r1, r4 8031038: d224 bcs.n 8031084 { msg_ptr = (u8_t*)p->payload; 803103a: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 803103c: 1b8d subs r5, r1, r6 if (raw_len >= len) 803103e: 4293 cmp r3, r2 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 8031040: 443d add r5, r7 if (raw_len >= len) 8031042: d305 bcc.n 8031050 8031044: 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) 8031046: b29e uxth r6, r3 8031048: 18b2 adds r2, r6, r2 803104a: b292 uxth r2, r2 803104c: 1b89 subs r1, r1, r6 803104e: e011 b.n 8031074 return ERR_OK; } else { /* raw_len < len, not enough dst space */ return ERR_ARG; 8031050: 20f2 movs r0, #242 ; 0xf2 8031052: e01e b.n 8031092 { while (len > 1) { /* copy len - 1 octets */ len--; *raw = *msg_ptr; 8031054: 782e ldrb r6, [r5, #0] 8031056: 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) 803105a: 18ce adds r6, r1, r3 /* copy len - 1 octets */ len--; *raw = *msg_ptr; raw++; ofs += 1; if (ofs >= plen) 803105c: b2b6 uxth r6, r6 803105e: 42a6 cmp r6, r4 8031060: d307 bcc.n 8031072 { /* next octet in next pbuf */ p = p->next; 8031062: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031064: 2800 cmp r0, #0 8031066: d0f3 beq.n 8031050 msg_ptr = (u8_t*)p->payload; plen += p->len; 8031068: 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; 803106a: 6845 ldr r5, [r0, #4] plen += p->len; 803106c: 19a4 adds r4, r4, r6 803106e: b2a4 uxth r4, r4 8031070: e000 b.n 8031074 } else { /* next octet in same pbuf */ msg_ptr++; 8031072: 3501 adds r5, #1 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (raw_len >= len) { while (len > 1) 8031074: 1ad7 subs r7, r2, r3 8031076: b2bf uxth r7, r7 8031078: 2f01 cmp r7, #1 803107a: d8eb bhi.n 8031054 /* next octet in same pbuf */ msg_ptr++; } } /* copy last octet */ *raw = *msg_ptr; 803107c: 782a ldrb r2, [r5, #0] 803107e: 701a strb r2, [r3, #0] return ERR_OK; 8031080: 2000 movs r0, #0 8031082: e006 b.n 8031092 { /* raw_len < len, not enough dst space */ return ERR_ARG; } } p = p->next; 8031084: 6800 ldr r0, [r0, #0] { plen = 0; while (p != NULL) { base = plen; plen += p->len; 8031086: 4626 mov r6, r4 8031088: e000 b.n 803108c 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) 803108a: 2600 movs r6, #0 { plen = 0; while (p != NULL) 803108c: 2800 cmp r0, #0 803108e: d1cf bne.n 8031030 8031090: e7de b.n 8031050 else { /* len == 0, empty string */ return ERR_OK; } } 8031092: b240 sxtb r0, r0 8031094: bdf0 pop {r4, r5, r6, r7, pc} 08031096 : * @param octets_needed points to the return value */ void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed) { if (length < 0x80U) 8031096: 287f cmp r0, #127 ; 0x7f 8031098: d801 bhi.n 803109e { *octets_needed = 1; 803109a: 2301 movs r3, #1 803109c: e004 b.n 80310a8 } else if (length < 0x100U) 803109e: 28ff cmp r0, #255 ; 0xff 80310a0: d801 bhi.n 80310a6 { *octets_needed = 2; 80310a2: 2302 movs r3, #2 80310a4: e000 b.n 80310a8 } else { *octets_needed = 3; 80310a6: 2303 movs r3, #3 80310a8: 700b strb r3, [r1, #0] 80310aa: 4770 bx lr 080310ac : * 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) 80310ac: 287f cmp r0, #127 ; 0x7f 80310ae: d801 bhi.n 80310b4 { *octets_needed = 1; 80310b0: 2301 movs r3, #1 80310b2: e00e b.n 80310d2 } else if (value < 0x8000UL) 80310b4: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 80310b8: d201 bcs.n 80310be { *octets_needed = 2; 80310ba: 2302 movs r3, #2 80310bc: e009 b.n 80310d2 } else if (value < 0x800000UL) 80310be: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 80310c2: d201 bcs.n 80310c8 { *octets_needed = 3; 80310c4: 2303 movs r3, #3 80310c6: e004 b.n 80310d2 } else if (value < 0x80000000UL) 80310c8: 2800 cmp r0, #0 80310ca: db01 blt.n 80310d0 { *octets_needed = 4; 80310cc: 2304 movs r3, #4 80310ce: e000 b.n 80310d2 } else { *octets_needed = 5; 80310d0: 2305 movs r3, #5 80310d2: 800b strh r3, [r1, #0] 80310d4: 4770 bx lr 080310d6 : void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed) { if (value < 0) { value = ~value; 80310d6: 43c3 mvns r3, r0 80310d8: 4283 cmp r3, r0 80310da: bfa8 it ge 80310dc: 4618 movge r0, r3 } if (value < 0x80L) 80310de: 287f cmp r0, #127 ; 0x7f 80310e0: dc01 bgt.n 80310e6 { *octets_needed = 1; 80310e2: 2301 movs r3, #1 80310e4: e00a b.n 80310fc } else if (value < 0x8000L) 80310e6: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 80310ea: da01 bge.n 80310f0 { *octets_needed = 2; 80310ec: 2302 movs r3, #2 80310ee: e005 b.n 80310fc } else if (value < 0x800000L) 80310f0: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 80310f4: da01 bge.n 80310fa { *octets_needed = 3; 80310f6: 2303 movs r3, #3 80310f8: e000 b.n 80310fc } else { *octets_needed = 4; 80310fa: 2304 movs r3, #4 80310fc: 800b strh r3, [r1, #0] 80310fe: 4770 bx lr 08031100 : { s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 8031100: 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) { 8031102: b510 push {r4, lr} s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 8031104: d904 bls.n 8031110 { /* compressed prefix in one octet */ cnt++; ident_len -= 2; 8031106: 3802 subs r0, #2 8031108: b2c0 uxtb r0, r0 ident += 2; 803110a: 3108 adds r1, #8 cnt = 0; if (ident_len > 1) { /* compressed prefix in one octet */ cnt++; 803110c: 2301 movs r3, #1 803110e: e000 b.n 8031112 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; 8031110: 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) 8031112: 3904 subs r1, #4 8031114: e008 b.n 8031128 ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 8031116: 3801 subs r0, #1 sub_id = *ident; 8031118: f851 4f04 ldr.w r4, [r1, #4]! ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 803111c: b2c0 uxtb r0, r0 sub_id >>= 7; cnt++; while(sub_id > 0) { sub_id >>= 7; 803111e: 11e4 asrs r4, r4, #7 cnt++; 8031120: 3301 adds r3, #1 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8031122: 2c00 cmp r4, #0 { sub_id >>= 7; cnt++; 8031124: b2db uxtb r3, r3 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 8031126: dcfa bgt.n 803111e /* compressed prefix in one octet */ cnt++; ident_len -= 2; ident += 2; } while(ident_len > 0) 8031128: 2800 cmp r0, #0 803112a: d1f4 bne.n 8031116 sub_id >>= 7; cnt++; } ident++; } *octets_needed = cnt; 803112c: 8013 strh r3, [r2, #0] 803112e: bd10 pop {r4, pc} 08031130 : * @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) { 8031130: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 8031132: 2300 movs r3, #0 while (p != NULL) 8031134: e00b b.n 803114e { base = plen; plen += p->len; 8031136: 8944 ldrh r4, [r0, #10] 8031138: 191c adds r4, r3, r4 803113a: b2a4 uxth r4, r4 if (ofs < plen) 803113c: 42a1 cmp r1, r4 803113e: d204 bcs.n 803114a { msg_ptr = (u8_t*)p->payload; 8031140: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 8031142: 1acb subs r3, r1, r3 *msg_ptr = type; 8031144: 54c2 strb r2, [r0, r3] return ERR_OK; 8031146: 2000 movs r0, #0 8031148: e004 b.n 8031154 } p = p->next; 803114a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803114c: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803114e: 2800 cmp r0, #0 8031150: d1f1 bne.n 8031136 return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 8031152: 20f2 movs r0, #242 ; 0xf2 } 8031154: b240 sxtb r0, r0 8031156: bd10 pop {r4, pc} 08031158 : * @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) { 8031158: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803115a: 2400 movs r4, #0 while (p != NULL) 803115c: e03f b.n 80311de { base = plen; plen += p->len; 803115e: 8943 ldrh r3, [r0, #10] 8031160: 18e3 adds r3, r4, r3 8031162: b29b uxth r3, r3 if (ofs < plen) 8031164: 4299 cmp r1, r3 8031166: d238 bcs.n 80311da { msg_ptr = (u8_t*)p->payload; 8031168: 6845 ldr r5, [r0, #4] msg_ptr += ofs - base; 803116a: 1b0c subs r4, r1, r4 if (length < 0x80) 803116c: 2a7f cmp r2, #127 ; 0x7f base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 803116e: eb05 0604 add.w r6, r5, r4 if (length < 0x80) 8031172: d801 bhi.n 8031178 { *msg_ptr = (u8_t)length; 8031174: 552a strb r2, [r5, r4] 8031176: e02e b.n 80311d6 return ERR_OK; } else if (length < 0x100) 8031178: 2aff cmp r2, #255 ; 0xff 803117a: f101 0701 add.w r7, r1, #1 803117e: d80d bhi.n 803119c { *msg_ptr = 0x81; ofs += 1; if (ofs >= plen) 8031180: b2bf uxth r7, r7 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8031182: 2181 movs r1, #129 ; 0x81 ofs += 1; if (ofs >= plen) 8031184: 429f cmp r7, r3 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 8031186: 5529 strb r1, [r5, r4] ofs += 1; if (ofs >= plen) 8031188: d305 bcc.n 8031196 { /* next octet in next pbuf */ p = p->next; 803118a: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 803118c: b90b cbnz r3, 8031192 803118e: 20f2 movs r0, #242 ; 0xf2 8031190: e028 b.n 80311e4 msg_ptr = (u8_t*)p->payload; 8031192: 685e ldr r6, [r3, #4] 8031194: e000 b.n 8031198 } else { /* next octet in same pbuf */ msg_ptr++; 8031196: 3601 adds r6, #1 } *msg_ptr = (u8_t)length; 8031198: 7032 strb r2, [r6, #0] 803119a: e01c b.n 80311d6 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 803119c: b2bf uxth r7, r7 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 803119e: f04f 0c82 mov.w ip, #130 ; 0x82 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80311a2: 429f cmp r7, r3 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 80311a4: f805 c004 strb.w ip, [r5, r4] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80311a8: d201 bcs.n 80311ae plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80311aa: 1c74 adds r4, r6, #1 80311ac: e006 b.n 80311bc i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80311ae: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80311b0: 2800 cmp r0, #0 80311b2: d0ec beq.n 803118e msg_ptr = (u8_t*)p->payload; plen += p->len; 80311b4: 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; 80311b6: 6844 ldr r4, [r0, #4] plen += p->len; 80311b8: 195b adds r3, r3, r5 80311ba: b29b uxth r3, r3 *msg_ptr = 0x82; i = 2; while (i > 0) { i--; ofs += 1; 80311bc: 3102 adds r1, #2 if (ofs >= plen) 80311be: b289 uxth r1, r1 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 80311c0: 0a15 lsrs r5, r2, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80311c2: 4299 cmp r1, r3 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 80311c4: 7025 strb r5, [r4, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 80311c6: d201 bcs.n 80311cc plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 80311c8: 3401 adds r4, #1 80311ca: e003 b.n 80311d4 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 80311cc: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 80311ce: 2b00 cmp r3, #0 80311d0: d0dd beq.n 803118e msg_ptr = (u8_t*)p->payload; 80311d2: 685c ldr r4, [r3, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *msg_ptr = (u8_t)length; 80311d4: 7022 strb r2, [r4, #0] { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); } } return ERR_OK; 80311d6: 2000 movs r0, #0 80311d8: e004 b.n 80311e4 } } p = p->next; 80311da: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80311dc: 461c mov r4, r3 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80311de: 2800 cmp r0, #0 80311e0: d1bd bne.n 803115e 80311e2: e7d4 b.n 803118e } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80311e4: b240 sxtb r0, r0 80311e6: bdf0 pop {r4, r5, r6, r7, pc} 080311e8 : * * @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) { 80311e8: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80311ea: 2500 movs r5, #0 while (p != NULL) 80311ec: e037 b.n 803125e { base = plen; plen += p->len; 80311ee: 8944 ldrh r4, [r0, #10] 80311f0: 192c adds r4, r5, r4 80311f2: b2a4 uxth r4, r4 if (ofs < plen) 80311f4: 42a1 cmp r1, r4 80311f6: d230 bcs.n 803125a { msg_ptr = (u8_t*)p->payload; 80311f8: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 80311fa: 1b4e subs r6, r1, r5 if (octets_needed == 5) 80311fc: 2a05 cmp r2, #5 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80311fe: eb07 0506 add.w r5, r7, r6 if (octets_needed == 5) 8031202: d110 bne.n 8031226 { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; ofs += 1; 8031204: 3101 adds r1, #1 8031206: b289 uxth r1, r1 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 8031208: 2200 movs r2, #0 ofs += 1; if (ofs >= plen) 803120a: 42a1 cmp r1, r4 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 803120c: 55ba strb r2, [r7, r6] ofs += 1; if (ofs >= plen) 803120e: d308 bcc.n 8031222 { /* next octet in next pbuf */ p = p->next; 8031210: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031212: b908 cbnz r0, 8031218 8031214: 20f2 movs r0, #242 ; 0xf2 8031216: e025 b.n 8031264 msg_ptr = (u8_t*)p->payload; plen += p->len; 8031218: 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; 803121a: 6845 ldr r5, [r0, #4] plen += p->len; 803121c: 18a4 adds r4, r4, r2 803121e: b2a4 uxth r4, r4 8031220: e000 b.n 8031224 } else { /* next octet in same pbuf */ msg_ptr++; 8031222: 3501 adds r5, #1 msg_ptr += ofs - base; if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; 8031224: 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) 8031226: 1851 adds r1, r2, r1 8031228: e012 b.n 8031250 msg_ptr++; } } while (octets_needed > 1) { octets_needed--; 803122a: 3a01 subs r2, #1 803122c: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 803122e: 00d6 lsls r6, r2, #3 8031230: fa23 f606 lsr.w r6, r3, r6 8031234: 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) 8031236: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 8031238: b2b6 uxth r6, r6 803123a: 42a6 cmp r6, r4 803123c: d307 bcc.n 803124e { /* next octet in next pbuf */ p = p->next; 803123e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031240: 2800 cmp r0, #0 8031242: d0e7 beq.n 8031214 msg_ptr = (u8_t*)p->payload; plen += p->len; 8031244: 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; 8031246: 6845 ldr r5, [r0, #4] plen += p->len; 8031248: 19a4 adds r4, r4, r6 803124a: b2a4 uxth r4, r4 803124c: e000 b.n 8031250 } else { /* next octet in same pbuf */ msg_ptr++; 803124e: 3501 adds r5, #1 { /* next octet in same pbuf */ msg_ptr++; } } while (octets_needed > 1) 8031250: 2a01 cmp r2, #1 8031252: d8ea bhi.n 803122a /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 8031254: 702b strb r3, [r5, #0] return ERR_OK; 8031256: 2000 movs r0, #0 8031258: e004 b.n 8031264 } p = p->next; 803125a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803125c: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803125e: 2800 cmp r0, #0 8031260: d1c5 bne.n 80311ee 8031262: e7d7 b.n 8031214 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8031264: b240 sxtb r0, r0 8031266: bdf0 pop {r4, r5, r6, r7, pc} 08031268 : * * @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) { 8031268: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 803126a: 2600 movs r6, #0 while (p != NULL) 803126c: e024 b.n 80312b8 { base = plen; plen += p->len; 803126e: 8944 ldrh r4, [r0, #10] 8031270: 1934 adds r4, r6, r4 8031272: b2a4 uxth r4, r4 if (ofs < plen) 8031274: 42a1 cmp r1, r4 8031276: d21d bcs.n 80312b4 { msg_ptr = (u8_t*)p->payload; 8031278: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 803127a: 1b8d subs r5, r1, r6 803127c: 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) 803127e: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 8031280: e013 b.n 80312aa { octets_needed--; 8031282: 3a01 subs r2, #1 8031284: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 8031286: 00d6 lsls r6, r2, #3 8031288: fa43 f606 asr.w r6, r3, r6 803128c: 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) 803128e: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 8031290: b2b6 uxth r6, r6 8031292: 42a6 cmp r6, r4 8031294: d308 bcc.n 80312a8 { /* next octet in next pbuf */ p = p->next; 8031296: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031298: b908 cbnz r0, 803129e 803129a: 20f2 movs r0, #242 ; 0xf2 803129c: e00f b.n 80312be msg_ptr = (u8_t*)p->payload; plen += p->len; 803129e: 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; 80312a0: 6845 ldr r5, [r0, #4] plen += p->len; 80312a2: 19a4 adds r4, r4, r6 80312a4: b2a4 uxth r4, r4 80312a6: e000 b.n 80312aa } else { /* next octet in same pbuf */ msg_ptr++; 80312a8: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 80312aa: 2a01 cmp r2, #1 80312ac: d8e9 bhi.n 8031282 /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 80312ae: 702b strb r3, [r5, #0] return ERR_OK; 80312b0: 2000 movs r0, #0 80312b2: e004 b.n 80312be } p = p->next; 80312b4: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80312b6: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80312b8: 2800 cmp r0, #0 80312ba: d1d8 bne.n 803126e 80312bc: e7ed b.n 803129a } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80312be: b240 sxtb r0, r0 80312c0: bdf0 pop {r4, r5, r6, r7, pc} 080312c2 : * @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) { 80312c2: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80312c6: 2500 movs r5, #0 while (p != NULL) 80312c8: e068 b.n 803139c { base = plen; plen += p->len; 80312ca: 8944 ldrh r4, [r0, #10] 80312cc: 192c adds r4, r5, r4 80312ce: b2a4 uxth r4, r4 if (ofs < plen) 80312d0: 42a1 cmp r1, r4 80312d2: d261 bcs.n 8031398 { msg_ptr = (u8_t*)p->payload; 80312d4: 6846 ldr r6, [r0, #4] msg_ptr += ofs - base; 80312d6: 1b4d subs r5, r1, r5 if (ident_len > 1) 80312d8: 2a01 cmp r2, #1 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 80312da: eb06 0805 add.w r8, r6, r5 if (ident_len > 1) 80312de: d801 bhi.n 80312e4 } 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; 80312e0: 20f2 movs r0, #242 ; 0xf2 80312e2: e05e b.n 80313a2 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (ident_len > 1) { if ((ident[0] == 1) && (ident[1] == 3)) 80312e4: f8d3 c000 ldr.w ip, [r3] 80312e8: f1bc 0f01 cmp.w ip, #1 80312ec: d105 bne.n 80312fa 80312ee: 685f ldr r7, [r3, #4] 80312f0: 2f03 cmp r7, #3 80312f2: d102 bne.n 80312fa { /* compressed (most common) prefix .iso.org */ *msg_ptr = 0x2b; 80312f4: 272b movs r7, #43 ; 0x2b 80312f6: 5577 strb r7, [r6, r5] 80312f8: e006 b.n 8031308 } else { /* calculate prefix */ *msg_ptr = (u8_t)((ident[0] * 40) + ident[1]); 80312fa: 685f ldr r7, [r3, #4] 80312fc: f04f 0928 mov.w r9, #40 ; 0x28 8031300: fb09 7c0c mla ip, r9, ip, r7 8031304: f806 c005 strb.w ip, [r6, r5] } ofs += 1; 8031308: 3101 adds r1, #1 803130a: b289 uxth r1, r1 if (ofs >= plen) 803130c: 42a1 cmp r1, r4 803130e: d307 bcc.n 8031320 { /* next octet in next pbuf */ p = p->next; 8031310: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031312: 2800 cmp r0, #0 8031314: d0e4 beq.n 80312e0 msg_ptr = (u8_t*)p->payload; plen += p->len; 8031316: 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; 8031318: 6845 ldr r5, [r0, #4] plen += p->len; 803131a: 19a4 adds r4, r4, r6 803131c: b2a4 uxth r4, r4 803131e: e001 b.n 8031324 } else { /* next octet in same pbuf */ msg_ptr++; 8031320: f108 0501 add.w r5, r8, #1 } ident_len -= 2; 8031324: 3a02 subs r2, #2 8031326: 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) 8031328: 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) 803132a: e031 b.n 8031390 { s32_t sub_id; u8_t shift, tail; ident_len--; 803132c: 3a01 subs r2, #1 sub_id = *ident; 803132e: f853 cf04 ldr.w ip, [r3, #4]! while (ident_len > 0) { s32_t sub_id; u8_t shift, tail; ident_len--; 8031332: b2d2 uxtb r2, r2 sub_id = *ident; 8031334: 261c movs r6, #28 tail = 0; 8031336: 2700 movs r7, #0 shift = 28; while(shift > 0) { u8_t code; code = (u8_t)(sub_id >> shift); 8031338: fa4c f806 asr.w r8, ip, r6 if ((code != 0) || (tail != 0)) 803133c: f018 0fff tst.w r8, #255 ; 0xff 8031340: d100 bne.n 8031344 8031342: b18f cbz r7, 8031368 { tail = 1; *msg_ptr = code | 0x80; ofs += 1; 8031344: 3101 adds r1, #1 8031346: b289 uxth r1, r1 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 8031348: f048 0880 orr.w r8, r8, #128 ; 0x80 ofs += 1; if (ofs >= plen) 803134c: 42a1 cmp r1, r4 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 803134e: f885 8000 strb.w r8, [r5] ofs += 1; if (ofs >= plen) 8031352: d307 bcc.n 8031364 { /* next octet in next pbuf */ p = p->next; 8031354: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031356: 2800 cmp r0, #0 8031358: d0c2 beq.n 80312e0 msg_ptr = (u8_t*)p->payload; plen += p->len; 803135a: 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; 803135c: 6845 ldr r5, [r0, #4] plen += p->len; 803135e: 19e4 adds r4, r4, r7 8031360: b2a4 uxth r4, r4 8031362: e000 b.n 8031366 } else { /* next octet in same pbuf */ msg_ptr++; 8031364: 3501 adds r5, #1 u8_t code; code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; 8031366: 2701 movs r7, #1 ident_len--; sub_id = *ident; tail = 0; shift = 28; while(shift > 0) 8031368: 3e07 subs r6, #7 803136a: d1e5 bne.n 8031338 msg_ptr++; } } shift -= 7; } *msg_ptr = (u8_t)sub_id & 0x7F; 803136c: f00c 0c7f and.w ip, ip, #127 ; 0x7f 8031370: f885 c000 strb.w ip, [r5] if (ident_len > 0) 8031374: b172 cbz r2, 8031394 { ofs += 1; 8031376: 3101 adds r1, #1 8031378: b289 uxth r1, r1 if (ofs >= plen) 803137a: 42a1 cmp r1, r4 803137c: d307 bcc.n 803138e { /* next octet in next pbuf */ p = p->next; 803137e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 8031380: 2800 cmp r0, #0 8031382: d0ad beq.n 80312e0 msg_ptr = (u8_t*)p->payload; plen += p->len; 8031384: 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; 8031386: 6845 ldr r5, [r0, #4] plen += p->len; 8031388: 19a4 adds r4, r4, r6 803138a: b2a4 uxth r4, r4 803138c: e000 b.n 8031390 } else { /* next octet in same pbuf */ msg_ptr++; 803138e: 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) 8031390: 2a00 cmp r2, #0 8031392: d1cb bne.n 803132c } } /* proceed to next sub-identifier */ ident++; } return ERR_OK; 8031394: 2000 movs r0, #0 8031396: e004 b.n 80313a2 } p = p->next; 8031398: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 803139a: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 803139c: 2800 cmp r0, #0 803139e: d194 bne.n 80312ca 80313a0: e79e b.n 80312e0 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 80313a2: b240 sxtb r0, r0 80313a4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 080313a8 : * @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) { 80313a8: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 80313aa: 2600 movs r6, #0 while (p != NULL) 80313ac: e025 b.n 80313fa { base = plen; plen += p->len; 80313ae: 8944 ldrh r4, [r0, #10] 80313b0: 1934 adds r4, r6, r4 80313b2: b2a4 uxth r4, r4 if (ofs < plen) 80313b4: 42a1 cmp r1, r4 80313b6: d21e bcs.n 80313f6 { msg_ptr = (u8_t*)p->payload; 80313b8: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 80313ba: 1b8d subs r5, r1, r6 80313bc: 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) 80313be: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 80313c0: e012 b.n 80313e8 { /* copy raw_len - 1 octets */ raw_len--; 80313c2: 3a01 subs r2, #1 *msg_ptr = *raw; 80313c4: f813 6b01 ldrb.w r6, [r3], #1 msg_ptr += ofs - base; while (raw_len > 1) { /* copy raw_len - 1 octets */ raw_len--; 80313c8: b292 uxth r2, r2 *msg_ptr = *raw; 80313ca: 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) 80313cc: 1a8e subs r6, r1, r2 /* copy raw_len - 1 octets */ raw_len--; *msg_ptr = *raw; raw++; ofs += 1; if (ofs >= plen) 80313ce: b2b6 uxth r6, r6 80313d0: 42a6 cmp r6, r4 80313d2: d308 bcc.n 80313e6 { /* next octet in next pbuf */ p = p->next; 80313d4: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 80313d6: b908 cbnz r0, 80313dc 80313d8: 20f2 movs r0, #242 ; 0xf2 80313da: e012 b.n 8031402 msg_ptr = (u8_t*)p->payload; plen += p->len; 80313dc: 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; 80313de: 6845 ldr r5, [r0, #4] plen += p->len; 80313e0: 19a4 adds r4, r4, r6 80313e2: b2a4 uxth r4, r4 80313e4: e000 b.n 80313e8 } else { /* next octet in same pbuf */ msg_ptr++; 80313e6: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 80313e8: 2a01 cmp r2, #1 80313ea: d8ea bhi.n 80313c2 { /* next octet in same pbuf */ msg_ptr++; } } if (raw_len > 0) 80313ec: b142 cbz r2, 8031400 { /* copy last or single octet */ *msg_ptr = *raw; 80313ee: 781b ldrb r3, [r3, #0] } return ERR_OK; 80313f0: 2000 movs r0, #0 } } if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; 80313f2: 702b strb r3, [r5, #0] 80313f4: e005 b.n 8031402 } return ERR_OK; } p = p->next; 80313f6: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 80313f8: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 80313fa: 2800 cmp r0, #0 80313fc: d1d7 bne.n 80313ae 80313fe: e7eb b.n 80313d8 if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; } return ERR_OK; 8031400: 4610 mov r0, r2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 8031402: b240 sxtb r0, r0 8031404: bdf0 pop {r4, r5, r6, r7, pc} 08031406 : 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; 8031406: 2300 movs r3, #0 8031408: 7013 strb r3, [r2, #0] 803140a: 4770 bx lr 0803140c : } void noleafs_get_value(struct obj_def *od, u16_t len, void *value) { 803140c: 4770 bx lr 0803140e : LWIP_UNUSED_ARG(od); LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value); /* can't set */ return 0; } 803140e: 2000 movs r0, #0 8031410: 4770 bx lr 08031412 : void noleafs_set_value(struct obj_def *od, u16_t len, void *value) { 8031412: 4770 bx lr 08031414 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031414: 2801 cmp r0, #1 8031416: d145 bne.n 80314a4 { od->id_inst_len = ident_len; 8031418: 2002 movs r0, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 803141a: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 803141c: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 803141e: 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) 8031420: f811 3c04 ldrb.w r3, [r1, #-4] 8031424: 3b01 subs r3, #1 8031426: 2b06 cmp r3, #6 8031428: d83c bhi.n 80314a4 803142a: e8df f003 tbb [pc, r3] 803142e: 0b04 .short 0x0b04 8031430: 2a221a14 .word 0x2a221a14 8031434: 34 .byte 0x34 8031435: 00 .byte 0x00 { case 1: /* sysDescr */ od->instance = MIB_OBJECT_SCALAR; 8031436: 2301 movs r3, #1 8031438: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803143a: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803143c: 2304 movs r3, #4 803143e: 7093 strb r3, [r2, #2] od->v_len = *sysdescr_len_ptr; 8031440: 4b1a ldr r3, [pc, #104] ; (80314ac ) 8031442: e025 b.n 8031490 break; case 2: /* sysObjectID */ od->instance = MIB_OBJECT_SCALAR; 8031444: 2301 movs r3, #1 8031446: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031448: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 803144a: 2306 movs r3, #6 803144c: 7093 strb r3, [r2, #2] od->v_len = sysobjid.len * sizeof(s32_t); 803144e: 4b18 ldr r3, [pc, #96] ; (80314b0 ) 8031450: 781b ldrb r3, [r3, #0] 8031452: 009b lsls r3, r3, #2 8031454: e024 b.n 80314a0 break; case 3: /* sysUpTime */ od->instance = MIB_OBJECT_SCALAR; 8031456: 2301 movs r3, #1 8031458: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803145a: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 803145c: 2343 movs r3, #67 ; 0x43 803145e: 7093 strb r3, [r2, #2] 8031460: e01d b.n 803149e od->v_len = sizeof(u32_t); break; case 4: /* sysContact */ od->instance = MIB_OBJECT_SCALAR; 8031462: 2301 movs r3, #1 8031464: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031466: 2303 movs r3, #3 8031468: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803146a: 2304 movs r3, #4 803146c: 7093 strb r3, [r2, #2] od->v_len = *syscontact_len_ptr; 803146e: 4b11 ldr r3, [pc, #68] ; (80314b4 ) 8031470: e00e b.n 8031490 break; case 5: /* sysName */ od->instance = MIB_OBJECT_SCALAR; 8031472: 2301 movs r3, #1 8031474: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031476: 2303 movs r3, #3 8031478: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803147a: 2304 movs r3, #4 803147c: 7093 strb r3, [r2, #2] od->v_len = *sysname_len_ptr; 803147e: 4b0e ldr r3, [pc, #56] ; (80314b8 ) 8031480: e006 b.n 8031490 break; case 6: /* sysLocation */ od->instance = MIB_OBJECT_SCALAR; 8031482: 2301 movs r3, #1 8031484: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031486: 2303 movs r3, #3 8031488: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 803148a: 2304 movs r3, #4 803148c: 7093 strb r3, [r2, #2] od->v_len = *syslocation_len_ptr; 803148e: 4b0b ldr r3, [pc, #44] ; (80314bc ) 8031490: 681b ldr r3, [r3, #0] 8031492: 781b ldrb r3, [r3, #0] 8031494: e004 b.n 80314a0 break; case 7: /* sysServices */ od->instance = MIB_OBJECT_SCALAR; 8031496: 2301 movs r3, #1 8031498: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803149a: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803149c: 7090 strb r0, [r2, #2] od->v_len = sizeof(s32_t); 803149e: 2304 movs r3, #4 80314a0: 8093 strh r3, [r2, #4] break; 80314a2: 4770 bx lr }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80314a4: 2300 movs r3, #0 80314a6: 7013 strb r3, [r2, #0] 80314a8: 4770 bx lr 80314aa: bf00 nop 80314ac: 20001810 .word 0x20001810 80314b0: 200016c0 .word 0x200016c0 80314b4: 2000166c .word 0x2000166c 80314b8: 20001668 .word 0x20001668 80314bc: 20001854 .word 0x20001854 080314c0 : 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) 80314c0: 2801 cmp r0, #1 80314c2: d109 bne.n 80314d8 { od->id_inst_len = ident_len; 80314c4: 2302 movs r3, #2 80314c6: 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; 80314c8: 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); 80314ca: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 80314cc: 2304 movs r3, #4 ident_len += 1; ident -= 1; if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 80314ce: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 80314d0: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 80314d2: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); 80314d4: 8093 strh r3, [r2, #4] 80314d6: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("interfaces_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 80314d8: 2300 movs r3, #0 80314da: 7013 strb r3, [r2, #0] 80314dc: 4770 bx lr 80314de: 0000 movs r0, r0 080314e0 : */ 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) 80314e0: 6883 ldr r3, [r0, #8] 80314e2: 681b ldr r3, [r3, #0] 80314e4: 2b01 cmp r3, #1 80314e6: d102 bne.n 80314ee { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = iflist_root.count; 80314e8: 4b01 ldr r3, [pc, #4] ; (80314f0 ) 80314ea: 8b9b ldrh r3, [r3, #28] 80314ec: 6013 str r3, [r2, #0] 80314ee: 4770 bx lr 80314f0: 200016a0 .word 0x200016a0 080314f4 : { 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]; 80314f4: 6883 ldr r3, [r0, #8] switch (id) 80314f6: 781b ldrb r3, [r3, #0] 80314f8: 3b01 subs r3, #1 80314fa: 2b16 cmp r3, #22 80314fc: d836 bhi.n 803156c 80314fe: e8df f003 tbb [pc, r3] 8031502: 0e0c .short 0x0e0c 8031504: 16141210 .word 0x16141210 8031508: 1e1c1a18 .word 0x1e1c1a18 803150c: 26242220 .word 0x26242220 8031510: 2e2c2a28 .word 0x2e2c2a28 8031514: 35353530 .word 0x35353530 8031518: 32 .byte 0x32 8031519: 00 .byte 0x00 #if IP_FORWARD /* forwarding */ *sint_ptr = 1; #else /* not-forwarding */ *sint_ptr = 2; 803151a: 2302 movs r3, #2 803151c: e025 b.n 803156a } break; case 2: /* ipDefaultTTL */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = IP_DEFAULT_TTL; 803151e: 23ff movs r3, #255 ; 0xff 8031520: e023 b.n 803156a } break; case 3: /* ipInReceives */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinreceives; 8031522: 4b13 ldr r3, [pc, #76] ; (8031570 ) 8031524: e020 b.n 8031568 } break; case 4: /* ipInHdrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinhdrerrors; 8031526: 4b13 ldr r3, [pc, #76] ; (8031574 ) 8031528: e01e b.n 8031568 } break; case 5: /* ipInAddrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinaddrerrors; 803152a: 4b13 ldr r3, [pc, #76] ; (8031578 ) 803152c: e01c b.n 8031568 } break; case 6: /* ipForwDatagrams */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipforwdatagrams; 803152e: 4b13 ldr r3, [pc, #76] ; (803157c ) 8031530: e01a b.n 8031568 } break; case 7: /* ipInUnknownProtos */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinunknownprotos; 8031532: 4b13 ldr r3, [pc, #76] ; (8031580 ) 8031534: e018 b.n 8031568 } break; case 8: /* ipInDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindiscards; 8031536: 4b13 ldr r3, [pc, #76] ; (8031584 ) 8031538: e016 b.n 8031568 } break; case 9: /* ipInDelivers */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindelivers; 803153a: 4b13 ldr r3, [pc, #76] ; (8031588 ) 803153c: e014 b.n 8031568 } break; case 10: /* ipOutRequests */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutrequests; 803153e: 4b13 ldr r3, [pc, #76] ; (803158c ) 8031540: e012 b.n 8031568 } break; case 11: /* ipOutDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutdiscards; 8031542: 4b13 ldr r3, [pc, #76] ; (8031590 ) 8031544: e010 b.n 8031568 } break; case 12: /* ipOutNoRoutes */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutnoroutes; 8031546: 4b13 ldr r3, [pc, #76] ; (8031594 ) 8031548: e00e b.n 8031568 { s32_t *sint_ptr = (s32_t*)value; #if IP_REASSEMBLY *sint_ptr = IP_REASS_MAXAGE; #else *sint_ptr = 0; 803154a: 2300 movs r3, #0 803154c: e00d b.n 803156a } break; case 14: /* ipReasmReqds */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmreqds; 803154e: 4b12 ldr r3, [pc, #72] ; (8031598 ) 8031550: e00a b.n 8031568 } break; case 15: /* ipReasmOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmoks; 8031552: 4b12 ldr r3, [pc, #72] ; (803159c ) 8031554: e008 b.n 8031568 } break; case 16: /* ipReasmFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmfails; 8031556: 4b12 ldr r3, [pc, #72] ; (80315a0 ) 8031558: e006 b.n 8031568 } break; case 17: /* ipFragOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragoks; 803155a: 4b12 ldr r3, [pc, #72] ; (80315a4 ) 803155c: e004 b.n 8031568 } break; case 18: /* ipFragFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragfails; 803155e: 4b12 ldr r3, [pc, #72] ; (80315a8 ) 8031560: e002 b.n 8031568 } break; case 19: /* ipFragCreates */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragcreates; 8031562: 4b12 ldr r3, [pc, #72] ; (80315ac ) 8031564: e000 b.n 8031568 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; 8031566: 4b12 ldr r3, [pc, #72] ; (80315b0 ) 8031568: 681b ldr r3, [r3, #0] 803156a: 6013 str r3, [r2, #0] 803156c: 4770 bx lr 803156e: bf00 nop 8031570: 2000e284 .word 0x2000e284 8031574: 2000e20c .word 0x2000e20c 8031578: 2000e1f0 .word 0x2000e1f0 803157c: 2000e30c .word 0x2000e30c 8031580: 2000e24c .word 0x2000e24c 8031584: 2000e2d8 .word 0x2000e2d8 8031588: 2000e310 .word 0x2000e310 803158c: 2000e2f8 .word 0x2000e2f8 8031590: 2000e29c .word 0x2000e29c 8031594: 2000e31c .word 0x2000e31c 8031598: 2000e26c .word 0x2000e26c 803159c: 2000e218 .word 0x2000e218 80315a0: 2000e2cc .word 0x2000e2cc 80315a4: 2000e1dc .word 0x2000e1dc 80315a8: 2000e248 .word 0x2000e248 80315ac: 2000e2e8 .word 0x2000e2e8 80315b0: 2000e2d4 .word 0x2000e2d4 080315b4 : 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]; 80315b4: 6883 ldr r3, [r0, #8] switch (id) 80315b6: 781b ldrb r3, [r3, #0] 80315b8: 2b01 cmp r3, #1 80315ba: d002 beq.n 80315c2 80315bc: 2b02 cmp r3, #2 80315be: d109 bne.n 80315d4 80315c0: e002 b.n 80315c8 #if IP_FORWARD /* forwarding */ if (*sint_ptr == 1) #else /* not-forwarding */ if (*sint_ptr == 2) 80315c2: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 80315c4: 2802 cmp r0, #2 80315c6: e001 b.n 80315cc { set_ok = 1; } break; case 2: /* ipDefaultTTL */ if (*sint_ptr == IP_DEFAULT_TTL) 80315c8: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 80315ca: 28ff cmp r0, #255 ; 0xff 80315cc: bf14 ite ne 80315ce: 2000 movne r0, #0 80315d0: 2001 moveq r0, #1 80315d2: 4770 bx lr 80315d4: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 80315d6: 4770 bx lr 080315d8 : /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 80315d8: 2801 cmp r0, #1 80315da: d12c bne.n 8031636 { od->id_inst_len = ident_len; 80315dc: 2305 movs r3, #5 80315de: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 80315e0: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 80315e4: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 80315e6: f811 3c10 ldrb.w r3, [r1, #-16] 80315ea: 3b01 subs r3, #1 80315ec: 2b0c cmp r3, #12 80315ee: d822 bhi.n 8031636 80315f0: e8df f003 tbb [pc, r3] 80315f4: 0d0d0d07 .word 0x0d0d0d07 80315f8: 0d070d0d .word 0x0d070d0d 80315fc: 0d070d11 .word 0x0d070d11 8031600: 18 .byte 0x18 8031601: 00 .byte 0x00 { case 1: /* ipRouteDest */ case 7: /* ipRouteNextHop */ case 11: /* ipRouteMask */ od->instance = MIB_OBJECT_TAB; 8031602: 2302 movs r3, #2 8031604: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031606: 2303 movs r3, #3 8031608: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 803160a: 2340 movs r3, #64 ; 0x40 803160c: e007 b.n 803161e case 5: /* ipRouteMetric3 */ case 6: /* ipRouteMetric4 */ case 8: /* ipRouteType */ case 10: /* ipRouteAge */ case 12: /* ipRouteMetric5 */ od->instance = MIB_OBJECT_TAB; 803160e: 2302 movs r3, #2 8031610: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031612: 2103 movs r1, #3 8031614: e002 b.n 803161c 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; 8031616: 2302 movs r3, #2 8031618: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803161a: 2101 movs r1, #1 803161c: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 803161e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8031620: 2304 movs r3, #4 8031622: e006 b.n 8031632 break; case 13: /* ipRouteInfo */ /** @note returning zeroDotZero (0.0) no routing protocol specific MIB */ od->instance = MIB_OBJECT_TAB; 8031624: 2302 movs r3, #2 8031626: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031628: 2301 movs r3, #1 803162a: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 803162c: 2306 movs r3, #6 803162e: 7093 strb r3, [r2, #2] od->v_len = iprouteinfo.len * sizeof(s32_t); 8031630: 2308 movs r3, #8 8031632: 8093 strh r3, [r2, #4] break; 8031634: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_rteentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031636: 2300 movs r3, #0 8031638: 7013 strb r3, [r2, #0] 803163a: 4770 bx lr 0803163c : 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) && 803163c: 2801 cmp r0, #1 803163e: d110 bne.n 8031662 (ident[0] > 0) && (ident[0] < 27)) 8031640: 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) && 8031644: 2b00 cmp r3, #0 8031646: dd0c ble.n 8031662 (ident[0] > 0) && (ident[0] < 27)) 8031648: 2b1a cmp r3, #26 803164a: dc0a bgt.n 8031662 { od->id_inst_len = ident_len; 803164c: 2302 movs r3, #2 803164e: 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); 8031650: 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; 8031652: 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); 8031654: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8031656: 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; 8031658: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 803165a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 803165c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 803165e: 8093 strh r3, [r2, #4] 8031660: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031662: 2300 movs r3, #0 8031664: 7013 strb r3, [r2, #0] 8031666: 4770 bx lr 08031668 : 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]; 8031668: 6883 ldr r3, [r0, #8] switch (id) 803166a: 781b ldrb r3, [r3, #0] 803166c: 3b01 subs r3, #1 803166e: 2b19 cmp r3, #25 8031670: d843 bhi.n 80316fa 8031672: e8df f003 tbb [pc, r3] 8031676: 0f0d .short 0x0f0d 8031678: 17151311 .word 0x17151311 803167c: 1f1d1b19 .word 0x1f1d1b19 8031680: 27252321 .word 0x27252321 8031684: 2f2d2b29 .word 0x2f2d2b29 8031688: 37353331 .word 0x37353331 803168c: 3f3d3b39 .word 0x3f3d3b39 { case 1: /* icmpInMsgs */ *uint_ptr = icmpinmsgs; 8031690: 4b1a ldr r3, [pc, #104] ; (80316fc ) 8031692: e030 b.n 80316f6 break; case 2: /* icmpInErrors */ *uint_ptr = icmpinerrors; 8031694: 4b1a ldr r3, [pc, #104] ; (8031700 ) 8031696: e02e b.n 80316f6 break; case 3: /* icmpInDestUnreachs */ *uint_ptr = icmpindestunreachs; 8031698: 4b1a ldr r3, [pc, #104] ; (8031704 ) 803169a: e02c b.n 80316f6 break; case 4: /* icmpInTimeExcds */ *uint_ptr = icmpintimeexcds; 803169c: 4b1a ldr r3, [pc, #104] ; (8031708 ) 803169e: e02a b.n 80316f6 break; case 5: /* icmpInParmProbs */ *uint_ptr = icmpinparmprobs; 80316a0: 4b1a ldr r3, [pc, #104] ; (803170c ) 80316a2: e028 b.n 80316f6 break; case 6: /* icmpInSrcQuenchs */ *uint_ptr = icmpinsrcquenchs; 80316a4: 4b1a ldr r3, [pc, #104] ; (8031710 ) 80316a6: e026 b.n 80316f6 break; case 7: /* icmpInRedirects */ *uint_ptr = icmpinredirects; 80316a8: 4b1a ldr r3, [pc, #104] ; (8031714 ) 80316aa: e024 b.n 80316f6 break; case 8: /* icmpInEchos */ *uint_ptr = icmpinechos; 80316ac: 4b1a ldr r3, [pc, #104] ; (8031718 ) 80316ae: e022 b.n 80316f6 break; case 9: /* icmpInEchoReps */ *uint_ptr = icmpinechoreps; 80316b0: 4b1a ldr r3, [pc, #104] ; (803171c ) 80316b2: e020 b.n 80316f6 break; case 10: /* icmpInTimestamps */ *uint_ptr = icmpintimestamps; 80316b4: 4b1a ldr r3, [pc, #104] ; (8031720 ) 80316b6: e01e b.n 80316f6 break; case 11: /* icmpInTimestampReps */ *uint_ptr = icmpintimestampreps; 80316b8: 4b1a ldr r3, [pc, #104] ; (8031724 ) 80316ba: e01c b.n 80316f6 break; case 12: /* icmpInAddrMasks */ *uint_ptr = icmpinaddrmasks; 80316bc: 4b1a ldr r3, [pc, #104] ; (8031728 ) 80316be: e01a b.n 80316f6 break; case 13: /* icmpInAddrMaskReps */ *uint_ptr = icmpinaddrmaskreps; 80316c0: 4b1a ldr r3, [pc, #104] ; (803172c ) 80316c2: e018 b.n 80316f6 break; case 14: /* icmpOutMsgs */ *uint_ptr = icmpoutmsgs; 80316c4: 4b1a ldr r3, [pc, #104] ; (8031730 ) 80316c6: e016 b.n 80316f6 break; case 15: /* icmpOutErrors */ *uint_ptr = icmpouterrors; 80316c8: 4b1a ldr r3, [pc, #104] ; (8031734 ) 80316ca: e014 b.n 80316f6 break; case 16: /* icmpOutDestUnreachs */ *uint_ptr = icmpoutdestunreachs; 80316cc: 4b1a ldr r3, [pc, #104] ; (8031738 ) 80316ce: e012 b.n 80316f6 break; case 17: /* icmpOutTimeExcds */ *uint_ptr = icmpouttimeexcds; 80316d0: 4b1a ldr r3, [pc, #104] ; (803173c ) 80316d2: e010 b.n 80316f6 break; case 18: /* icmpOutParmProbs */ *uint_ptr = icmpoutparmprobs; 80316d4: 4b1a ldr r3, [pc, #104] ; (8031740 ) 80316d6: e00e b.n 80316f6 break; case 19: /* icmpOutSrcQuenchs */ *uint_ptr = icmpoutsrcquenchs; 80316d8: 4b1a ldr r3, [pc, #104] ; (8031744 ) 80316da: e00c b.n 80316f6 break; case 20: /* icmpOutRedirects */ *uint_ptr = icmpoutredirects; 80316dc: 4b1a ldr r3, [pc, #104] ; (8031748 ) 80316de: e00a b.n 80316f6 break; case 21: /* icmpOutEchos */ *uint_ptr = icmpoutechos; 80316e0: 4b1a ldr r3, [pc, #104] ; (803174c ) 80316e2: e008 b.n 80316f6 break; case 22: /* icmpOutEchoReps */ *uint_ptr = icmpoutechoreps; 80316e4: 4b1a ldr r3, [pc, #104] ; (8031750 ) 80316e6: e006 b.n 80316f6 break; case 23: /* icmpOutTimestamps */ *uint_ptr = icmpouttimestamps; 80316e8: 4b1a ldr r3, [pc, #104] ; (8031754 ) 80316ea: e004 b.n 80316f6 break; case 24: /* icmpOutTimestampReps */ *uint_ptr = icmpouttimestampreps; 80316ec: 4b1a ldr r3, [pc, #104] ; (8031758 ) 80316ee: e002 b.n 80316f6 break; case 25: /* icmpOutAddrMasks */ *uint_ptr = icmpoutaddrmasks; 80316f0: 4b1a ldr r3, [pc, #104] ; (803175c ) 80316f2: e000 b.n 80316f6 break; case 26: /* icmpOutAddrMaskReps */ *uint_ptr = icmpoutaddrmaskreps; 80316f4: 4b1a ldr r3, [pc, #104] ; (8031760 ) 80316f6: 681b ldr r3, [r3, #0] 80316f8: 6013 str r3, [r2, #0] 80316fa: 4770 bx lr 80316fc: 2000e214 .word 0x2000e214 8031700: 2000e210 .word 0x2000e210 8031704: 2000e1ec .word 0x2000e1ec 8031708: 2000e2d0 .word 0x2000e2d0 803170c: 2000e304 .word 0x2000e304 8031710: 2000e1fc .word 0x2000e1fc 8031714: 2000e228 .word 0x2000e228 8031718: 2000e2c8 .word 0x2000e2c8 803171c: 2000e240 .word 0x2000e240 8031720: 2000e230 .word 0x2000e230 8031724: 2000e270 .word 0x2000e270 8031728: 2000e308 .word 0x2000e308 803172c: 2000e2a4 .word 0x2000e2a4 8031730: 2000e294 .word 0x2000e294 8031734: 2000e318 .word 0x2000e318 8031738: 2000e2ac .word 0x2000e2ac 803173c: 2000e260 .word 0x2000e260 8031740: 2000e224 .word 0x2000e224 8031744: 2000e278 .word 0x2000e278 8031748: 2000e234 .word 0x2000e234 803174c: 2000e314 .word 0x2000e314 8031750: 2000e2b4 .word 0x2000e2b4 8031754: 2000e280 .word 0x2000e280 8031758: 2000e264 .word 0x2000e264 803175c: 2000e22c .word 0x2000e22c 8031760: 2000e28c .word 0x2000e28c 08031764 : 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]; 8031764: 6883 ldr r3, [r0, #8] switch (id) 8031766: 781b ldrb r3, [r3, #0] 8031768: 3b01 subs r3, #1 803176a: 2b0e cmp r3, #14 803176c: d836 bhi.n 80317dc 803176e: e8df f003 tbb [pc, r3] 8031772: 0a08 .short 0x0a08 8031774: 1412100d .word 0x1412100d 8031778: 2a1a1816 .word 0x2a1a1816 803177c: 30352e2c .word 0x30352e2c 8031780: 32 .byte 0x32 8031781: 00 .byte 0x00 { case 1: /* tcpRtoAlgorithm, vanj(4) */ *sint_ptr = 4; 8031782: 2304 movs r3, #4 8031784: e029 b.n 80317da break; case 2: /* tcpRtoMin */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 1000; 8031786: f44f 737a mov.w r3, #1000 ; 0x3e8 803178a: e026 b.n 80317da break; case 3: /* tcpRtoMax */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 60000; 803178c: f64e 2360 movw r3, #60000 ; 0xea60 8031790: e023 b.n 80317da break; case 4: /* tcpMaxConn */ *sint_ptr = MEMP_NUM_TCP_PCB; 8031792: 230c movs r3, #12 8031794: e021 b.n 80317da break; case 5: /* tcpActiveOpens */ *uint_ptr = tcpactiveopens; 8031796: 4b12 ldr r3, [pc, #72] ; (80317e0 ) 8031798: e01e b.n 80317d8 break; case 6: /* tcpPassiveOpens */ *uint_ptr = tcppassiveopens; 803179a: 4b12 ldr r3, [pc, #72] ; (80317e4 ) 803179c: e01c b.n 80317d8 break; case 7: /* tcpAttemptFails */ *uint_ptr = tcpattemptfails; 803179e: 4b12 ldr r3, [pc, #72] ; (80317e8 ) 80317a0: e01a b.n 80317d8 break; case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; 80317a2: 4b12 ldr r3, [pc, #72] ; (80317ec ) 80317a4: e018 b.n 80317d8 break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; 80317a6: 4b12 ldr r3, [pc, #72] ; (80317f0 ) case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; 80317a8: 2100 movs r1, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 80317aa: 681b ldr r3, [r3, #0] while (pcb != NULL) 80317ac: e007 b.n 80317be { if ((pcb->state == ESTABLISHED) || 80317ae: 7e18 ldrb r0, [r3, #24] 80317b0: 2804 cmp r0, #4 80317b2: d001 beq.n 80317b8 80317b4: 2807 cmp r0, #7 80317b6: d101 bne.n 80317bc (pcb->state == CLOSE_WAIT)) { tcpcurrestab++; 80317b8: 3101 adds r1, #1 80317ba: b289 uxth r1, r1 } pcb = pcb->next; 80317bc: 68db ldr r3, [r3, #12] break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) 80317be: 2b00 cmp r3, #0 80317c0: d1f5 bne.n 80317ae { tcpcurrestab++; } pcb = pcb->next; } *uint_ptr = tcpcurrestab; 80317c2: 6011 str r1, [r2, #0] } break; 80317c4: 4770 bx lr case 10: /* tcpInSegs */ *uint_ptr = tcpinsegs; 80317c6: 4b0b ldr r3, [pc, #44] ; (80317f4 ) 80317c8: e006 b.n 80317d8 break; case 11: /* tcpOutSegs */ *uint_ptr = tcpoutsegs; 80317ca: 4b0b ldr r3, [pc, #44] ; (80317f8 ) 80317cc: e004 b.n 80317d8 break; case 12: /* tcpRetransSegs */ *uint_ptr = tcpretranssegs; 80317ce: 4b0b ldr r3, [pc, #44] ; (80317fc ) 80317d0: e002 b.n 80317d8 break; case 14: /* tcpInErrs */ *uint_ptr = tcpinerrs; 80317d2: 4b0b ldr r3, [pc, #44] ; (8031800 ) 80317d4: e000 b.n 80317d8 break; case 15: /* tcpOutRsts */ *uint_ptr = tcpoutrsts; 80317d6: 4b0b ldr r3, [pc, #44] ; (8031804 ) 80317d8: 681b ldr r3, [r3, #0] 80317da: 6013 str r3, [r2, #0] 80317dc: 4770 bx lr 80317de: bf00 nop 80317e0: 2000e208 .word 0x2000e208 80317e4: 2000e23c .word 0x2000e23c 80317e8: 2000e288 .word 0x2000e288 80317ec: 2000e21c .word 0x2000e21c 80317f0: 2001107c .word 0x2001107c 80317f4: 2000e298 .word 0x2000e298 80317f8: 2000e2e4 .word 0x2000e2e4 80317fc: 2000e2b8 .word 0x2000e2b8 8031800: 2000e244 .word 0x2000e244 8031804: 2000e2a8 .word 0x2000e2a8 08031808 : 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) && 8031808: 2801 cmp r0, #1 803180a: d110 bne.n 803182e (ident[0] > 0) && (ident[0] < 6)) 803180c: 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) && 8031810: 2b00 cmp r3, #0 8031812: dd0c ble.n 803182e (ident[0] > 0) && (ident[0] < 6)) 8031814: 2b05 cmp r3, #5 8031816: dc0a bgt.n 803182e { od->id_inst_len = ident_len; 8031818: 2302 movs r3, #2 803181a: 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); 803181c: 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; 803181e: 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); 8031820: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8031822: 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; 8031824: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 8031826: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031828: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 803182a: 8093 strh r3, [r2, #4] 803182c: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 803182e: 2300 movs r3, #0 8031830: 7013 strb r3, [r2, #0] 8031832: 4770 bx lr 08031834 : 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]; 8031834: 6883 ldr r3, [r0, #8] switch (id) 8031836: 781b ldrb r3, [r3, #0] 8031838: 3b01 subs r3, #1 803183a: 2b03 cmp r3, #3 803183c: d80c bhi.n 8031858 803183e: e8df f003 tbb [pc, r3] 8031842: 0402 .short 0x0402 8031844: 0806 .short 0x0806 { case 1: /* udpInDatagrams */ *uint_ptr = udpindatagrams; 8031846: 4b05 ldr r3, [pc, #20] ; (803185c ) 8031848: e004 b.n 8031854 break; case 2: /* udpNoPorts */ *uint_ptr = udpnoports; 803184a: 4b05 ldr r3, [pc, #20] ; (8031860 ) 803184c: e002 b.n 8031854 break; case 3: /* udpInErrors */ *uint_ptr = udpinerrors; 803184e: 4b05 ldr r3, [pc, #20] ; (8031864 ) 8031850: e000 b.n 8031854 break; case 4: /* udpOutDatagrams */ *uint_ptr = udpoutdatagrams; 8031852: 4b05 ldr r3, [pc, #20] ; (8031868 ) 8031854: 681b ldr r3, [r3, #0] 8031856: 6013 str r3, [r2, #0] 8031858: 4770 bx lr 803185a: bf00 nop 803185c: 2000e2c4 .word 0x2000e2c4 8031860: 2000e27c .word 0x2000e27c 8031864: 2000e2ec .word 0x2000e2ec 8031868: 2000e274 .word 0x2000e274 0803186c : 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]; 803186c: 6883 ldr r3, [r0, #8] switch (id) 803186e: 781b ldrb r3, [r3, #0] 8031870: 3b01 subs r3, #1 8031872: 2b1d cmp r3, #29 8031874: d84b bhi.n 803190e 8031876: e8df f003 tbb [pc, r3] 803187a: 110f .short 0x110f 803187c: 19171513 .word 0x19171513 8031880: 1f1d1b4a .word 0x1f1d1b4a 8031884: 27252321 .word 0x27252321 8031888: 2f2d2b29 .word 0x2f2d2b29 803188c: 37353331 .word 0x37353331 8031890: 3d3b394a .word 0x3d3b394a 8031894: 4643413f .word 0x4643413f { case 1: /* snmpInPkts */ *uint_ptr = snmpinpkts; 8031898: 4b1d ldr r3, [pc, #116] ; (8031910 ) 803189a: e032 b.n 8031902 break; case 2: /* snmpOutPkts */ *uint_ptr = snmpoutpkts; 803189c: 4b1d ldr r3, [pc, #116] ; (8031914 ) 803189e: e030 b.n 8031902 break; case 3: /* snmpInBadVersions */ *uint_ptr = snmpinbadversions; 80318a0: 4b1d ldr r3, [pc, #116] ; (8031918 ) 80318a2: e02e b.n 8031902 break; case 4: /* snmpInBadCommunityNames */ *uint_ptr = snmpinbadcommunitynames; 80318a4: 4b1d ldr r3, [pc, #116] ; (803191c ) 80318a6: e02c b.n 8031902 break; case 5: /* snmpInBadCommunityUses */ *uint_ptr = snmpinbadcommunityuses; 80318a8: 4b1d ldr r3, [pc, #116] ; (8031920 ) 80318aa: e02a b.n 8031902 break; case 6: /* snmpInASNParseErrs */ *uint_ptr = snmpinasnparseerrs; 80318ac: 4b1d ldr r3, [pc, #116] ; (8031924 ) 80318ae: e028 b.n 8031902 break; case 8: /* snmpInTooBigs */ *uint_ptr = snmpintoobigs; 80318b0: 4b1d ldr r3, [pc, #116] ; (8031928 ) 80318b2: e026 b.n 8031902 break; case 9: /* snmpInNoSuchNames */ *uint_ptr = snmpinnosuchnames; 80318b4: 4b1d ldr r3, [pc, #116] ; (803192c ) 80318b6: e024 b.n 8031902 break; case 10: /* snmpInBadValues */ *uint_ptr = snmpinbadvalues; 80318b8: 4b1d ldr r3, [pc, #116] ; (8031930 ) 80318ba: e022 b.n 8031902 break; case 11: /* snmpInReadOnlys */ *uint_ptr = snmpinreadonlys; 80318bc: 4b1d ldr r3, [pc, #116] ; (8031934 ) 80318be: e020 b.n 8031902 break; case 12: /* snmpInGenErrs */ *uint_ptr = snmpingenerrs; 80318c0: 4b1d ldr r3, [pc, #116] ; (8031938 ) 80318c2: e01e b.n 8031902 break; case 13: /* snmpInTotalReqVars */ *uint_ptr = snmpintotalreqvars; 80318c4: 4b1d ldr r3, [pc, #116] ; (803193c ) 80318c6: e01c b.n 8031902 break; case 14: /* snmpInTotalSetVars */ *uint_ptr = snmpintotalsetvars; 80318c8: 4b1d ldr r3, [pc, #116] ; (8031940 ) 80318ca: e01a b.n 8031902 break; case 15: /* snmpInGetRequests */ *uint_ptr = snmpingetrequests; 80318cc: 4b1d ldr r3, [pc, #116] ; (8031944 ) 80318ce: e018 b.n 8031902 break; case 16: /* snmpInGetNexts */ *uint_ptr = snmpingetnexts; 80318d0: 4b1d ldr r3, [pc, #116] ; (8031948 ) 80318d2: e016 b.n 8031902 break; case 17: /* snmpInSetRequests */ *uint_ptr = snmpinsetrequests; 80318d4: 4b1d ldr r3, [pc, #116] ; (803194c ) 80318d6: e014 b.n 8031902 break; case 18: /* snmpInGetResponses */ *uint_ptr = snmpingetresponses; 80318d8: 4b1d ldr r3, [pc, #116] ; (8031950 ) 80318da: e012 b.n 8031902 break; case 19: /* snmpInTraps */ *uint_ptr = snmpintraps; 80318dc: 4b1d ldr r3, [pc, #116] ; (8031954 ) 80318de: e010 b.n 8031902 break; case 20: /* snmpOutTooBigs */ *uint_ptr = snmpouttoobigs; 80318e0: 4b1d ldr r3, [pc, #116] ; (8031958 ) 80318e2: e00e b.n 8031902 break; case 21: /* snmpOutNoSuchNames */ *uint_ptr = snmpoutnosuchnames; 80318e4: 4b1d ldr r3, [pc, #116] ; (803195c ) 80318e6: e00c b.n 8031902 break; case 22: /* snmpOutBadValues */ *uint_ptr = snmpoutbadvalues; 80318e8: 4b1d ldr r3, [pc, #116] ; (8031960 ) 80318ea: e00a b.n 8031902 break; case 24: /* snmpOutGenErrs */ *uint_ptr = snmpoutgenerrs; 80318ec: 4b1d ldr r3, [pc, #116] ; (8031964 ) 80318ee: e008 b.n 8031902 break; case 25: /* snmpOutGetRequests */ *uint_ptr = snmpoutgetrequests; 80318f0: 4b1d ldr r3, [pc, #116] ; (8031968 ) 80318f2: e006 b.n 8031902 break; case 26: /* snmpOutGetNexts */ *uint_ptr = snmpoutgetnexts; 80318f4: 4b1d ldr r3, [pc, #116] ; (803196c ) 80318f6: e004 b.n 8031902 break; case 27: /* snmpOutSetRequests */ *uint_ptr = snmpoutsetrequests; 80318f8: 4b1d ldr r3, [pc, #116] ; (8031970 ) 80318fa: e002 b.n 8031902 break; case 28: /* snmpOutGetResponses */ *uint_ptr = snmpoutgetresponses; 80318fc: 4b1d ldr r3, [pc, #116] ; (8031974 ) 80318fe: e000 b.n 8031902 break; case 29: /* snmpOutTraps */ *uint_ptr = snmpouttraps; 8031900: 4b1d ldr r3, [pc, #116] ; (8031978 ) 8031902: 681b ldr r3, [r3, #0] 8031904: e002 b.n 803190c break; case 30: /* snmpEnableAuthenTraps */ *uint_ptr = *snmpenableauthentraps_ptr; 8031906: 4b1d ldr r3, [pc, #116] ; (803197c ) 8031908: 681b ldr r3, [r3, #0] 803190a: 781b ldrb r3, [r3, #0] 803190c: 6013 str r3, [r2, #0] 803190e: 4770 bx lr 8031910: 2000e220 .word 0x2000e220 8031914: 2000e2f0 .word 0x2000e2f0 8031918: 2000e2dc .word 0x2000e2dc 803191c: 2000e1f4 .word 0x2000e1f4 8031920: 2000e1f8 .word 0x2000e1f8 8031924: 2000e2e0 .word 0x2000e2e0 8031928: 2000e2a0 .word 0x2000e2a0 803192c: 2000e320 .word 0x2000e320 8031930: 2000e2bc .word 0x2000e2bc 8031934: 2000e290 .word 0x2000e290 8031938: 2000e268 .word 0x2000e268 803193c: 2000e2c0 .word 0x2000e2c0 8031940: 2000e200 .word 0x2000e200 8031944: 2000e254 .word 0x2000e254 8031948: 2000e1d8 .word 0x2000e1d8 803194c: 2000e2fc .word 0x2000e2fc 8031950: 2000e250 .word 0x2000e250 8031954: 2000e1e8 .word 0x2000e1e8 8031958: 2000e238 .word 0x2000e238 803195c: 2000e204 .word 0x2000e204 8031960: 2000e1e4 .word 0x2000e1e4 8031964: 2000e324 .word 0x2000e324 8031968: 2000e25c .word 0x2000e25c 803196c: 2000e2f4 .word 0x2000e2f4 8031970: 2000e300 .word 0x2000e300 8031974: 2000e1e0 .word 0x2000e1e0 8031978: 2000e258 .word 0x2000e258 803197c: 2000176c .word 0x2000176c 08031980 : { 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]; 8031980: 6883 ldr r3, [r0, #8] if (id == 30) 8031982: 781b ldrb r3, [r3, #0] 8031984: 2b1e cmp r3, #30 8031986: d103 bne.n 8031990 { /* snmpEnableAuthenTraps */ /* @todo @fixme: which kind of pointer is 'value'? s32_t or u8_t??? */ u8_t *ptr = (u8_t*)value; *snmpenableauthentraps_ptr = *ptr; 8031988: 4b02 ldr r3, [pc, #8] ; (8031994 ) 803198a: 7812 ldrb r2, [r2, #0] 803198c: 681b ldr r3, [r3, #0] 803198e: 701a strb r2, [r3, #0] 8031990: 4770 bx lr 8031992: bf00 nop 8031994: 2000176c .word 0x2000176c 08031998 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031998: 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) { 803199a: b513 push {r0, r1, r4, lr} 803199c: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803199e: d149 bne.n 8031a34 { od->id_inst_len = ident_len; 80319a0: 2302 movs r3, #2 80319a2: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 80319a4: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 80319a6: 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) 80319a8: f811 2c04 ldrb.w r2, [r1, #-4] 80319ac: 3a01 subs r2, #1 80319ae: 2a15 cmp r2, #21 80319b0: d840 bhi.n 8031a34 80319b2: e8df f002 tbb [pc, r2] 80319b6: 0e0b .short 0x0e0b 80319b8: 19140b0b .word 0x19140b0b 80319bc: 302b0b27 .word 0x302b0b27 80319c0: 30303030 .word 0x30303030 80319c4: 30303030 .word 0x30303030 80319c8: 37143030 .word 0x37143030 { case 1: /* ifIndex */ case 3: /* ifType */ case 4: /* ifMtu */ case 8: /* ifOperStatus */ od->instance = MIB_OBJECT_TAB; 80319cc: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 80319ce: 2201 movs r2, #1 80319d0: e01a b.n 8031a08 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; 80319d2: 2201 movs r2, #1 80319d4: 7062 strb r2, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80319d6: 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; 80319d8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80319da: 70a2 strb r2, [r4, #2] 80319dc: e028 b.n 8031a30 /** @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; 80319de: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 80319e0: 2301 movs r3, #1 80319e2: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 80319e4: 2342 movs r3, #66 ; 0x42 80319e6: e01a b.n 8031a1e break; case 6: /* ifPhysAddress */ { struct netif *netif; snmp_ifindextonetif(ident[1], &netif); 80319e8: 6808 ldr r0, [r1, #0] 80319ea: a901 add r1, sp, #4 80319ec: f001 f81c bl 8032a28 od->instance = MIB_OBJECT_TAB; 80319f0: 2302 movs r3, #2 80319f2: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 80319f4: 2301 movs r3, #1 80319f6: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 80319f8: 2304 movs r3, #4 80319fa: 70a3 strb r3, [r4, #2] od->v_len = netif->hwaddr_len; 80319fc: 9b01 ldr r3, [sp, #4] 80319fe: f893 3026 ldrb.w r3, [r3, #38] ; 0x26 8031a02: e015 b.n 8031a30 } break; case 7: /* ifAdminStatus */ od->instance = MIB_OBJECT_TAB; 8031a04: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 8031a06: 2203 movs r2, #3 8031a08: 7062 strb r2, [r4, #1] 8031a0a: e008 b.n 8031a1e 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; 8031a0c: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8031a0e: 2301 movs r3, #1 8031a10: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 8031a12: 2343 movs r3, #67 ; 0x43 8031a14: e003 b.n 8031a1e case 16: /* ifOutOctets */ case 17: /* ifOutUcastPkts */ case 18: /* ifOutNUcastPkts */ case 19: /* ifOutDiscarts */ case 20: /* ifOutErrors */ od->instance = MIB_OBJECT_TAB; 8031a16: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8031a18: 2301 movs r3, #1 8031a1a: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8031a1c: 2341 movs r3, #65 ; 0x41 8031a1e: 70a3 strb r3, [r4, #2] od->v_len = sizeof(u32_t); 8031a20: 2304 movs r3, #4 8031a22: e005 b.n 8031a30 break; case 22: /* ifSpecific */ /** @note returning zeroDotZero (0.0) no media specific MIB support */ od->instance = MIB_OBJECT_TAB; 8031a24: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8031a26: 2301 movs r3, #1 8031a28: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 8031a2a: 2306 movs r3, #6 8031a2c: 70a3 strb r3, [r4, #2] od->v_len = ifspecific.len * sizeof(s32_t); 8031a2e: 2308 movs r3, #8 8031a30: 80a3 strh r3, [r4, #4] break; 8031a32: e001 b.n 8031a38 }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ifentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031a34: 2300 movs r3, #0 8031a36: 7023 strb r3, [r4, #0] } } 8031a38: bd1c pop {r2, r3, r4, pc} 8031a3a: 0000 movs r0, r0 08031a3c : } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031a3c: b537 push {r0, r1, r2, r4, r5, lr} 8031a3e: 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); 8031a40: 6880 ldr r0, [r0, #8] 8031a42: a901 add r1, sp, #4 8031a44: 3004 adds r0, #4 } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031a46: 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); 8031a48: f001 f80c bl 8032a64 LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 8031a4c: 68a1 ldr r1, [r4, #8] pcb = udp_pcbs; 8031a4e: 4b0c ldr r3, [pc, #48] ; (8031a80 ) 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]; 8031a50: 8a8a ldrh r2, [r1, #20] pcb = udp_pcbs; 8031a52: 681b ldr r3, [r3, #0] while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 8031a54: 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) && 8031a56: e000 b.n 8031a5a !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) { pcb = pcb->next; 8031a58: 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) && 8031a5a: b17b cbz r3, 8031a7c 8031a5c: 681c ldr r4, [r3, #0] 8031a5e: 4284 cmp r4, r0 8031a60: d1fa bne.n 8031a58 !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) 8031a62: 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) && 8031a64: 4294 cmp r4, r2 8031a66: d1f7 bne.n 8031a58 8031a68: e003 b.n 8031a72 switch (id) { case 1: /* udpLocalAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = pcb->local_ip; 8031a6a: 6028 str r0, [r5, #0] } break; 8031a6c: e006 b.n 8031a7c case 2: /* udpLocalPort */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = pcb->local_port; 8031a6e: 602a str r2, [r5, #0] } break; 8031a70: e004 b.n 8031a7c 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) 8031a72: 780b ldrb r3, [r1, #0] 8031a74: 2b01 cmp r3, #1 8031a76: d0f8 beq.n 8031a6a 8031a78: 2b02 cmp r3, #2 8031a7a: d0f8 beq.n 8031a6e *sint_ptr = pcb->local_port; } break; } } } 8031a7c: bd3e pop {r1, r2, r3, r4, r5, pc} 8031a7e: bf00 nop 8031a80: 20011098 .word 0x20011098 08031a84 : } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031a84: b573 push {r0, r1, r4, r5, r6, lr} 8031a86: 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); 8031a88: 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; 8031a8a: 4b18 ldr r3, [pc, #96] ; (8031aec ) LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 8031a8c: a901 add r1, sp, #4 8031a8e: 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; 8031a90: 681c ldr r4, [r3, #0] } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031a92: 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); 8031a94: f000 ffe6 bl 8032a64 ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8031a98: 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; 8031a9a: 2300 movs r3, #0 while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 8031a9c: e002 b.n 8031aa4 { netif = netif->next; ifidx++; 8031a9e: 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; 8031aa0: 6824 ldr r4, [r4, #0] ifidx++; 8031aa2: 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)) 8031aa4: b304 cbz r4, 8031ae8 8031aa6: 6862 ldr r2, [r4, #4] 8031aa8: 4291 cmp r1, r2 8031aaa: d1f8 bne.n 8031a9e 8031aac: e00a b.n 8031ac4 switch (id) { case 1: /* ipAdEntAddr */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->ip_addr; 8031aae: 6863 ldr r3, [r4, #4] 8031ab0: e006 b.n 8031ac0 } break; case 2: /* ipAdEntIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = ifidx + 1; 8031ab2: 3301 adds r3, #1 8031ab4: e004 b.n 8031ac0 } break; case 3: /* ipAdEntNetMask */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->netmask; 8031ab6: 68a3 ldr r3, [r4, #8] 8031ab8: e002 b.n 8031ac0 { 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; 8031aba: 2301 movs r3, #1 8031abc: e000 b.n 8031ac0 *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; 8031abe: 2300 movs r3, #0 8031ac0: 602b str r3, [r5, #0] #endif } break; 8031ac2: e011 b.n 8031ae8 } 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]; 8031ac4: 68b2 ldr r2, [r6, #8] switch (id) 8031ac6: 7812 ldrb r2, [r2, #0] 8031ac8: 3a01 subs r2, #1 8031aca: 2a04 cmp r2, #4 8031acc: d80c bhi.n 8031ae8 8031ace: a101 add r1, pc, #4 ; (adr r1, 8031ad4 ) 8031ad0: f851 f022 ldr.w pc, [r1, r2, lsl #2] 8031ad4: 08031aaf .word 0x08031aaf 8031ad8: 08031ab3 .word 0x08031ab3 8031adc: 08031ab7 .word 0x08031ab7 8031ae0: 08031abb .word 0x08031abb 8031ae4: 08031abf .word 0x08031abf #endif } break; } } } 8031ae8: bd7c pop {r2, r3, r4, r5, r6, pc} 8031aea: bf00 nop 8031aec: 20011070 .word 0x20011070 08031af0 : } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031af0: 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); 8031af2: 6883 ldr r3, [r0, #8] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031af4: b085 sub sp, #20 8031af6: 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); 8031af8: a903 add r1, sp, #12 8031afa: 6858 ldr r0, [r3, #4] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031afc: 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); 8031afe: f000 ff93 bl 8032a28 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 8031b02: 68a8 ldr r0, [r5, #8] 8031b04: a902 add r1, sp, #8 8031b06: 3008 adds r0, #8 8031b08: f000 ffac bl 8032a64 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8031b0c: 9803 ldr r0, [sp, #12] 8031b0e: a902 add r1, sp, #8 8031b10: 466a mov r2, sp 8031b12: ab01 add r3, sp, #4 8031b14: f002 ffec bl 8034af0 8031b18: 2800 cmp r0, #0 8031b1a: db15 blt.n 8031b48 { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8031b1c: 68ab ldr r3, [r5, #8] switch (id) 8031b1e: 781a ldrb r2, [r3, #0] 8031b20: 3a01 subs r2, #1 8031b22: 2a03 cmp r2, #3 8031b24: d810 bhi.n 8031b48 8031b26: e8df f002 tbb [pc, r2] 8031b2a: 0402 .short 0x0402 8031b2c: 0d0a .short 0x0d0a { case 1: /* ipNetToMediaIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8031b2e: 685b ldr r3, [r3, #4] 8031b30: e009 b.n 8031b46 break; case 2: /* ipNetToMediaPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8031b32: 9b00 ldr r3, [sp, #0] 8031b34: 681a ldr r2, [r3, #0] 8031b36: 6022 str r2, [r4, #0] 8031b38: 889b ldrh r3, [r3, #4] 8031b3a: 80a3 strh r3, [r4, #4] } break; 8031b3c: e004 b.n 8031b48 case 3: /* ipNetToMediaNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 8031b3e: 9b01 ldr r3, [sp, #4] 8031b40: 681b ldr r3, [r3, #0] 8031b42: e000 b.n 8031b46 break; case 4: /* ipNetToMediaType */ { s32_t *sint_ptr = (s32_t*)value; /* dynamic (?) */ *sint_ptr = 3; 8031b44: 2303 movs r3, #3 8031b46: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8031b48: b005 add sp, #20 8031b4a: bd30 pop {r4, r5, pc} 08031b4c : } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031b4c: 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); 8031b4e: 6883 ldr r3, [r0, #8] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031b50: b085 sub sp, #20 8031b52: 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); 8031b54: a903 add r1, sp, #12 8031b56: 6858 ldr r0, [r3, #4] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031b58: 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); 8031b5a: f000 ff65 bl 8032a28 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 8031b5e: 68a8 ldr r0, [r5, #8] 8031b60: a902 add r1, sp, #8 8031b62: 3008 adds r0, #8 8031b64: f000 ff7e bl 8032a64 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 8031b68: 9803 ldr r0, [sp, #12] 8031b6a: a902 add r1, sp, #8 8031b6c: 466a mov r2, sp 8031b6e: ab01 add r3, sp, #4 8031b70: f002 ffbe bl 8034af0 8031b74: 2800 cmp r0, #0 8031b76: db12 blt.n 8031b9e { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8031b78: 68aa ldr r2, [r5, #8] switch (id) 8031b7a: 7813 ldrb r3, [r2, #0] 8031b7c: 2b02 cmp r3, #2 8031b7e: d005 beq.n 8031b8c 8031b80: 2b03 cmp r3, #3 8031b82: d009 beq.n 8031b98 8031b84: 2b01 cmp r3, #1 8031b86: d10a bne.n 8031b9e { case 1: /* atIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8031b88: 6853 ldr r3, [r2, #4] 8031b8a: e007 b.n 8031b9c break; case 2: /* atPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 8031b8c: 9b00 ldr r3, [sp, #0] 8031b8e: 681a ldr r2, [r3, #0] 8031b90: 6022 str r2, [r4, #0] 8031b92: 889b ldrh r3, [r3, #4] 8031b94: 80a3 strh r3, [r4, #4] } break; 8031b96: e002 b.n 8031b9e case 3: /* atNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 8031b98: 9b01 ldr r3, [sp, #4] 8031b9a: 681b ldr r3, [r3, #0] 8031b9c: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 8031b9e: b005 add sp, #20 8031ba0: bd30 pop {r4, r5, pc} 8031ba2: 0000 movs r0, r0 08031ba4 : 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]; 8031ba4: 6883 ldr r3, [r0, #8] switch (id) 8031ba6: 781b ldrb r3, [r3, #0] 8031ba8: 2b05 cmp r3, #5 8031baa: d007 beq.n 8031bbc 8031bac: 2b06 cmp r3, #6 8031bae: d00f beq.n 8031bd0 8031bb0: 2b04 cmp r3, #4 8031bb2: d111 bne.n 8031bd8 { case 4: /* sysContact */ if ((syscontact_ptr != syscontact_default) && 8031bb4: 4b09 ldr r3, [pc, #36] ; (8031bdc ) 8031bb6: 681a ldr r2, [r3, #0] 8031bb8: 4b09 ldr r3, [pc, #36] ; (8031be0 ) 8031bba: e002 b.n 8031bc2 { set_ok = 1; } break; case 5: /* sysName */ if ((sysname_ptr != sysname_default) && 8031bbc: 4b09 ldr r3, [pc, #36] ; (8031be4 ) 8031bbe: 681a ldr r2, [r3, #0] 8031bc0: 4b09 ldr r3, [pc, #36] ; (8031be8 ) 8031bc2: 429a cmp r2, r3 8031bc4: d008 beq.n 8031bd8 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 8031bc6: 29ff cmp r1, #255 ; 0xff 8031bc8: bf8c ite hi 8031bca: 2000 movhi r0, #0 8031bcc: 2001 movls r0, #1 8031bce: 4770 bx lr { set_ok = 1; } break; case 6: /* sysLocation */ if ((syslocation_ptr != syslocation_default) && 8031bd0: 4b06 ldr r3, [pc, #24] ; (8031bec ) 8031bd2: 681a ldr r2, [r3, #0] 8031bd4: 4b06 ldr r3, [pc, #24] ; (8031bf0 ) 8031bd6: e7f4 b.n 8031bc2 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 8031bd8: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 8031bda: 4770 bx lr 8031bdc: 200017e8 .word 0x200017e8 8031be0: 080417b4 .word 0x080417b4 8031be4: 20001774 .word 0x20001774 8031be8: 080414cc .word 0x080414cc 8031bec: 20001900 .word 0x20001900 8031bf0: 080414fc .word 0x080414fc 08031bf4 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8031bf4: 2801 cmp r0, #1 8031bf6: d120 bne.n 8031c3a { od->id_inst_len = ident_len; 8031bf8: 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; 8031bfa: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; 8031bfe: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 8031c00: 6093 str r3, [r2, #8] switch (ident[0]) 8031c02: f851 3c14 ldr.w r3, [r1, #-20] 8031c06: 2b02 cmp r3, #2 8031c08: d008 beq.n 8031c1c 8031c0a: 2b03 cmp r3, #3 8031c0c: d00d beq.n 8031c2a 8031c0e: 2b01 cmp r3, #1 8031c10: d113 bne.n 8031c3a { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 8031c12: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 8031c14: 2103 movs r1, #3 od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 8031c16: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031c18: 7051 strb r1, [r2, #1] 8031c1a: e00a b.n 8031c32 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; 8031c1c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031c1e: 2303 movs r3, #3 8031c20: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8031c22: 2304 movs r3, #4 8031c24: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8031c26: 8090 strh r0, [r2, #4] break; 8031c28: 4770 bx lr case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 8031c2a: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_WRITE; 8031c2c: 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; 8031c2e: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8031c30: 2340 movs r3, #64 ; 0x40 8031c32: 7093 strb r3, [r2, #2] od->v_len = 4; 8031c34: 2304 movs r3, #4 8031c36: 8093 strh r3, [r2, #4] break; 8031c38: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("atentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031c3a: 2300 movs r3, #0 8031c3c: 7013 strb r3, [r2, #0] 8031c3e: 4770 bx lr 08031c40 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031c40: 2801 cmp r0, #1 #endif /* LWIP_ARP */ } static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8031c42: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031c44: d121 bne.n 8031c8a { od->id_inst_len = ident_len; 8031c46: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8031c48: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8031c4a: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8031c4c: 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) 8031c4e: f811 3c04 ldrb.w r3, [r1, #-4] 8031c52: 2b17 cmp r3, #23 8031c54: d819 bhi.n 8031c8a 8031c56: 490e ldr r1, [pc, #56] ; (8031c90 ) 8031c58: 4099 lsls r1, r3 8031c5a: d40b bmi.n 8031c74 8031c5c: f44f 2180 mov.w r1, #262144 ; 0x40000 8031c60: 4099 lsls r1, r3 8031c62: d40c bmi.n 8031c7e 8031c64: f04f 41c0 mov.w r1, #1610612736 ; 0x60000000 8031c68: 4099 lsls r1, r3 8031c6a: d50e bpl.n 8031c8a { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8031c6c: 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; 8031c6e: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031c70: 7053 strb r3, [r2, #1] 8031c72: e006 b.n 8031c82 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); 8031c74: 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; 8031c76: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031c78: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8031c7a: 7093 strb r3, [r2, #2] 8031c7c: e002 b.n 8031c84 od->v_len = sizeof(u32_t); break; case 13: /* ipReasmTimeout */ od->instance = MIB_OBJECT_SCALAR; 8031c7e: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031c80: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8031c82: 7094 strb r4, [r2, #2] od->v_len = sizeof(s32_t); 8031c84: 2304 movs r3, #4 8031c86: 8093 strh r3, [r2, #4] break; 8031c88: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031c8a: 2300 movs r3, #0 8031c8c: 7013 strb r3, [r2, #0] 8031c8e: bd10 pop {r4, pc} 8031c90: 1ffbf100 .word 0x1ffbf100 08031c94 : { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 8031c94: 2801 cmp r0, #1 8031c96: d11c bne.n 8031cd2 { u8_t id; od->id_inst_len = ident_len; 8031c98: 2305 movs r3, #5 8031c9a: 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; 8031c9c: 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; 8031ca0: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8031ca2: f811 3c10 ldrb.w r3, [r1, #-16] 8031ca6: 2b05 cmp r3, #5 8031ca8: d813 bhi.n 8031cd2 8031caa: f04f 5130 mov.w r1, #738197504 ; 0x2c000000 8031cae: 4099 lsls r1, r3 8031cb0: d408 bmi.n 8031cc4 8031cb2: f04f 41a0 mov.w r1, #1342177280 ; 0x50000000 8031cb6: 4099 lsls r1, r3 8031cb8: d50b bpl.n 8031cd2 { case 1: /* ipAdEntAddr */ case 3: /* ipAdEntNetMask */ od->instance = MIB_OBJECT_TAB; 8031cba: 2302 movs r3, #2 8031cbc: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031cbe: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8031cc0: 2340 movs r3, #64 ; 0x40 8031cc2: e002 b.n 8031cca od->v_len = 4; break; case 2: /* ipAdEntIfIndex */ case 4: /* ipAdEntBcastAddr */ case 5: /* ipAdEntReasmMaxSize */ od->instance = MIB_OBJECT_TAB; 8031cc4: 2302 movs r3, #2 8031cc6: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031cc8: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8031cca: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8031ccc: 2304 movs r3, #4 8031cce: 8093 strh r3, [r2, #4] break; 8031cd0: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_addrentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031cd2: 2300 movs r3, #0 8031cd4: 7013 strb r3, [r2, #0] 8031cd6: 4770 bx lr 08031cd8 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8031cd8: 2801 cmp r0, #1 8031cda: d123 bne.n 8031d24 { u8_t id; od->id_inst_len = ident_len; 8031cdc: 2306 movs r3, #6 8031cde: 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; 8031ce0: 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; 8031ce4: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8031ce6: f811 3c14 ldrb.w r3, [r1, #-20] 8031cea: 3b01 subs r3, #1 8031cec: 2b03 cmp r3, #3 8031cee: d819 bhi.n 8031d24 8031cf0: e8df f003 tbb [pc, r3] 8031cf4: 020f0702 .word 0x020f0702 { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 8031cf8: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 8031cfa: 2103 movs r1, #3 id = (u8_t)ident[0]; switch (id) { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 8031cfc: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031cfe: 7051 strb r1, [r2, #1] 8031d00: e00c b.n 8031d1c 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; 8031d02: 2302 movs r3, #2 8031d04: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031d06: 2303 movs r3, #3 8031d08: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 8031d0a: 2304 movs r3, #4 8031d0c: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 8031d0e: 2306 movs r3, #6 8031d10: e006 b.n 8031d20 break; case 3: /* ipNetToMediaNetAddress */ od->instance = MIB_OBJECT_TAB; 8031d12: 2302 movs r3, #2 8031d14: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031d16: 2303 movs r3, #3 8031d18: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8031d1a: 2340 movs r3, #64 ; 0x40 8031d1c: 7093 strb r3, [r2, #2] od->v_len = 4; 8031d1e: 2304 movs r3, #4 8031d20: 8093 strh r3, [r2, #4] break; 8031d22: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_ntomentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031d24: 2300 movs r3, #0 8031d26: 7013 strb r3, [r2, #0] 8031d28: 4770 bx lr 8031d2a: 0000 movs r0, r0 08031d2c : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031d2c: 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) { 8031d2e: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031d30: d121 bne.n 8031d76 { od->id_inst_len = ident_len; 8031d32: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8031d34: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 8031d36: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 8031d38: 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) 8031d3a: f811 3c04 ldrb.w r3, [r1, #-4] 8031d3e: 2b0f cmp r3, #15 8031d40: d819 bhi.n 8031d76 8031d42: 490e ldr r1, [pc, #56] ; (8031d7c ) 8031d44: 4099 lsls r1, r3 8031d46: d40b bmi.n 8031d60 8031d48: f44f 0180 mov.w r1, #4194304 ; 0x400000 8031d4c: 4099 lsls r1, r3 8031d4e: d40b bmi.n 8031d68 8031d50: f04f 41f0 mov.w r1, #2013265920 ; 0x78000000 8031d54: 4099 lsls r1, r3 8031d56: d50e bpl.n 8031d76 { case 1: /* tcpRtoAlgorithm */ case 2: /* tcpRtoMin */ case 3: /* tcpRtoMax */ case 4: /* tcpMaxConn */ od->instance = MIB_OBJECT_SCALAR; 8031d58: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031d5a: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8031d5c: 7094 strb r4, [r2, #2] 8031d5e: e007 b.n 8031d70 case 10: /* tcpInSegs */ case 11: /* tcpOutSegs */ case 12: /* tcpRetransSegs */ case 14: /* tcpInErrs */ case 15: /* tcpOutRsts */ od->instance = MIB_OBJECT_SCALAR; 8031d60: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031d62: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8031d64: 2341 movs r3, #65 ; 0x41 8031d66: e002 b.n 8031d6e od->v_len = sizeof(u32_t); break; case 9: /* tcpCurrEstab */ od->instance = MIB_OBJECT_TAB; 8031d68: 7014 strb r4, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031d6a: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 8031d6c: 2342 movs r3, #66 ; 0x42 8031d6e: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 8031d70: 2304 movs r3, #4 8031d72: 8093 strh r3, [r2, #4] break; 8031d74: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031d76: 2300 movs r3, #0 8031d78: 7013 strb r3, [r2, #0] 8031d7a: bd10 pop {r4, pc} 8031d7c: 07bb0000 .word 0x07bb0000 08031d80 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 8031d80: 2801 cmp r0, #1 8031d82: d116 bne.n 8031db2 { od->id_inst_len = ident_len; 8031d84: 2306 movs r3, #6 8031d86: 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; 8031d88: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8031d8c: 6093 str r3, [r2, #8] switch (ident[0]) 8031d8e: f851 3c14 ldr.w r3, [r1, #-20] 8031d92: 2b01 cmp r3, #1 8031d94: d002 beq.n 8031d9c 8031d96: 2b02 cmp r3, #2 8031d98: d10b bne.n 8031db2 8031d9a: e004 b.n 8031da6 { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8031d9c: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_ONLY; 8031d9e: 7053 strb r3, [r2, #1] od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 8031da0: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 8031da2: 2340 movs r3, #64 ; 0x40 8031da4: e001 b.n 8031daa od->v_len = 4; break; case 2: /* udpLocalPort */ od->instance = MIB_OBJECT_TAB; 8031da6: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031da8: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8031daa: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8031dac: 2304 movs r3, #4 8031dae: 8093 strh r3, [r2, #4] break; 8031db0: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udpentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031db2: 2300 movs r3, #0 8031db4: 7013 strb r3, [r2, #0] 8031db6: 4770 bx lr 08031db8 : 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) 8031db8: 2801 cmp r0, #1 } } static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 8031dba: b510 push {r4, lr} /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8031dbc: d119 bne.n 8031df2 { u8_t id; od->id_inst_len = ident_len; 8031dbe: 2302 movs r3, #2 8031dc0: 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; 8031dc2: 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) 8031dc4: 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; 8031dc8: 6094 str r4, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8031dca: 291e cmp r1, #30 8031dcc: d811 bhi.n 8031df2 8031dce: 4c0a ldr r4, [pc, #40] ; (8031df8 ) 8031dd0: 408c lsls r4, r1 8031dd2: d403 bmi.n 8031ddc 8031dd4: fa13 f101 lsls.w r1, r3, r1 8031dd8: d404 bmi.n 8031de4 8031dda: e00a b.n 8031df2 case 25: /* snmpOutGetRequests */ case 26: /* snmpOutGetNexts */ case 27: /* snmpOutSetRequests */ case 28: /* snmpOutGetResponses */ case 29: /* snmpOutTraps */ od->instance = MIB_OBJECT_SCALAR; 8031ddc: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 8031dde: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 8031de0: 2341 movs r3, #65 ; 0x41 8031de2: e002 b.n 8031dea od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 8031de4: 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; 8031de6: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 8031de8: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 8031dea: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 8031dec: 2304 movs r3, #4 8031dee: 8093 strh r3, [r2, #4] break; 8031df0: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8031df2: 2300 movs r3, #0 8031df4: 7013 strb r3, [r2, #0] 8031df6: bd10 pop {r4, pc} 8031df8: 7efffefc .word 0x7efffefc 08031dfc : 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]; 8031dfc: 6883 ldr r3, [r0, #8] if (id == 30) 8031dfe: 781b ldrb r3, [r3, #0] 8031e00: 2b1e cmp r3, #30 8031e02: d10f bne.n 8031e24 { /* snmpEnableAuthenTraps */ s32_t *sint_ptr = (s32_t*)value; if (snmpenableauthentraps_ptr != &snmpenableauthentraps_default) 8031e04: 4b08 ldr r3, [pc, #32] ; (8031e28 ) 8031e06: 6810 ldr r0, [r2, #0] 8031e08: 6819 ldr r1, [r3, #0] 8031e0a: 4b08 ldr r3, [pc, #32] ; (8031e2c ) 8031e0c: 4299 cmp r1, r3 8031e0e: d005 beq.n 8031e1c { /* we should have writable non-volatile mem here */ if ((*sint_ptr == 1) || (*sint_ptr == 2)) 8031e10: 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; 8031e12: 2801 cmp r0, #1 8031e14: bf8c ite hi 8031e16: 2000 movhi r0, #0 8031e18: 2001 movls r0, #1 8031e1a: 4770 bx lr 8031e1c: 1e83 subs r3, r0, #2 8031e1e: 4258 negs r0, r3 8031e20: 4158 adcs r0, r3 8031e22: 4770 bx lr 8031e24: 2000 movs r0, #0 set_ok = 1; } } } return set_ok; } 8031e26: 4770 bx lr 8031e28: 2000176c .word 0x2000176c 8031e2c: 080415b0 .word 0x080415b0 08031e30 : * @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) { 8031e30: b510 push {r4, lr} u16_t i = n; while (i > 0) { 8031e32: 2300 movs r3, #0 8031e34: e002 b.n 8031e3c i--; *dst++ = *src++; 8031e36: 5ccc ldrb r4, [r1, r3] 8031e38: 54c4 strb r4, [r0, r3] 8031e3a: 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) { 8031e3c: b29c uxth r4, r3 8031e3e: 42a2 cmp r2, r4 8031e40: d1f9 bne.n 8031e36 i--; *dst++ = *src++; } } 8031e42: bd10 pop {r4, pc} 08031e44 : { 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]; 8031e44: 6883 ldr r3, [r0, #8] switch (id) 8031e46: 781b ldrb r3, [r3, #0] 8031e48: 2b05 cmp r3, #5 return set_ok; } static void system_set_value(struct obj_def *od, u16_t len, void *value) { 8031e4a: b510 push {r4, lr} 8031e4c: 460c mov r4, r1 8031e4e: 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) 8031e50: d00a beq.n 8031e68 8031e52: 2b06 cmp r3, #6 8031e54: d00f beq.n 8031e76 8031e56: 2b04 cmp r3, #4 8031e58: d115 bne.n 8031e86 { case 4: /* sysContact */ ocstrncpy(syscontact_ptr, (u8_t*)value, len); 8031e5a: 4b0b ldr r3, [pc, #44] ; (8031e88 ) 8031e5c: 4622 mov r2, r4 8031e5e: 6818 ldr r0, [r3, #0] 8031e60: f7ff ffe6 bl 8031e30 *syscontact_len_ptr = (u8_t)len; 8031e64: 4b09 ldr r3, [pc, #36] ; (8031e8c ) 8031e66: e00c b.n 8031e82 break; case 5: /* sysName */ ocstrncpy(sysname_ptr, (u8_t*)value, len); 8031e68: 4b09 ldr r3, [pc, #36] ; (8031e90 ) 8031e6a: 4622 mov r2, r4 8031e6c: 6818 ldr r0, [r3, #0] 8031e6e: f7ff ffdf bl 8031e30 *sysname_len_ptr = (u8_t)len; 8031e72: 4b08 ldr r3, [pc, #32] ; (8031e94 ) 8031e74: e005 b.n 8031e82 break; case 6: /* sysLocation */ ocstrncpy(syslocation_ptr, (u8_t*)value, len); 8031e76: 4b08 ldr r3, [pc, #32] ; (8031e98 ) 8031e78: 4622 mov r2, r4 8031e7a: 6818 ldr r0, [r3, #0] 8031e7c: f7ff ffd8 bl 8031e30 *syslocation_len_ptr = (u8_t)len; 8031e80: 4b06 ldr r3, [pc, #24] ; (8031e9c ) 8031e82: 681b ldr r3, [r3, #0] 8031e84: 701c strb r4, [r3, #0] 8031e86: bd10 pop {r4, pc} 8031e88: 200017e8 .word 0x200017e8 8031e8c: 2000166c .word 0x2000166c 8031e90: 20001774 .word 0x20001774 8031e94: 20001668 .word 0x20001668 8031e98: 20001900 .word 0x20001900 8031e9c: 20001854 .word 0x20001854 08031ea0 : * * @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) 8031ea0: 3904 subs r1, #4 { u8_t i = n; while(i > 0) { 8031ea2: e005 b.n 8031eb0 i--; *dst++ = *src++; 8031ea4: 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--; 8031ea8: 3a01 subs r2, #1 *dst++ = *src++; 8031eaa: 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--; 8031eae: 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) { 8031eb0: 2a00 cmp r2, #0 8031eb2: d1f7 bne.n 8031ea4 i--; *dst++ = *src++; } } 8031eb4: 4770 bx lr 8031eb6: 0000 movs r0, r0 08031eb8 : * @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) { 8031eb8: b573 push {r0, r1, r4, r5, r6, lr} struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8031eba: 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) { 8031ebc: 4606 mov r6, r0 8031ebe: 460d mov r5, r1 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8031ec0: 6858 ldr r0, [r3, #4] 8031ec2: 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) { 8031ec4: 4614 mov r4, r2 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 8031ec6: f000 fdaf bl 8032a28 LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 8031eca: 68b3 ldr r3, [r6, #8] switch (id) 8031ecc: 781a ldrb r2, [r3, #0] 8031ece: 3a01 subs r2, #1 8031ed0: 2a15 cmp r2, #21 8031ed2: d85c bhi.n 8031f8e 8031ed4: e8df f002 tbb [pc, r2] 8031ed8: 15110d0b .word 0x15110d0b 8031edc: 2e221b18 .word 0x2e221b18 8031ee0: 403d3a37 .word 0x403d3a37 8031ee4: 46525243 .word 0x46525243 8031ee8: 524f4c49 .word 0x524f4c49 8031eec: 5552 .short 0x5552 { case 1: /* ifIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 8031eee: 685b ldr r3, [r3, #4] 8031ef0: e045 b.n 8031f7e } break; case 2: /* ifDescr */ ocstrncpy((u8_t*)value, (u8_t*)netif->name, len); 8031ef2: 9901 ldr r1, [sp, #4] 8031ef4: 4620 mov r0, r4 8031ef6: 312e adds r1, #46 ; 0x2e 8031ef8: e00c b.n 8031f14 break; case 3: /* ifType */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->link_type; 8031efa: 9b01 ldr r3, [sp, #4] 8031efc: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 8031f00: e03d b.n 8031f7e } break; case 4: /* ifMtu */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->mtu; 8031f02: 9b01 ldr r3, [sp, #4] 8031f04: 8c9b ldrh r3, [r3, #36] ; 0x24 8031f06: e03a b.n 8031f7e } break; case 5: /* ifSpeed */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->link_speed; 8031f08: 9b01 ldr r3, [sp, #4] 8031f0a: 6b5b ldr r3, [r3, #52] ; 0x34 8031f0c: e037 b.n 8031f7e } break; case 6: /* ifPhysAddress */ ocstrncpy((u8_t*)value, netif->hwaddr, len); 8031f0e: 9901 ldr r1, [sp, #4] 8031f10: 4620 mov r0, r4 8031f12: 3127 adds r1, #39 ; 0x27 8031f14: 462a mov r2, r5 8031f16: f7ff ff8b bl 8031e30 break; 8031f1a: e038 b.n 8031f8e case 7: /* ifAdminStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 8031f1c: 9b01 ldr r3, [sp, #4] 8031f1e: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8031f22: 07d9 lsls r1, r3, #31 8031f24: d50d bpl.n 8031f42 { if (netif_is_link_up(netif)) 8031f26: f003 0310 and.w r3, r3, #16 8031f2a: b2db uxtb r3, r3 8031f2c: b103 cbz r3, 8031f30 8031f2e: e006 b.n 8031f3e { *sint_ptr = 1; /* up */ } else { *sint_ptr = 7; /* lowerLayerDown */ 8031f30: 2307 movs r3, #7 8031f32: e024 b.n 8031f7e } break; case 8: /* ifOperStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 8031f34: 9b01 ldr r3, [sp, #4] 8031f36: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 8031f3a: 07da lsls r2, r3, #31 8031f3c: d501 bpl.n 8031f42 { *sint_ptr = 1; 8031f3e: 2301 movs r3, #1 8031f40: e01d b.n 8031f7e } else { *sint_ptr = 2; 8031f42: 2302 movs r3, #2 8031f44: e01b b.n 8031f7e } break; case 9: /* ifLastChange */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ts; 8031f46: 9b01 ldr r3, [sp, #4] 8031f48: 6b9b ldr r3, [r3, #56] ; 0x38 8031f4a: e018 b.n 8031f7e } break; case 10: /* ifInOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinoctets; 8031f4c: 9b01 ldr r3, [sp, #4] 8031f4e: 6bdb ldr r3, [r3, #60] ; 0x3c 8031f50: e015 b.n 8031f7e } break; case 11: /* ifInUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinucastpkts; 8031f52: 9b01 ldr r3, [sp, #4] 8031f54: 6c1b ldr r3, [r3, #64] ; 0x40 8031f56: e012 b.n 8031f7e } break; case 12: /* ifInNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinnucastpkts; 8031f58: 9b01 ldr r3, [sp, #4] 8031f5a: 6c5b ldr r3, [r3, #68] ; 0x44 8031f5c: e00f b.n 8031f7e } break; case 13: /* ifInDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifindiscards; 8031f5e: 9b01 ldr r3, [sp, #4] 8031f60: 6c9b ldr r3, [r3, #72] ; 0x48 8031f62: e00c b.n 8031f7e } break; case 16: /* ifOutOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutoctets; 8031f64: 9b01 ldr r3, [sp, #4] 8031f66: 6cdb ldr r3, [r3, #76] ; 0x4c 8031f68: e009 b.n 8031f7e } break; case 17: /* ifOutUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutucastpkts; 8031f6a: 9b01 ldr r3, [sp, #4] 8031f6c: 6d1b ldr r3, [r3, #80] ; 0x50 8031f6e: e006 b.n 8031f7e } break; case 18: /* ifOutNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutnucastpkts; 8031f70: 9b01 ldr r3, [sp, #4] 8031f72: 6d5b ldr r3, [r3, #84] ; 0x54 8031f74: e003 b.n 8031f7e } break; case 19: /* ifOutDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutdiscards; 8031f76: 9b01 ldr r3, [sp, #4] 8031f78: 6d9b ldr r3, [r3, #88] ; 0x58 8031f7a: e000 b.n 8031f7e 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; 8031f7c: 2300 movs r3, #0 8031f7e: 6023 str r3, [r4, #0] } break; 8031f80: e005 b.n 8031f8e case 22: /* ifSpecific */ objectidncpy((s32_t*)value, (s32_t*)ifspecific.id, (u8_t)(len / sizeof(s32_t))); 8031f82: 4620 mov r0, r4 8031f84: 4902 ldr r1, [pc, #8] ; (8031f90 ) 8031f86: f3c5 0287 ubfx r2, r5, #2, #8 8031f8a: f7ff ff89 bl 8031ea0 break; }; } 8031f8e: bd7c pop {r2, r3, r4, r5, r6, pc} 8031f90: 08041638 .word 0x08041638 08031f94 : } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031f94: 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; 8031f96: 6885 ldr r5, [r0, #8] } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031f98: 460f mov r7, r1 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 8031f9a: 1d28 adds r0, r5, #4 8031f9c: a901 add r1, sp, #4 } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 8031f9e: 4614 mov r4, r2 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 8031fa0: f000 fd60 bl 8032a64 if (ip_addr_isany(&dest)) 8031fa4: 9b01 ldr r3, [sp, #4] 8031fa6: b91b cbnz r3, 8031fb0 { /* ip_route() uses default netif for default route */ netif = netif_default; 8031fa8: 4a23 ldr r2, [pc, #140] ; (8032038 ) 8031faa: 6810 ldr r0, [r2, #0] !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; } } if (netif != NULL) 8031fac: b960 cbnz r0, 8031fc8 8031fae: e041 b.n 8032034 netif = netif_default; } else { /* not using ip_route(), need exact match! */ netif = netif_list; 8031fb0: 4a22 ldr r2, [pc, #136] ; (803203c ) 8031fb2: 6810 ldr r0, [r2, #0] while ((netif != NULL) && 8031fb4: e000 b.n 8031fb8 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; 8031fb6: 6800 ldr r0, [r0, #0] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 8031fb8: 2800 cmp r0, #0 8031fba: d03b beq.n 8032034 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) 8031fbc: 6846 ldr r6, [r0, #4] 8031fbe: ea83 0206 eor.w r2, r3, r6 8031fc2: 6886 ldr r6, [r0, #8] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 8031fc4: 4232 tst r2, r6 8031fc6: d1f6 bne.n 8031fb6 } if (netif != NULL) { LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 8031fc8: 782d ldrb r5, [r5, #0] 8031fca: 3d01 subs r5, #1 8031fcc: 2d0c cmp r5, #12 8031fce: d831 bhi.n 8032034 8031fd0: e8df f005 tbb [pc, r5] 8031fd4: 14110d07 .word 0x14110d07 8031fd8: 1c171414 .word 0x1c171414 8031fdc: 14252321 .word 0x14252321 8031fe0: 2a .byte 0x2a 8031fe1: 00 .byte 0x00 { case 1: /* ipRouteDest */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8031fe2: b903 cbnz r3, 8031fe6 8031fe4: e01e b.n 8032024 ip_addr_set_zero(dst); } else { /* netifs have netaddress dest */ ip_addr_get_network(dst, &netif->ip_addr, &netif->netmask); 8031fe6: 6882 ldr r2, [r0, #8] 8031fe8: 6843 ldr r3, [r0, #4] 8031fea: 4013 ands r3, r2 8031fec: e01a b.n 8032024 break; case 2: /* ipRouteIfIndex */ { s32_t *sint_ptr = (s32_t*)value; snmp_netiftoifindex(netif, sint_ptr); 8031fee: 4621 mov r1, r4 8031ff0: f000 fd28 bl 8032a44 } break; 8031ff4: e01e b.n 8032034 case 3: /* ipRouteMetric1 */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 8031ff6: b983 cbnz r3, 803201a { /* default rte has metric 1 */ *sint_ptr = 1; 8031ff8: 2301 movs r3, #1 8031ffa: e013 b.n 8032024 case 6: /* ipRouteMetric4 */ case 12: /* ipRouteMetric5 */ { s32_t *sint_ptr = (s32_t*)value; /* not used */ *sint_ptr = -1; 8031ffc: f04f 33ff mov.w r3, #4294967295 8032000: e010 b.n 8032024 break; case 7: /* ipRouteNextHop */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 8032002: b90b cbnz r3, 8032008 { /* default rte: gateway */ *dst = netif->gw; 8032004: 68c3 ldr r3, [r0, #12] 8032006: e00d b.n 8032024 } else { /* other rtes: netif ip_addr */ *dst = netif->ip_addr; 8032008: 6843 ldr r3, [r0, #4] 803200a: e00b b.n 8032024 break; case 8: /* ipRouteType */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 803200c: b90b cbnz r3, 8032012 { /* default rte is indirect */ *sint_ptr = 4; 803200e: 2304 movs r3, #4 8032010: e008 b.n 8032024 } else { /* other rtes are direct */ *sint_ptr = 3; 8032012: 2303 movs r3, #3 8032014: e006 b.n 8032024 break; case 9: /* ipRouteProto */ { s32_t *sint_ptr = (s32_t*)value; /* locally defined routes */ *sint_ptr = 2; 8032016: 2302 movs r3, #2 8032018: e004 b.n 8032024 case 10: /* ipRouteAge */ { s32_t *sint_ptr = (s32_t*)value; /** @todo (sysuptime - timestamp last change) / 100 @see snmp_insert_iprteidx_tree() */ *sint_ptr = 0; 803201a: 2300 movs r3, #0 803201c: e002 b.n 8032024 break; case 11: /* ipRouteMask */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 803201e: b903 cbnz r3, 8032022 8032020: e000 b.n 8032024 ip_addr_set_zero(dst); } else { /* other rtes use netmask */ *dst = netif->netmask; 8032022: 6883 ldr r3, [r0, #8] 8032024: 6023 str r3, [r4, #0] 8032026: e005 b.n 8032034 } } break; case 13: /* ipRouteInfo */ objectidncpy((s32_t*)value, (s32_t*)iprouteinfo.id, (u8_t)(len / sizeof(s32_t))); 8032028: 4620 mov r0, r4 803202a: 4905 ldr r1, [pc, #20] ; (8032040 ) 803202c: f3c7 0287 ubfx r2, r7, #2, #8 8032030: f7ff ff36 bl 8031ea0 break; } } } 8032034: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8032036: bf00 nop 8032038: 20011074 .word 0x20011074 803203c: 20011070 .word 0x20011070 8032040: 0804144c .word 0x0804144c 08032044 : * @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) 8032044: b118 cbz r0, 803204e { sysdescr_ptr = str; 8032046: 4b02 ldr r3, [pc, #8] ; (8032050 ) 8032048: 6018 str r0, [r3, #0] sysdescr_len_ptr = len; 803204a: 4b02 ldr r3, [pc, #8] ; (8032054 ) 803204c: 6019 str r1, [r3, #0] 803204e: 4770 bx lr 8032050: 20001794 .word 0x20001794 8032054: 20001810 .word 0x20001810 08032058 : * Initializes sysObjectID value. * * @param oid points to stuct snmp_obj_id to copy */ void snmp_set_sysobjid(struct snmp_obj_id *oid) { 8032058: 4601 mov r1, r0 803205a: b508 push {r3, lr} sysobjid = *oid; 803205c: 2284 movs r2, #132 ; 0x84 803205e: 4802 ldr r0, [pc, #8] ; (8032068 ) 8032060: f7ef fc74 bl 802194c 8032064: bd08 pop {r3, pc} 8032066: bf00 nop 8032068: 200016c0 .word 0x200016c0 0803206c : * 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++; 803206c: 4b02 ldr r3, [pc, #8] ; (8032078 ) 803206e: 681a ldr r2, [r3, #0] 8032070: 3201 adds r2, #1 8032072: 601a str r2, [r3, #0] 8032074: 4770 bx lr 8032076: bf00 nop 8032078: 2000e2b0 .word 0x2000e2b0 0803207c : { sysuptime+=value; } void snmp_get_sysuptime(u32_t *value) { 803207c: b510 push {r4, lr} 803207e: 4604 mov r4, r0 SNMP_GET_SYSUPTIME(sysuptime); 8032080: f003 f985 bl 803538e 8032084: 230a movs r3, #10 8032086: 4a03 ldr r2, [pc, #12] ; (8032094 ) 8032088: fbb0 f0f3 udiv r0, r0, r3 803208c: 6010 str r0, [r2, #0] *value = sysuptime; 803208e: 6020 str r0, [r4, #0] 8032090: bd10 pop {r4, pc} 8032092: bf00 nop 8032094: 2000e2b0 .word 0x2000e2b0 08032098 : * @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) { 8032098: 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]; 803209a: 6882 ldr r2, [r0, #8] switch (id) 803209c: 7812 ldrb r2, [r2, #0] 803209e: 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) { 80320a0: b510 push {r4, lr} 80320a2: 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) 80320a4: 2a06 cmp r2, #6 80320a6: d825 bhi.n 80320f4 80320a8: e8df f002 tbb [pc, r2] 80320ac: 140f0704 .word 0x140f0704 80320b0: 1a17 .short 0x1a17 80320b2: 22 .byte 0x22 80320b3: 00 .byte 0x00 { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); 80320b4: 4618 mov r0, r3 80320b6: 4b10 ldr r3, [pc, #64] ; (80320f8 ) 80320b8: e014 b.n 80320e4 break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 80320ba: 4910 ldr r1, [pc, #64] ; (80320fc ) 80320bc: 4618 mov r0, r3 80320be: f3c4 0287 ubfx r2, r4, #2, #8 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80320c2: 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))); 80320c6: f7ff beeb b.w 8031ea0 break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 80320ca: 4618 mov r0, r3 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80320cc: 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); 80320d0: f7ff bfd4 b.w 803207c } break; case 4: /* sysContact */ ocstrncpy((u8_t*)value, syscontact_ptr, len); 80320d4: 4618 mov r0, r3 80320d6: 4b0a ldr r3, [pc, #40] ; (8032100 ) 80320d8: e004 b.n 80320e4 break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); 80320da: 4618 mov r0, r3 80320dc: 4b09 ldr r3, [pc, #36] ; (8032104 ) 80320de: e001 b.n 80320e4 break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 80320e0: 4618 mov r0, r3 80320e2: 4b09 ldr r3, [pc, #36] ; (8032108 ) 80320e4: 6819 ldr r1, [r3, #0] 80320e6: 4622 mov r2, r4 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 80320e8: 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); 80320ec: f7ff bea0 b.w 8031e30 break; case 7: /* sysServices */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; 80320f0: 2248 movs r2, #72 ; 0x48 80320f2: 601a str r2, [r3, #0] 80320f4: bd10 pop {r4, pc} 80320f6: bf00 nop 80320f8: 20001794 .word 0x20001794 80320fc: 200016c4 .word 0x200016c4 8032100: 200017e8 .word 0x200017e8 8032104: 20001774 .word 0x20001774 8032108: 20001900 .word 0x20001900 0803210c : * @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) 803210c: b118 cbz r0, 8032116 { syscontact_ptr = ocstr; 803210e: 4b02 ldr r3, [pc, #8] ; (8032118 ) 8032110: 6018 str r0, [r3, #0] syscontact_len_ptr = ocstrlen; 8032112: 4b02 ldr r3, [pc, #8] ; (803211c ) 8032114: 6019 str r1, [r3, #0] 8032116: 4770 bx lr 8032118: 200017e8 .word 0x200017e8 803211c: 2000166c .word 0x2000166c 08032120 : * @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) 8032120: b118 cbz r0, 803212a { sysname_ptr = ocstr; 8032122: 4b02 ldr r3, [pc, #8] ; (803212c ) 8032124: 6018 str r0, [r3, #0] sysname_len_ptr = ocstrlen; 8032126: 4b02 ldr r3, [pc, #8] ; (8032130 ) 8032128: 6019 str r1, [r3, #0] 803212a: 4770 bx lr 803212c: 20001774 .word 0x20001774 8032130: 20001668 .word 0x20001668 08032134 : * @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) 8032134: b118 cbz r0, 803213e { syslocation_ptr = ocstr; 8032136: 4b02 ldr r3, [pc, #8] ; (8032140 ) 8032138: 6018 str r0, [r3, #0] syslocation_len_ptr = ocstrlen; 803213a: 4b02 ldr r3, [pc, #8] ; (8032144 ) 803213c: 6019 str r1, [r3, #0] 803213e: 4770 bx lr 8032140: 20001900 .word 0x20001900 8032144: 20001854 .word 0x20001854 08032148 : { (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { 8032148: 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); 803214a: 4806 ldr r0, [pc, #24] ; (8032164 ) (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 803214c: aa02 add r2, sp, #8 snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 803214e: 8b81 ldrh r1, [r0, #28] (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 8032150: 2300 movs r3, #0 8032152: f842 3d04 str.w r3, [r2, #-4]! snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 8032156: 3101 adds r1, #1 8032158: f000 fccc bl 8032af4 /* enable getnext traversal on filled table */ iftable.maxlength = 1; 803215c: 4b02 ldr r3, [pc, #8] ; (8032168 ) 803215e: 2201 movs r2, #1 8032160: 825a strh r2, [r3, #18] } 8032162: bd0e pop {r1, r2, r3, pc} 8032164: 200016a0 .word 0x200016a0 8032168: 20001818 .word 0x20001818 0803216c : /** * 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) { 803216c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8032170: b086 sub sp, #24 8032172: 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]); 8032174: a901 add r1, sp, #4 8032176: f000 fc65 bl 8032a44 snmp_iptooid(ip, &arpidx[1]); 803217a: 4620 mov r0, r4 803217c: a902 add r1, sp, #8 803217e: f000 fc7e bl 8032a7e for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 8032182: f8df 80a0 ldr.w r8, [pc, #160] ; 8032224 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 8032186: 2500 movs r5, #0 { if (tree == 0) { at_rn = &arptree_root; 8032188: 4c1f ldr r4, [pc, #124] ; (8032208 ) 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; 803218a: f8df 909c ldr.w r9, [pc, #156] ; 8032228 at_rn->set_value = noleafs_set_value; 803218e: f8df a09c ldr.w sl, [pc, #156] ; 803222c for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 8032192: 2d00 cmp r5, #0 8032194: bf18 it ne 8032196: 4644 movne r4, r8 } else { at_rn = &ipntomtree_root; 8032198: 2600 movs r6, #0 } for (level = 0; level < 5; level++) { at_node = NULL; 803219a: 2300 movs r3, #0 803219c: 9300 str r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); 803219e: ab01 add r3, sp, #4 80321a0: 4620 mov r0, r4 80321a2: f853 1026 ldr.w r1, [r3, r6, lsl #2] 80321a6: aa00 add r2, sp, #0 80321a8: b2f7 uxtb r7, r6 80321aa: f000 fca3 bl 8032af4 if ((level != 4) && (at_node != NULL)) 80321ae: 2f04 cmp r7, #4 80321b0: d01d beq.n 80321ee 80321b2: 9b00 ldr r3, [sp, #0] 80321b4: b1db cbz r3, 80321ee { if (at_node->nptr == NULL) 80321b6: 68dc ldr r4, [r3, #12] 80321b8: b9cc cbnz r4, 80321ee { at_rn = snmp_mib_lrn_alloc(); 80321ba: f000 fc79 bl 8032ab0 at_node->nptr = (struct mib_node*)at_rn; 80321be: 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(); 80321c0: 4604 mov r4, r0 at_node->nptr = (struct mib_node*)at_rn; 80321c2: 60d8 str r0, [r3, #12] if (at_rn != NULL) 80321c4: b920 cbnz r0, 80321d0 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 80321c6: 3501 adds r5, #1 80321c8: b2ed uxtb r5, r5 80321ca: 2d02 cmp r5, #2 80321cc: d1dc bne.n 8032188 80321ce: e012 b.n 80321f6 { at_rn = snmp_mib_lrn_alloc(); at_node->nptr = (struct mib_node*)at_rn; if (at_rn != NULL) { if (level == 3) 80321d0: 2f03 cmp r7, #3 80321d2: d10c bne.n 80321ee { if (tree == 0) 80321d4: b91d cbnz r5, 80321de { at_rn->get_object_def = atentry_get_object_def; 80321d6: 4b0d ldr r3, [pc, #52] ; (803220c ) 80321d8: 6003 str r3, [r0, #0] at_rn->get_value = atentry_get_value; 80321da: 4b0d ldr r3, [pc, #52] ; (8032210 ) 80321dc: e002 b.n 80321e4 } else { at_rn->get_object_def = ip_ntomentry_get_object_def; 80321de: 4b0d ldr r3, [pc, #52] ; (8032214 ) 80321e0: 6003 str r3, [r0, #0] at_rn->get_value = ip_ntomentry_get_value; 80321e2: 4b0d ldr r3, [pc, #52] ; (8032218 ) 80321e4: 6063 str r3, [r4, #4] } at_rn->set_test = noleafs_set_test; 80321e6: f8c4 9008 str.w r9, [r4, #8] at_rn->set_value = noleafs_set_value; 80321ea: f8c4 a00c str.w sl, [r4, #12] 80321ee: 3601 adds r6, #1 } else { at_rn = &ipntomtree_root; } for (level = 0; level < 5; level++) 80321f0: 2e05 cmp r6, #5 80321f2: d1d2 bne.n 803219a 80321f4: e7e7 b.n 80321c6 } } } } /* enable getnext traversal on filled tables */ at.maxlength = 1; 80321f6: 4a09 ldr r2, [pc, #36] ; (803221c ) 80321f8: 2301 movs r3, #1 80321fa: 8253 strh r3, [r2, #18] ipntomtable.maxlength = 1; 80321fc: 4a08 ldr r2, [pc, #32] ; (8032220 ) 80321fe: 8253 strh r3, [r2, #18] } 8032200: b006 add sp, #24 8032202: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8032206: bf00 nop 8032208: 200017ec .word 0x200017ec 803220c: 08031bf5 .word 0x08031bf5 8032210: 08031b4d .word 0x08031b4d 8032214: 08031cd9 .word 0x08031cd9 8032218: 08031af1 .word 0x08031af1 803221c: 20001610 .word 0x20001610 8032220: 200015f4 .word 0x200015f4 8032224: 200018dc .word 0x200018dc 8032228: 0803140f .word 0x0803140f 803222c: 08031413 .word 0x08031413 08032230 : /** * Removes ARP table indexes (.xIfIndex.xNetAddress) * from arp table index trees. */ void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 8032230: b5f0 push {r4, r5, r6, r7, lr} 8032232: b091 sub sp, #68 ; 0x44 8032234: 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]); 8032236: a90b add r1, sp, #44 ; 0x2c 8032238: f000 fc04 bl 8032a44 snmp_iptooid(ip, &arpidx[1]); 803223c: 4620 mov r0, r4 803223e: a90c add r1, sp, #48 ; 0x30 8032240: f000 fc1d bl 8032a7e for (tree = 0; tree < 2; tree++) 8032244: 2700 movs r7, #0 { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 8032246: 4b26 ldr r3, [pc, #152] ; (80322e0 ) 8032248: 4d26 ldr r5, [pc, #152] ; (80322e4 ) } else { at_rn = &ipntomtree_root; 803224a: 2600 movs r6, #0 for (tree = 0; tree < 2; tree++) { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 803224c: 2f00 cmp r7, #0 803224e: bf08 it eq 8032250: 461d moveq r5, r3 } else { at_rn = &ipntomtree_root; 8032252: 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); 8032254: ab0b add r3, sp, #44 ; 0x2c 8032256: 4628 mov r0, r5 8032258: 58f1 ldr r1, [r6, r3] 803225a: aa00 add r2, sp, #0 803225c: f000 fc85 bl 8032b6a 8032260: b2c0 uxtb r0, r0 if (fc == 0) 8032262: b198 cbz r0, 803228c { /* arpidx[level] does not exist */ del_cnt = 0; at_rn = NULL; } else if (fc == 1) 8032264: 2801 cmp r0, #1 8032266: d10b bne.n 8032280 { del_rn[del_cnt] = at_rn; 8032268: ab10 add r3, sp, #64 ; 0x40 803226a: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = at_n; 803226e: 9b00 ldr r3, [sp, #0] del_cnt = 0; at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; 8032270: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = at_n; del_cnt++; 8032274: 3401 adds r4, #1 at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; del_n[del_cnt] = at_n; 8032276: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 803227a: b2e4 uxtb r4, r4 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 803227c: 68dd ldr r5, [r3, #12] 803227e: e007 b.n 8032290 } else if (fc == 2) 8032280: 2802 cmp r0, #2 8032282: d105 bne.n 8032290 { /* reset delete (2 or more childs) */ del_cnt = 0; at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8032284: 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; 8032286: 2400 movs r4, #0 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 8032288: 68dd ldr r5, [r3, #12] 803228a: e001 b.n 8032290 { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); if (fc == 0) { /* arpidx[level] does not exist */ del_cnt = 0; 803228c: 4604 mov r4, r0 at_rn = NULL; 803228e: 4605 mov r5, r0 8032290: 3604 adds r6, #4 { at_rn = &ipntomtree_root; } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) 8032292: 2e14 cmp r6, #20 8032294: d011 beq.n 80322ba 8032296: 2d00 cmp r5, #0 8032298: d1dc bne.n 8032254 803229a: e00e b.n 80322ba level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 803229c: 3c01 subs r4, #1 803229e: b2e4 uxtb r4, r4 at_rn = del_rn[del_cnt]; 80322a0: aa10 add r2, sp, #64 ; 0x40 80322a2: eb02 0384 add.w r3, r2, r4, lsl #2 at_n = del_n[del_cnt]; 80322a6: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; at_rn = del_rn[del_cnt]; 80322aa: f853 0c3c ldr.w r0, [r3, #-60] at_n = del_n[del_cnt]; 80322ae: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(at_rn, at_n); 80322b0: f000 fc75 bl 8032b9e if (next != NULL) 80322b4: b108 cbz r0, 80322ba { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 80322b6: f000 fc19 bl 8032aec at_rn = (struct mib_list_rootnode*)(at_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 80322ba: 2c00 cmp r4, #0 80322bc: d1ee bne.n 803229c u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 80322be: 3701 adds r7, #1 80322c0: b2ff uxtb r7, r7 80322c2: 2f02 cmp r7, #2 80322c4: d1bf bne.n 8032246 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty tables */ if(arptree_root.count == 0) at.maxlength = 0; 80322c6: 4b06 ldr r3, [pc, #24] ; (80322e0 ) 80322c8: 8b9b ldrh r3, [r3, #28] 80322ca: b90b cbnz r3, 80322d0 80322cc: 4b06 ldr r3, [pc, #24] ; (80322e8 ) 80322ce: 825c strh r4, [r3, #18] if(ipntomtree_root.count == 0) ipntomtable.maxlength = 0; 80322d0: 4b04 ldr r3, [pc, #16] ; (80322e4 ) 80322d2: 8b9b ldrh r3, [r3, #28] 80322d4: b90b cbnz r3, 80322da 80322d6: 4a05 ldr r2, [pc, #20] ; (80322ec ) 80322d8: 8253 strh r3, [r2, #18] } 80322da: b011 add sp, #68 ; 0x44 80322dc: bdf0 pop {r4, r5, r6, r7, pc} 80322de: bf00 nop 80322e0: 200017ec .word 0x200017ec 80322e4: 200018dc .word 0x200018dc 80322e8: 20001610 .word 0x20001610 80322ec: 200015f4 .word 0x200015f4 080322f0 : void snmp_inc_ipinreceives(void) { ipinreceives++; 80322f0: 4b02 ldr r3, [pc, #8] ; (80322fc ) 80322f2: 681a ldr r2, [r3, #0] 80322f4: 3201 adds r2, #1 80322f6: 601a str r2, [r3, #0] 80322f8: 4770 bx lr 80322fa: bf00 nop 80322fc: 2000e284 .word 0x2000e284 08032300 : } void snmp_inc_ipinhdrerrors(void) { ipinhdrerrors++; 8032300: 4b02 ldr r3, [pc, #8] ; (803230c ) 8032302: 681a ldr r2, [r3, #0] 8032304: 3201 adds r2, #1 8032306: 601a str r2, [r3, #0] 8032308: 4770 bx lr 803230a: bf00 nop 803230c: 2000e20c .word 0x2000e20c 08032310 : } void snmp_inc_ipinaddrerrors(void) { ipinaddrerrors++; 8032310: 4b02 ldr r3, [pc, #8] ; (803231c ) 8032312: 681a ldr r2, [r3, #0] 8032314: 3201 adds r2, #1 8032316: 601a str r2, [r3, #0] 8032318: 4770 bx lr 803231a: bf00 nop 803231c: 2000e1f0 .word 0x2000e1f0 08032320 : ipforwdatagrams++; } void snmp_inc_ipinunknownprotos(void) { ipinunknownprotos++; 8032320: 4b02 ldr r3, [pc, #8] ; (803232c ) 8032322: 681a ldr r2, [r3, #0] 8032324: 3201 adds r2, #1 8032326: 601a str r2, [r3, #0] 8032328: 4770 bx lr 803232a: bf00 nop 803232c: 2000e24c .word 0x2000e24c 08032330 : } void snmp_inc_ipindiscards(void) { ipindiscards++; 8032330: 4b02 ldr r3, [pc, #8] ; (803233c ) 8032332: 681a ldr r2, [r3, #0] 8032334: 3201 adds r2, #1 8032336: 601a str r2, [r3, #0] 8032338: 4770 bx lr 803233a: bf00 nop 803233c: 2000e2d8 .word 0x2000e2d8 08032340 : } void snmp_inc_ipindelivers(void) { ipindelivers++; 8032340: 4b02 ldr r3, [pc, #8] ; (803234c ) 8032342: 681a ldr r2, [r3, #0] 8032344: 3201 adds r2, #1 8032346: 601a str r2, [r3, #0] 8032348: 4770 bx lr 803234a: bf00 nop 803234c: 2000e310 .word 0x2000e310 08032350 : } void snmp_inc_ipoutrequests(void) { ipoutrequests++; 8032350: 4b02 ldr r3, [pc, #8] ; (803235c ) 8032352: 681a ldr r2, [r3, #0] 8032354: 3201 adds r2, #1 8032356: 601a str r2, [r3, #0] 8032358: 4770 bx lr 803235a: bf00 nop 803235c: 2000e2f8 .word 0x2000e2f8 08032360 : } void snmp_inc_ipoutdiscards(void) { ipoutdiscards++; 8032360: 4b02 ldr r3, [pc, #8] ; (803236c ) 8032362: 681a ldr r2, [r3, #0] 8032364: 3201 adds r2, #1 8032366: 601a str r2, [r3, #0] 8032368: 4770 bx lr 803236a: bf00 nop 803236c: 2000e29c .word 0x2000e29c 08032370 : } void snmp_inc_ipoutnoroutes(void) { ipoutnoroutes++; 8032370: 4b02 ldr r3, [pc, #8] ; (803237c ) 8032372: 681a ldr r2, [r3, #0] 8032374: 3201 adds r2, #1 8032376: 601a str r2, [r3, #0] 8032378: 4770 bx lr 803237a: bf00 nop 803237c: 2000e31c .word 0x2000e31c 08032380 : /** * Inserts ipAddrTable indexes (.ipAdEntAddr) * into index tree. */ void snmp_insert_ipaddridx_tree(struct netif *ni) { 8032380: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8032384: 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]); 8032386: 3004 adds r0, #4 8032388: a902 add r1, sp, #8 803238a: f000 fb78 bl 8032a7e level = 0; ipa_rn = &ipaddrtree_root; 803238e: 4c17 ldr r4, [pc, #92] ; (80323ec ) 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; 8032390: 4f17 ldr r7, [pc, #92] ; (80323f0 ) ipa_rn->get_value = ip_addrentry_get_value; 8032392: f8df 806c ldr.w r8, [pc, #108] ; 8032400 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]); 8032396: 2500 movs r5, #0 level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) { ipa_node = NULL; 8032398: 2300 movs r3, #0 803239a: 9301 str r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); 803239c: ab02 add r3, sp, #8 803239e: 4620 mov r0, r4 80323a0: f853 1025 ldr.w r1, [r3, r5, lsl #2] 80323a4: aa01 add r2, sp, #4 80323a6: b2ee uxtb r6, r5 80323a8: f000 fba4 bl 8032af4 if ((level != 3) && (ipa_node != NULL)) 80323ac: 2e03 cmp r6, #3 80323ae: d015 beq.n 80323dc 80323b0: 9b01 ldr r3, [sp, #4] 80323b2: b19b cbz r3, 80323dc { if (ipa_node->nptr == NULL) 80323b4: 68dc ldr r4, [r3, #12] 80323b6: b98c cbnz r4, 80323dc { ipa_rn = snmp_mib_lrn_alloc(); 80323b8: f000 fb7a bl 8032ab0 ipa_node->nptr = (struct mib_node*)ipa_rn; 80323bc: 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(); 80323be: 4604 mov r4, r0 ipa_node->nptr = (struct mib_node*)ipa_rn; 80323c0: 60d8 str r0, [r3, #12] if (ipa_rn != NULL) 80323c2: b918 cbnz r0, 80323cc } } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; 80323c4: 4b0b ldr r3, [pc, #44] ; (80323f4 ) 80323c6: 2201 movs r2, #1 80323c8: 825a strh r2, [r3, #18] 80323ca: e00b b.n 80323e4 { ipa_rn = snmp_mib_lrn_alloc(); ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) 80323cc: 2e02 cmp r6, #2 80323ce: d105 bne.n 80323dc { 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; 80323d0: 4b09 ldr r3, [pc, #36] ; (80323f8 ) 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; 80323d2: e880 0180 stmia.w r0, {r7, r8} ipa_rn->set_test = noleafs_set_test; 80323d6: 6083 str r3, [r0, #8] ipa_rn->set_value = noleafs_set_value; 80323d8: 4b08 ldr r3, [pc, #32] ; (80323fc ) 80323da: 60c3 str r3, [r0, #12] 80323dc: 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) 80323de: 2d04 cmp r5, #4 80323e0: d1da bne.n 8032398 80323e2: e7ef b.n 80323c4 } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; } 80323e4: b006 add sp, #24 80323e6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80323ea: bf00 nop 80323ec: 20001748 .word 0x20001748 80323f0: 08031c95 .word 0x08031c95 80323f4: 200017cc .word 0x200017cc 80323f8: 0803140f .word 0x0803140f 80323fc: 08031413 .word 0x08031413 8032400: 08031a85 .word 0x08031a85 08032404 : /** * Removes ipAddrTable indexes (.ipAdEntAddr) * from index tree. */ void snmp_delete_ipaddridx_tree(struct netif *ni) { 8032404: b570 push {r4, r5, r6, lr} 8032406: 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]); 8032408: 3004 adds r0, #4 803240a: a90a add r1, sp, #40 ; 0x28 803240c: f000 fb37 bl 8032a7e 8032410: 2600 movs r6, #0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; 8032412: 4d1f ldr r5, [pc, #124] ; (8032490 ) LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; 8032414: 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); 8032416: ab0a add r3, sp, #40 ; 0x28 8032418: 4628 mov r0, r5 803241a: 58f1 ldr r1, [r6, r3] 803241c: aa01 add r2, sp, #4 803241e: f000 fba4 bl 8032b6a 8032422: b2c0 uxtb r0, r0 if (fc == 0) 8032424: b198 cbz r0, 803244e { /* ipaddridx[level] does not exist */ del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) 8032426: 2801 cmp r0, #1 8032428: d10b bne.n 8032442 { del_rn[del_cnt] = ipa_rn; 803242a: ab0e add r3, sp, #56 ; 0x38 803242c: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = ipa_n; 8032430: 9b01 ldr r3, [sp, #4] del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; 8032432: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = ipa_n; del_cnt++; 8032436: 3401 adds r4, #1 ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; del_n[del_cnt] = ipa_n; 8032438: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 803243c: b2e4 uxtb r4, r4 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 803243e: 68dd ldr r5, [r3, #12] 8032440: e007 b.n 8032452 } else if (fc == 2) 8032442: 2802 cmp r0, #2 8032444: d105 bne.n 8032452 { /* reset delete (2 or more childs) */ del_cnt = 0; ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 8032446: 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; 8032448: 2400 movs r4, #0 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 803244a: 68dd ldr r5, [r3, #12] 803244c: e001 b.n 8032452 { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); if (fc == 0) { /* ipaddridx[level] does not exist */ del_cnt = 0; 803244e: 4604 mov r4, r0 ipa_rn = NULL; 8032450: 4605 mov r5, r0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) 8032452: 2e0c cmp r6, #12 8032454: d012 beq.n 803247c 8032456: 3604 adds r6, #4 8032458: 2d00 cmp r5, #0 803245a: d1dc bne.n 8032416 803245c: e00e b.n 803247c level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 803245e: 3c01 subs r4, #1 8032460: b2e4 uxtb r4, r4 ipa_rn = del_rn[del_cnt]; 8032462: aa0e add r2, sp, #56 ; 0x38 8032464: eb02 0384 add.w r3, r2, r4, lsl #2 ipa_n = del_n[del_cnt]; 8032468: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; ipa_rn = del_rn[del_cnt]; 803246c: f853 0c30 ldr.w r0, [r3, #-48] ipa_n = del_n[del_cnt]; 8032470: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(ipa_rn, ipa_n); 8032472: f000 fb94 bl 8032b9e if (next != NULL) 8032476: b108 cbz r0, 803247c { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 8032478: f000 fb38 bl 8032aec ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 803247c: 2c00 cmp r4, #0 803247e: d1ee bne.n 803245e 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; 8032480: 4b03 ldr r3, [pc, #12] ; (8032490 ) 8032482: 8b9b ldrh r3, [r3, #28] 8032484: b90b cbnz r3, 803248a 8032486: 4b03 ldr r3, [pc, #12] ; (8032494 ) 8032488: 825c strh r4, [r3, #18] } 803248a: b00e add sp, #56 ; 0x38 803248c: bd70 pop {r4, r5, r6, pc} 803248e: bf00 nop 8032490: 20001748 .word 0x20001748 8032494: 200017cc .word 0x200017cc 08032498 : * * @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) { 8032498: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 803249c: b086 sub sp, #24 u8_t insert = 0; ip_addr_t dst; if (dflt != 0) 803249e: b110 cbz r0, 80324a6 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 80324a0: 2300 movs r3, #0 80324a2: 9300 str r3, [sp, #0] 80324a4: e02b b.n 80324fe insert = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 80324a6: 688a ldr r2, [r1, #8] 80324a8: 684b ldr r3, [r1, #4] 80324aa: 4013 ands r3, r2 80324ac: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 80324ae: bb33 cbnz r3, 80324fe 80324b0: e021 b.n 80324f6 snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) { iprte_node = NULL; 80324b2: 2300 movs r3, #0 80324b4: 9301 str r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); 80324b6: ab02 add r3, sp, #8 80324b8: 4620 mov r0, r4 80324ba: f853 1025 ldr.w r1, [r3, r5, lsl #2] 80324be: aa01 add r2, sp, #4 80324c0: b2ee uxtb r6, r5 80324c2: f000 fb17 bl 8032af4 if ((level != 3) && (iprte_node != NULL)) 80324c6: 2e03 cmp r6, #3 80324c8: d012 beq.n 80324f0 80324ca: 9b01 ldr r3, [sp, #4] 80324cc: b183 cbz r3, 80324f0 { if (iprte_node->nptr == NULL) 80324ce: 68dc ldr r4, [r3, #12] 80324d0: b974 cbnz r4, 80324f0 { iprte_rn = snmp_mib_lrn_alloc(); 80324d2: f000 faed bl 8032ab0 iprte_node->nptr = (struct mib_node*)iprte_rn; 80324d6: 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(); 80324d8: 4604 mov r4, r0 iprte_node->nptr = (struct mib_node*)iprte_rn; 80324da: 60d8 str r0, [r3, #12] if (iprte_rn != NULL) 80324dc: b158 cbz r0, 80324f6 { if (level == 2) 80324de: 2e02 cmp r6, #2 80324e0: d106 bne.n 80324f0 { 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; 80324e2: 4b0d ldr r3, [pc, #52] ; (8032518 ) 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; 80324e4: f8c0 8000 str.w r8, [r0] iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 80324e8: 6083 str r3, [r0, #8] iprte_rn->set_value = noleafs_set_value; 80324ea: 4b0c ldr r3, [pc, #48] ; (803251c ) 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; 80324ec: 6047 str r7, [r0, #4] iprte_rn->set_test = noleafs_set_test; iprte_rn->set_value = noleafs_set_value; 80324ee: 60c3 str r3, [r0, #12] 80324f0: 3501 adds r5, #1 u8_t level; snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) 80324f2: 2d04 cmp r5, #4 80324f4: d1dd bne.n 80324b2 } level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; 80324f6: 4b0a ldr r3, [pc, #40] ; (8032520 ) 80324f8: 2201 movs r2, #1 80324fa: 825a strh r2, [r3, #18] 80324fc: e009 b.n 8032512 struct mib_list_rootnode *iprte_rn; struct mib_list_node *iprte_node; s32_t iprteidx[4]; u8_t level; snmp_iptooid(&dst, &iprteidx[0]); 80324fe: 4668 mov r0, sp 8032500: a902 add r1, sp, #8 8032502: f000 fabc bl 8032a7e 8032506: 2500 movs r5, #0 level = 0; iprte_rn = &iprtetree_root; 8032508: 4c06 ldr r4, [pc, #24] ; (8032524 ) 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; 803250a: f8df 8020 ldr.w r8, [pc, #32] ; 803252c iprte_rn->get_value = ip_rteentry_get_value; 803250e: 4f06 ldr r7, [pc, #24] ; (8032528 ) 8032510: e7cf b.n 80324b2 level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; } 8032512: b006 add sp, #24 8032514: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8032518: 0803140f .word 0x0803140f 803251c: 08031413 .word 0x08031413 8032520: 20001834 .word 0x20001834 8032524: 20001678 .word 0x20001678 8032528: 08031f95 .word 0x08031f95 803252c: 080315d9 .word 0x080315d9 08032530 : * @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) { 8032530: b570 push {r4, r5, r6, lr} 8032532: b08e sub sp, #56 ; 0x38 u8_t del = 0; ip_addr_t dst; if (dflt != 0) 8032534: b110 cbz r0, 803253c { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 8032536: 2300 movs r3, #0 8032538: 9300 str r3, [sp, #0] 803253a: e041 b.n 80325c0 del = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 803253c: 688a ldr r2, [r1, #8] 803253e: 684b ldr r3, [r1, #4] 8032540: 4013 ands r3, r2 8032542: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 8032544: 2b00 cmp r3, #0 8032546: d13b bne.n 80325c0 8032548: e034 b.n 80325b4 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); 803254a: ab0a add r3, sp, #40 ; 0x28 803254c: 4628 mov r0, r5 803254e: 58f1 ldr r1, [r6, r3] 8032550: aa01 add r2, sp, #4 8032552: f000 fb0a bl 8032b6a 8032556: b2c0 uxtb r0, r0 if (fc == 0) 8032558: b198 cbz r0, 8032582 { /* iprteidx[level] does not exist */ del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) 803255a: 2801 cmp r0, #1 803255c: d10b bne.n 8032576 { del_rn[del_cnt] = iprte_rn; 803255e: ab0e add r3, sp, #56 ; 0x38 8032560: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = iprte_n; 8032564: 9b01 ldr r3, [sp, #4] del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; 8032566: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = iprte_n; del_cnt++; 803256a: 3401 adds r4, #1 iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; del_n[del_cnt] = iprte_n; 803256c: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 8032570: b2e4 uxtb r4, r4 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 8032572: 68dd ldr r5, [r3, #12] 8032574: e007 b.n 8032586 } else if (fc == 2) 8032576: 2802 cmp r0, #2 8032578: d105 bne.n 8032586 { /* reset delete (2 or more childs) */ del_cnt = 0; iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 803257a: 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; 803257c: 2400 movs r4, #0 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 803257e: 68dd ldr r5, [r3, #12] 8032580: e001 b.n 8032586 { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); if (fc == 0) { /* iprteidx[level] does not exist */ del_cnt = 0; 8032582: 4604 mov r4, r0 iprte_rn = NULL; 8032584: 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)) 8032586: 2e0c cmp r6, #12 8032588: d012 beq.n 80325b0 803258a: 3604 adds r6, #4 803258c: 2d00 cmp r5, #0 803258e: d1dc bne.n 803254a 8032590: e00e b.n 80325b0 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8032592: 3c01 subs r4, #1 8032594: b2e4 uxtb r4, r4 iprte_rn = del_rn[del_cnt]; 8032596: aa0e add r2, sp, #56 ; 0x38 8032598: eb02 0384 add.w r3, r2, r4, lsl #2 iprte_n = del_n[del_cnt]; 803259c: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; iprte_rn = del_rn[del_cnt]; 80325a0: f853 0c30 ldr.w r0, [r3, #-48] iprte_n = del_n[del_cnt]; 80325a4: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(iprte_rn, iprte_n); 80325a6: f000 fafa bl 8032b9e if (next != NULL) 80325aa: b108 cbz r0, 80325b0 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 80325ac: f000 fa9e bl 8032aec iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 80325b0: 2c00 cmp r4, #0 80325b2: d1ee bne.n 8032592 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; 80325b4: 4b07 ldr r3, [pc, #28] ; (80325d4 ) 80325b6: 8b9b ldrh r3, [r3, #28] 80325b8: b953 cbnz r3, 80325d0 80325ba: 4a07 ldr r2, [pc, #28] ; (80325d8 ) 80325bc: 8253 strh r3, [r2, #18] 80325be: e007 b.n 80325d0 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]); 80325c0: 4668 mov r0, sp 80325c2: a90a add r1, sp, #40 ; 0x28 80325c4: 2600 movs r6, #0 80325c6: f000 fa5a bl 8032a7e /* mark nodes for deletion */ level = 0; del_cnt = 0; 80325ca: 4634 mov r4, r6 iprte_rn = &iprtetree_root; 80325cc: 4d01 ldr r5, [pc, #4] ; (80325d4 ) 80325ce: e7bc b.n 803254a } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; } 80325d0: b00e add sp, #56 ; 0x38 80325d2: bd70 pop {r4, r5, r6, pc} 80325d4: 20001678 .word 0x20001678 80325d8: 20001834 .word 0x20001834 080325dc : void snmp_inc_icmpinmsgs(void) { icmpinmsgs++; 80325dc: 4b02 ldr r3, [pc, #8] ; (80325e8 ) 80325de: 681a ldr r2, [r3, #0] 80325e0: 3201 adds r2, #1 80325e2: 601a str r2, [r3, #0] 80325e4: 4770 bx lr 80325e6: bf00 nop 80325e8: 2000e214 .word 0x2000e214 080325ec : } void snmp_inc_icmpinerrors(void) { icmpinerrors++; 80325ec: 4b02 ldr r3, [pc, #8] ; (80325f8 ) 80325ee: 681a ldr r2, [r3, #0] 80325f0: 3201 adds r2, #1 80325f2: 601a str r2, [r3, #0] 80325f4: 4770 bx lr 80325f6: bf00 nop 80325f8: 2000e210 .word 0x2000e210 080325fc : icmpinaddrmaskreps++; } void snmp_inc_icmpoutmsgs(void) { icmpoutmsgs++; 80325fc: 4b02 ldr r3, [pc, #8] ; (8032608 ) 80325fe: 681a ldr r2, [r3, #0] 8032600: 3201 adds r2, #1 8032602: 601a str r2, [r3, #0] 8032604: 4770 bx lr 8032606: bf00 nop 8032608: 2000e294 .word 0x2000e294 0803260c : icmpoutdestunreachs++; } void snmp_inc_icmpouttimeexcds(void) { icmpouttimeexcds++; 803260c: 4b02 ldr r3, [pc, #8] ; (8032618 ) 803260e: 681a ldr r2, [r3, #0] 8032610: 3201 adds r2, #1 8032612: 601a str r2, [r3, #0] 8032614: 4770 bx lr 8032616: bf00 nop 8032618: 2000e260 .word 0x2000e260 0803261c : icmpoutechos++; } void snmp_inc_icmpoutechoreps(void) { icmpoutechoreps++; 803261c: 4b02 ldr r3, [pc, #8] ; (8032628 ) 803261e: 681a ldr r2, [r3, #0] 8032620: 3201 adds r2, #1 8032622: 601a str r2, [r3, #0] 8032624: 4770 bx lr 8032626: bf00 nop 8032628: 2000e2b4 .word 0x2000e2b4 0803262c : tcpactiveopens++; } void snmp_inc_tcppassiveopens(void) { tcppassiveopens++; 803262c: 4b02 ldr r3, [pc, #8] ; (8032638 ) 803262e: 681a ldr r2, [r3, #0] 8032630: 3201 adds r2, #1 8032632: 601a str r2, [r3, #0] 8032634: 4770 bx lr 8032636: bf00 nop 8032638: 2000e23c .word 0x2000e23c 0803263c : } void snmp_inc_tcpattemptfails(void) { tcpattemptfails++; 803263c: 4b02 ldr r3, [pc, #8] ; (8032648 ) 803263e: 681a ldr r2, [r3, #0] 8032640: 3201 adds r2, #1 8032642: 601a str r2, [r3, #0] 8032644: 4770 bx lr 8032646: bf00 nop 8032648: 2000e288 .word 0x2000e288 0803264c : } void snmp_inc_tcpestabresets(void) { tcpestabresets++; 803264c: 4b02 ldr r3, [pc, #8] ; (8032658 ) 803264e: 681a ldr r2, [r3, #0] 8032650: 3201 adds r2, #1 8032652: 601a str r2, [r3, #0] 8032654: 4770 bx lr 8032656: bf00 nop 8032658: 2000e21c .word 0x2000e21c 0803265c : } void snmp_inc_tcpinsegs(void) { tcpinsegs++; 803265c: 4b02 ldr r3, [pc, #8] ; (8032668 ) 803265e: 681a ldr r2, [r3, #0] 8032660: 3201 adds r2, #1 8032662: 601a str r2, [r3, #0] 8032664: 4770 bx lr 8032666: bf00 nop 8032668: 2000e298 .word 0x2000e298 0803266c : } void snmp_inc_tcpoutsegs(void) { tcpoutsegs++; 803266c: 4b02 ldr r3, [pc, #8] ; (8032678 ) 803266e: 681a ldr r2, [r3, #0] 8032670: 3201 adds r2, #1 8032672: 601a str r2, [r3, #0] 8032674: 4770 bx lr 8032676: bf00 nop 8032678: 2000e2e4 .word 0x2000e2e4 0803267c : } void snmp_inc_tcpretranssegs(void) { tcpretranssegs++; 803267c: 4b02 ldr r3, [pc, #8] ; (8032688 ) 803267e: 681a ldr r2, [r3, #0] 8032680: 3201 adds r2, #1 8032682: 601a str r2, [r3, #0] 8032684: 4770 bx lr 8032686: bf00 nop 8032688: 2000e2b8 .word 0x2000e2b8 0803268c : } void snmp_inc_tcpinerrs(void) { tcpinerrs++; 803268c: 4b02 ldr r3, [pc, #8] ; (8032698 ) 803268e: 681a ldr r2, [r3, #0] 8032690: 3201 adds r2, #1 8032692: 601a str r2, [r3, #0] 8032694: 4770 bx lr 8032696: bf00 nop 8032698: 2000e244 .word 0x2000e244 0803269c : } void snmp_inc_tcpoutrsts(void) { tcpoutrsts++; 803269c: 4b02 ldr r3, [pc, #8] ; (80326a8 ) 803269e: 681a ldr r2, [r3, #0] 80326a0: 3201 adds r2, #1 80326a2: 601a str r2, [r3, #0] 80326a4: 4770 bx lr 80326a6: bf00 nop 80326a8: 2000e2a8 .word 0x2000e2a8 080326ac : } void snmp_inc_udpindatagrams(void) { udpindatagrams++; 80326ac: 4b02 ldr r3, [pc, #8] ; (80326b8 ) 80326ae: 681a ldr r2, [r3, #0] 80326b0: 3201 adds r2, #1 80326b2: 601a str r2, [r3, #0] 80326b4: 4770 bx lr 80326b6: bf00 nop 80326b8: 2000e2c4 .word 0x2000e2c4 080326bc : } void snmp_inc_udpnoports(void) { udpnoports++; 80326bc: 4b02 ldr r3, [pc, #8] ; (80326c8 ) 80326be: 681a ldr r2, [r3, #0] 80326c0: 3201 adds r2, #1 80326c2: 601a str r2, [r3, #0] 80326c4: 4770 bx lr 80326c6: bf00 nop 80326c8: 2000e27c .word 0x2000e27c 080326cc : } void snmp_inc_udpinerrors(void) { udpinerrors++; 80326cc: 4b02 ldr r3, [pc, #8] ; (80326d8 ) 80326ce: 681a ldr r2, [r3, #0] 80326d0: 3201 adds r2, #1 80326d2: 601a str r2, [r3, #0] 80326d4: 4770 bx lr 80326d6: bf00 nop 80326d8: 2000e2ec .word 0x2000e2ec 080326dc : } void snmp_inc_udpoutdatagrams(void) { udpoutdatagrams++; 80326dc: 4b02 ldr r3, [pc, #8] ; (80326e8 ) 80326de: 681a ldr r2, [r3, #0] 80326e0: 3201 adds r2, #1 80326e2: 601a str r2, [r3, #0] 80326e4: 4770 bx lr 80326e6: bf00 nop 80326e8: 2000e274 .word 0x2000e274 080326ec : /** * Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) * into index tree. */ void snmp_insert_udpidx_tree(struct udp_pcb *pcb) { 80326ec: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80326f0: 4604 mov r4, r0 80326f2: 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]); 80326f4: a901 add r1, sp, #4 80326f6: f000 f9c2 bl 8032a7e udpidx[4] = pcb->local_port; 80326fa: 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; 80326fc: 4f17 ldr r7, [pc, #92] ; (803275c ) LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; 80326fe: 4c18 ldr r4, [pc, #96] ; (8032760 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8032700: f8df 806c ldr.w r8, [pc, #108] ; 8032770 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; 8032704: 9305 str r3, [sp, #20] 8032706: 2500 movs r5, #0 udp_rn = &udp_root; for (level = 0; level < 5; level++) { udp_node = NULL; 8032708: 2300 movs r3, #0 803270a: 9300 str r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); 803270c: ab01 add r3, sp, #4 803270e: 4620 mov r0, r4 8032710: f853 1025 ldr.w r1, [r3, r5, lsl #2] 8032714: 466a mov r2, sp 8032716: b2ee uxtb r6, r5 8032718: f000 f9ec bl 8032af4 if ((level != 4) && (udp_node != NULL)) 803271c: 2e04 cmp r6, #4 803271e: d015 beq.n 803274c 8032720: 9b00 ldr r3, [sp, #0] 8032722: b19b cbz r3, 803274c { if (udp_node->nptr == NULL) 8032724: 68dc ldr r4, [r3, #12] 8032726: b98c cbnz r4, 803274c { udp_rn = snmp_mib_lrn_alloc(); 8032728: f000 f9c2 bl 8032ab0 udp_node->nptr = (struct mib_node*)udp_rn; 803272c: 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(); 803272e: 4604 mov r4, r0 udp_node->nptr = (struct mib_node*)udp_rn; 8032730: 60d8 str r0, [r3, #12] if (udp_rn != NULL) 8032732: b918 cbnz r0, 803273c { udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; 8032734: 4b0b ldr r3, [pc, #44] ; (8032764 ) 8032736: 2201 movs r2, #1 8032738: 825a strh r2, [r3, #18] 803273a: e00b b.n 8032754 { udp_rn = snmp_mib_lrn_alloc(); udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) 803273c: 2e03 cmp r6, #3 803273e: d105 bne.n 803274c { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; udp_rn->set_test = noleafs_set_test; 8032740: 4b09 ldr r3, [pc, #36] ; (8032768 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 8032742: e880 0180 stmia.w r0, {r7, r8} udp_rn->set_test = noleafs_set_test; 8032746: 6083 str r3, [r0, #8] udp_rn->set_value = noleafs_set_value; 8032748: 4b08 ldr r3, [pc, #32] ; (803276c ) 803274a: 60c3 str r3, [r0, #12] 803274c: 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++) 803274e: 2d05 cmp r5, #5 8032750: d1da bne.n 8032708 8032752: e7ef b.n 8032734 udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; } 8032754: b006 add sp, #24 8032756: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 803275a: bf00 nop 803275c: 08031d81 .word 0x08031d81 8032760: 20001648 .word 0x20001648 8032764: 2000162c .word 0x2000162c 8032768: 0803140f .word 0x0803140f 803276c: 08031413 .word 0x08031413 8032770: 08031a3d .word 0x08031a3d 08032774 : /** * Removes udpTable indexes (.udpLocalAddress.udpLocalPort) * from index tree. */ void snmp_delete_udpidx_tree(struct udp_pcb *pcb) { 8032774: b570 push {r4, r5, r6, lr} 8032776: 4604 mov r4, r0 8032778: 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]); 803277a: a90b add r1, sp, #44 ; 0x2c 803277c: f000 f97f bl 8032a7e udpidx[4] = pcb->local_port; 8032780: 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; 8032782: 4b2a ldr r3, [pc, #168] ; (803282c ) 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; 8032784: 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; 8032786: 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; 8032788: 2200 movs r2, #0 npcb = udp_pcbs; while ((npcb != NULL)) 803278a: e009 b.n 80327a0 { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 803278c: 681d ldr r5, [r3, #0] 803278e: 6820 ldr r0, [r4, #0] 8032790: 4285 cmp r5, r0 8032792: d104 bne.n 803279e (npcb->local_port == udpidx[4])) 8032794: 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) && 8032796: 4288 cmp r0, r1 8032798: d101 bne.n 803279e (npcb->local_port == udpidx[4])) { bindings++; 803279a: 3201 adds r2, #1 803279c: b2d2 uxtb r2, r2 } npcb = npcb->next; 803279e: 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)) 80327a0: 2b00 cmp r3, #0 80327a2: d1f3 bne.n 803278c { bindings++; } npcb = npcb->next; } if (bindings == 1) 80327a4: 2a01 cmp r2, #1 80327a6: d004 beq.n 80327b2 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 80327a8: 4b21 ldr r3, [pc, #132] ; (8032830 ) 80327aa: 8b9b ldrh r3, [r3, #28] 80327ac: 2b00 cmp r3, #0 80327ae: d039 beq.n 8032824 80327b0: e03a b.n 8032828 { /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; 80327b2: 4d1f ldr r5, [pc, #124] ; (8032830 ) { bindings++; } npcb = npcb->next; } if (bindings == 1) 80327b4: 461e mov r6, r3 80327b6: 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); 80327b8: ab0b add r3, sp, #44 ; 0x2c 80327ba: 4628 mov r0, r5 80327bc: 58f1 ldr r1, [r6, r3] 80327be: 466a mov r2, sp 80327c0: f000 f9d3 bl 8032b6a 80327c4: b2c0 uxtb r0, r0 if (fc == 0) 80327c6: b198 cbz r0, 80327f0 { /* udpidx[level] does not exist */ del_cnt = 0; udp_rn = NULL; } else if (fc == 1) 80327c8: 2801 cmp r0, #1 80327ca: d10b bne.n 80327e4 { del_rn[del_cnt] = udp_rn; 80327cc: ab10 add r3, sp, #64 ; 0x40 80327ce: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = udp_n; 80327d2: 9b00 ldr r3, [sp, #0] del_cnt = 0; udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; 80327d4: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = udp_n; del_cnt++; 80327d8: 3401 adds r4, #1 udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; del_n[del_cnt] = udp_n; 80327da: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 80327de: b2e4 uxtb r4, r4 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 80327e0: 68dd ldr r5, [r3, #12] 80327e2: e007 b.n 80327f4 } else if (fc == 2) 80327e4: 2802 cmp r0, #2 80327e6: d105 bne.n 80327f4 { /* reset delete (2 or more childs) */ del_cnt = 0; udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 80327e8: 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; 80327ea: 2400 movs r4, #0 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 80327ec: 68dd ldr r5, [r3, #12] 80327ee: e001 b.n 80327f4 { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); if (fc == 0) { /* udpidx[level] does not exist */ del_cnt = 0; 80327f0: 4604 mov r4, r0 udp_rn = NULL; 80327f2: 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)) 80327f4: 2e10 cmp r6, #16 80327f6: d012 beq.n 803281e 80327f8: 3604 adds r6, #4 80327fa: 2d00 cmp r5, #0 80327fc: d1dc bne.n 80327b8 80327fe: e00e b.n 803281e level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 8032800: 3c01 subs r4, #1 8032802: b2e4 uxtb r4, r4 udp_rn = del_rn[del_cnt]; 8032804: aa10 add r2, sp, #64 ; 0x40 8032806: eb02 0384 add.w r3, r2, r4, lsl #2 udp_n = del_n[del_cnt]; 803280a: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; udp_rn = del_rn[del_cnt]; 803280e: f853 0c3c ldr.w r0, [r3, #-60] udp_n = del_n[del_cnt]; 8032812: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(udp_rn, udp_n); 8032814: f000 f9c3 bl 8032b9e if (next != NULL) 8032818: b108 cbz r0, 803281e { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 803281a: f000 f967 bl 8032aec udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 803281e: 2c00 cmp r4, #0 8032820: d1ee bne.n 8032800 8032822: e7c1 b.n 80327a8 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 8032824: 4a03 ldr r2, [pc, #12] ; (8032834 ) 8032826: 8253 strh r3, [r2, #18] } 8032828: b010 add sp, #64 ; 0x40 803282a: bd70 pop {r4, r5, r6, pc} 803282c: 20011098 .word 0x20011098 8032830: 20001648 .word 0x20001648 8032834: 2000162c .word 0x2000162c 08032838 : void snmp_inc_snmpinpkts(void) { snmpinpkts++; 8032838: 4b02 ldr r3, [pc, #8] ; (8032844 ) 803283a: 681a ldr r2, [r3, #0] 803283c: 3201 adds r2, #1 803283e: 601a str r2, [r3, #0] 8032840: 4770 bx lr 8032842: bf00 nop 8032844: 2000e220 .word 0x2000e220 08032848 : } void snmp_inc_snmpoutpkts(void) { snmpoutpkts++; 8032848: 4b02 ldr r3, [pc, #8] ; (8032854 ) 803284a: 681a ldr r2, [r3, #0] 803284c: 3201 adds r2, #1 803284e: 601a str r2, [r3, #0] 8032850: 4770 bx lr 8032852: bf00 nop 8032854: 2000e2f0 .word 0x2000e2f0 08032858 : } void snmp_inc_snmpinbadversions(void) { snmpinbadversions++; 8032858: 4b02 ldr r3, [pc, #8] ; (8032864 ) 803285a: 681a ldr r2, [r3, #0] 803285c: 3201 adds r2, #1 803285e: 601a str r2, [r3, #0] 8032860: 4770 bx lr 8032862: bf00 nop 8032864: 2000e2dc .word 0x2000e2dc 08032868 : } void snmp_inc_snmpinbadcommunitynames(void) { snmpinbadcommunitynames++; 8032868: 4b02 ldr r3, [pc, #8] ; (8032874 ) 803286a: 681a ldr r2, [r3, #0] 803286c: 3201 adds r2, #1 803286e: 601a str r2, [r3, #0] 8032870: 4770 bx lr 8032872: bf00 nop 8032874: 2000e1f4 .word 0x2000e1f4 08032878 : snmpinbadcommunityuses++; } void snmp_inc_snmpinasnparseerrs(void) { snmpinasnparseerrs++; 8032878: 4b02 ldr r3, [pc, #8] ; (8032884 ) 803287a: 681a ldr r2, [r3, #0] 803287c: 3201 adds r2, #1 803287e: 601a str r2, [r3, #0] 8032880: 4770 bx lr 8032882: bf00 nop 8032884: 2000e2e0 .word 0x2000e2e0 08032888 : } void snmp_inc_snmpintoobigs(void) { snmpintoobigs++; 8032888: 4b02 ldr r3, [pc, #8] ; (8032894 ) 803288a: 681a ldr r2, [r3, #0] 803288c: 3201 adds r2, #1 803288e: 601a str r2, [r3, #0] 8032890: 4770 bx lr 8032892: bf00 nop 8032894: 2000e2a0 .word 0x2000e2a0 08032898 : } void snmp_inc_snmpinnosuchnames(void) { snmpinnosuchnames++; 8032898: 4b02 ldr r3, [pc, #8] ; (80328a4 ) 803289a: 681a ldr r2, [r3, #0] 803289c: 3201 adds r2, #1 803289e: 601a str r2, [r3, #0] 80328a0: 4770 bx lr 80328a2: bf00 nop 80328a4: 2000e320 .word 0x2000e320 080328a8 : } void snmp_inc_snmpinbadvalues(void) { snmpinbadvalues++; 80328a8: 4b02 ldr r3, [pc, #8] ; (80328b4 ) 80328aa: 681a ldr r2, [r3, #0] 80328ac: 3201 adds r2, #1 80328ae: 601a str r2, [r3, #0] 80328b0: 4770 bx lr 80328b2: bf00 nop 80328b4: 2000e2bc .word 0x2000e2bc 080328b8 : } void snmp_inc_snmpinreadonlys(void) { snmpinreadonlys++; 80328b8: 4b02 ldr r3, [pc, #8] ; (80328c4 ) 80328ba: 681a ldr r2, [r3, #0] 80328bc: 3201 adds r2, #1 80328be: 601a str r2, [r3, #0] 80328c0: 4770 bx lr 80328c2: bf00 nop 80328c4: 2000e290 .word 0x2000e290 080328c8 : } void snmp_inc_snmpingenerrs(void) { snmpingenerrs++; 80328c8: 4b02 ldr r3, [pc, #8] ; (80328d4 ) 80328ca: 681a ldr r2, [r3, #0] 80328cc: 3201 adds r2, #1 80328ce: 601a str r2, [r3, #0] 80328d0: 4770 bx lr 80328d2: bf00 nop 80328d4: 2000e268 .word 0x2000e268 080328d8 : } void snmp_add_snmpintotalreqvars(u8_t value) { snmpintotalreqvars += value; 80328d8: 4b02 ldr r3, [pc, #8] ; (80328e4 ) 80328da: 681a ldr r2, [r3, #0] 80328dc: 1880 adds r0, r0, r2 80328de: 6018 str r0, [r3, #0] 80328e0: 4770 bx lr 80328e2: bf00 nop 80328e4: 2000e2c0 .word 0x2000e2c0 080328e8 : } void snmp_add_snmpintotalsetvars(u8_t value) { snmpintotalsetvars += value; 80328e8: 4b02 ldr r3, [pc, #8] ; (80328f4 ) 80328ea: 681a ldr r2, [r3, #0] 80328ec: 1880 adds r0, r0, r2 80328ee: 6018 str r0, [r3, #0] 80328f0: 4770 bx lr 80328f2: bf00 nop 80328f4: 2000e200 .word 0x2000e200 080328f8 : } void snmp_inc_snmpingetrequests(void) { snmpingetrequests++; 80328f8: 4b02 ldr r3, [pc, #8] ; (8032904 ) 80328fa: 681a ldr r2, [r3, #0] 80328fc: 3201 adds r2, #1 80328fe: 601a str r2, [r3, #0] 8032900: 4770 bx lr 8032902: bf00 nop 8032904: 2000e254 .word 0x2000e254 08032908 : } void snmp_inc_snmpingetnexts(void) { snmpingetnexts++; 8032908: 4b02 ldr r3, [pc, #8] ; (8032914 ) 803290a: 681a ldr r2, [r3, #0] 803290c: 3201 adds r2, #1 803290e: 601a str r2, [r3, #0] 8032910: 4770 bx lr 8032912: bf00 nop 8032914: 2000e1d8 .word 0x2000e1d8 08032918 : } void snmp_inc_snmpinsetrequests(void) { snmpinsetrequests++; 8032918: 4b02 ldr r3, [pc, #8] ; (8032924 ) 803291a: 681a ldr r2, [r3, #0] 803291c: 3201 adds r2, #1 803291e: 601a str r2, [r3, #0] 8032920: 4770 bx lr 8032922: bf00 nop 8032924: 2000e2fc .word 0x2000e2fc 08032928 : } void snmp_inc_snmpingetresponses(void) { snmpingetresponses++; 8032928: 4b02 ldr r3, [pc, #8] ; (8032934 ) 803292a: 681a ldr r2, [r3, #0] 803292c: 3201 adds r2, #1 803292e: 601a str r2, [r3, #0] 8032930: 4770 bx lr 8032932: bf00 nop 8032934: 2000e250 .word 0x2000e250 08032938 : } void snmp_inc_snmpintraps(void) { snmpintraps++; 8032938: 4b02 ldr r3, [pc, #8] ; (8032944 ) 803293a: 681a ldr r2, [r3, #0] 803293c: 3201 adds r2, #1 803293e: 601a str r2, [r3, #0] 8032940: 4770 bx lr 8032942: bf00 nop 8032944: 2000e1e8 .word 0x2000e1e8 08032948 : } void snmp_inc_snmpouttoobigs(void) { snmpouttoobigs++; 8032948: 4b02 ldr r3, [pc, #8] ; (8032954 ) 803294a: 681a ldr r2, [r3, #0] 803294c: 3201 adds r2, #1 803294e: 601a str r2, [r3, #0] 8032950: 4770 bx lr 8032952: bf00 nop 8032954: 2000e238 .word 0x2000e238 08032958 : } void snmp_inc_snmpoutnosuchnames(void) { snmpoutnosuchnames++; 8032958: 4b02 ldr r3, [pc, #8] ; (8032964 ) 803295a: 681a ldr r2, [r3, #0] 803295c: 3201 adds r2, #1 803295e: 601a str r2, [r3, #0] 8032960: 4770 bx lr 8032962: bf00 nop 8032964: 2000e204 .word 0x2000e204 08032968 : } void snmp_inc_snmpoutbadvalues(void) { snmpoutbadvalues++; 8032968: 4b02 ldr r3, [pc, #8] ; (8032974 ) 803296a: 681a ldr r2, [r3, #0] 803296c: 3201 adds r2, #1 803296e: 601a str r2, [r3, #0] 8032970: 4770 bx lr 8032972: bf00 nop 8032974: 2000e1e4 .word 0x2000e1e4 08032978 : } void snmp_inc_snmpoutgenerrs(void) { snmpoutgenerrs++; 8032978: 4b02 ldr r3, [pc, #8] ; (8032984 ) 803297a: 681a ldr r2, [r3, #0] 803297c: 3201 adds r2, #1 803297e: 601a str r2, [r3, #0] 8032980: 4770 bx lr 8032982: bf00 nop 8032984: 2000e324 .word 0x2000e324 08032988 : snmpoutsetrequests++; } void snmp_inc_snmpoutgetresponses(void) { snmpoutgetresponses++; 8032988: 4b02 ldr r3, [pc, #8] ; (8032994 ) 803298a: 681a ldr r2, [r3, #0] 803298c: 3201 adds r2, #1 803298e: 601a str r2, [r3, #0] 8032990: 4770 bx lr 8032992: bf00 nop 8032994: 2000e1e0 .word 0x2000e1e0 08032998 : } void snmp_inc_snmpouttraps(void) { snmpouttraps++; 8032998: 4b02 ldr r3, [pc, #8] ; (80329a4 ) 803299a: 681a ldr r2, [r3, #0] 803299c: 3201 adds r2, #1 803299e: 601a str r2, [r3, #0] 80329a0: 4770 bx lr 80329a2: bf00 nop 80329a4: 2000e258 .word 0x2000e258 080329a8 : } void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid) { *oid = &snmpgrp_id; 80329a8: 4b01 ldr r3, [pc, #4] ; (80329b0 ) 80329aa: 6003 str r3, [r0, #0] 80329ac: 4770 bx lr 80329ae: bf00 nop 80329b0: 20001858 .word 0x20001858 080329b4 : } } void snmp_get_snmpenableauthentraps(u8_t *value) { *value = *snmpenableauthentraps_ptr; 80329b4: 4b02 ldr r3, [pc, #8] ; (80329c0 ) 80329b6: 681b ldr r3, [r3, #0] 80329b8: 781b ldrb r3, [r3, #0] 80329ba: 7003 strb r3, [r0, #0] 80329bc: 4770 bx lr 80329be: bf00 nop 80329c0: 2000176c .word 0x2000176c 080329c4 : /** * Pushes nse struct onto stack. */ static void push_node(struct nse* node) { 80329c4: 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) 80329c6: 4d07 ldr r5, [pc, #28] ; (80329e4 ) 80329c8: 782b ldrb r3, [r5, #0] 80329ca: 2b1f cmp r3, #31 80329cc: d808 bhi.n 80329e0 { node_stack[node_stack_cnt] = *node; 80329ce: 4a06 ldr r2, [pc, #24] ; (80329e8 ) 80329d0: 240c movs r4, #12 80329d2: fb04 2403 mla r4, r4, r3, r2 80329d6: c807 ldmia r0, {r0, r1, r2} 80329d8: e884 0007 stmia.w r4, {r0, r1, r2} node_stack_cnt++; 80329dc: 3301 adds r3, #1 80329de: 702b strb r3, [r5, #0] 80329e0: bd30 pop {r4, r5, pc} 80329e2: bf00 nop 80329e4: 2000e328 .word 0x2000e328 80329e8: 2000e32c .word 0x2000e32c 080329ec : empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; if (node != NULL) 80329ec: b1d0 cbz r0, 8032a24 { node_type = node->node_type; 80329ee: 7c03 ldrb r3, [r0, #16] if (node_type == MIB_NODE_LR) 80329f0: 2b04 cmp r3, #4 80329f2: d105 bne.n 8032a00 { struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode *)node; if ((lrn->count == 0) || (lrn->head == NULL)) 80329f4: 8b83 ldrh r3, [r0, #28] 80329f6: b903 cbnz r3, 80329fa 80329f8: e009 b.n 8032a0e 80329fa: 6943 ldr r3, [r0, #20] 80329fc: b13b cbz r3, 8032a0e 80329fe: e010 b.n 8032a22 { empty = 1; } } else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8032a00: 1e9a subs r2, r3, #2 8032a02: 2a01 cmp r2, #1 8032a04: d805 bhi.n 8032a12 { struct mib_array_node *an; an = (struct mib_array_node *)node; if ((an->maxlength == 0) || (an->nptr == NULL)) 8032a06: 8a43 ldrh r3, [r0, #18] 8032a08: b10b cbz r3, 8032a0e 8032a0a: 6980 ldr r0, [r0, #24] 8032a0c: e004 b.n 8032a18 { empty = 1; 8032a0e: 2001 movs r0, #1 8032a10: 4770 bx lr } } else if (node_type == MIB_NODE_EX) 8032a12: 2b05 cmp r3, #5 8032a14: d105 bne.n 8032a22 { struct mib_external_node *en; en = (struct mib_external_node *)node; if (en->tree_levels == 0) 8032a16: 7e00 ldrb r0, [r0, #24] */ static u8_t empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; 8032a18: f1d0 0001 rsbs r0, r0, #1 8032a1c: bf38 it cc 8032a1e: 2000 movcc r0, #0 8032a20: 4770 bx lr 8032a22: 2000 movs r0, #0 empty = 1; } } } return empty; } 8032a24: 4770 bx lr 8032a26: 0000 movs r0, r0 08032a28 : * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 8032a28: 4b05 ldr r3, [pc, #20] ; (8032a40 ) s32_t i, ifidx; ifidx = ifindex - 1; 8032a2a: 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; 8032a2c: 681b ldr r3, [r3, #0] s32_t i, ifidx; ifidx = ifindex - 1; i = 0; 8032a2e: 2200 movs r2, #0 while ((nif != NULL) && (i < ifidx)) 8032a30: e001 b.n 8032a36 { nif = nif->next; 8032a32: 681b ldr r3, [r3, #0] i++; 8032a34: 3201 adds r2, #1 struct netif *nif = netif_list; s32_t i, ifidx; ifidx = ifindex - 1; i = 0; while ((nif != NULL) && (i < ifidx)) 8032a36: b10b cbz r3, 8032a3c 8032a38: 4282 cmp r2, r0 8032a3a: dbfa blt.n 8032a32 { nif = nif->next; i++; } *netif = nif; 8032a3c: 600b str r3, [r1, #0] 8032a3e: 4770 bx lr 8032a40: 20011070 .word 0x20011070 08032a44 : * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 8032a44: 4b06 ldr r3, [pc, #24] ; (8032a60 ) u16_t i; i = 0; 8032a46: 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; 8032a48: 681b ldr r3, [r3, #0] u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8032a4a: e001 b.n 8032a50 { nif = nif->next; 8032a4c: 681b ldr r3, [r3, #0] i++; 8032a4e: b292 uxth r2, r2 8032a50: 3201 adds r2, #1 { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8032a52: b90b cbnz r3, 8032a58 { nif = nif->next; i++; } *ifidx = i+1; 8032a54: 600a str r2, [r1, #0] 8032a56: 4770 bx lr { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 8032a58: 4283 cmp r3, r0 8032a5a: d1f7 bne.n 8032a4c 8032a5c: e7fa b.n 8032a54 8032a5e: bf00 nop 8032a60: 20011070 .word 0x20011070 08032a64 : * @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]); 8032a64: 7802 ldrb r2, [r0, #0] 8032a66: 68c3 ldr r3, [r0, #12] 8032a68: ea42 6303 orr.w r3, r2, r3, lsl #24 8032a6c: 7a02 ldrb r2, [r0, #8] 8032a6e: ea43 4302 orr.w r3, r3, r2, lsl #16 8032a72: 6842 ldr r2, [r0, #4] 8032a74: 0612 lsls r2, r2, #24 8032a76: ea43 4312 orr.w r3, r3, r2, lsr #16 8032a7a: 600b str r3, [r1, #0] 8032a7c: 4770 bx lr 08032a7e : * @param ident points to s32_t ident[4] output */ void snmp_iptooid(ip_addr_t *ip, s32_t *ident) { ident[0] = ip4_addr1(ip); 8032a7e: 7803 ldrb r3, [r0, #0] 8032a80: 600b str r3, [r1, #0] ident[1] = ip4_addr2(ip); 8032a82: 7843 ldrb r3, [r0, #1] 8032a84: 604b str r3, [r1, #4] ident[2] = ip4_addr3(ip); 8032a86: 7883 ldrb r3, [r0, #2] 8032a88: 608b str r3, [r1, #8] ident[3] = ip4_addr4(ip); 8032a8a: 78c3 ldrb r3, [r0, #3] 8032a8c: 60cb str r3, [r1, #12] 8032a8e: 4770 bx lr 08032a90 : } struct mib_list_node * snmp_mib_ln_alloc(s32_t id) { 8032a90: b510 push {r4, lr} 8032a92: 4604 mov r4, r0 struct mib_list_node *ln; ln = (struct mib_list_node *)memp_malloc(MEMP_SNMP_NODE); 8032a94: 200b movs r0, #11 8032a96: f7fa fecd bl 802d834 if (ln != NULL) 8032a9a: b120 cbz r0, 8032aa6 { ln->prev = NULL; 8032a9c: 2300 movs r3, #0 8032a9e: 6003 str r3, [r0, #0] ln->next = NULL; 8032aa0: 6043 str r3, [r0, #4] ln->objid = id; 8032aa2: 6084 str r4, [r0, #8] ln->nptr = NULL; 8032aa4: 60c3 str r3, [r0, #12] } return ln; } 8032aa6: bd10 pop {r4, pc} 08032aa8 : void snmp_mib_ln_free(struct mib_list_node *ln) { 8032aa8: 4601 mov r1, r0 memp_free(MEMP_SNMP_NODE, ln); 8032aaa: 200b movs r0, #11 8032aac: f7fa bed8 b.w 802d860 08032ab0 : } struct mib_list_rootnode * snmp_mib_lrn_alloc(void) { 8032ab0: b508 push {r3, lr} struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode*)memp_malloc(MEMP_SNMP_ROOTNODE); 8032ab2: 200a movs r0, #10 8032ab4: f7fa febe bl 802d834 if (lrn != NULL) 8032ab8: b170 cbz r0, 8032ad8 { lrn->get_object_def = noleafs_get_object_def; 8032aba: 4b08 ldr r3, [pc, #32] ; (8032adc ) 8032abc: 6003 str r3, [r0, #0] lrn->get_value = noleafs_get_value; 8032abe: 4b08 ldr r3, [pc, #32] ; (8032ae0 ) 8032ac0: 6043 str r3, [r0, #4] lrn->set_test = noleafs_set_test; 8032ac2: 4b08 ldr r3, [pc, #32] ; (8032ae4 ) 8032ac4: 6083 str r3, [r0, #8] lrn->set_value = noleafs_set_value; 8032ac6: 4b08 ldr r3, [pc, #32] ; (8032ae8 ) 8032ac8: 60c3 str r3, [r0, #12] lrn->node_type = MIB_NODE_LR; 8032aca: 2304 movs r3, #4 8032acc: 7403 strb r3, [r0, #16] lrn->maxlength = 0; 8032ace: 2300 movs r3, #0 8032ad0: 8243 strh r3, [r0, #18] lrn->head = NULL; 8032ad2: 6143 str r3, [r0, #20] lrn->tail = NULL; 8032ad4: 6183 str r3, [r0, #24] lrn->count = 0; 8032ad6: 8383 strh r3, [r0, #28] } return lrn; } 8032ad8: bd08 pop {r3, pc} 8032ada: bf00 nop 8032adc: 08031407 .word 0x08031407 8032ae0: 0803140d .word 0x0803140d 8032ae4: 0803140f .word 0x0803140f 8032ae8: 08031413 .word 0x08031413 08032aec : void snmp_mib_lrn_free(struct mib_list_rootnode *lrn) { 8032aec: 4601 mov r1, r0 memp_free(MEMP_SNMP_ROOTNODE, lrn); 8032aee: 200a movs r0, #10 8032af0: f7fa beb6 b.w 802d860 08032af4 : * 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) { 8032af4: b5f8 push {r3, r4, r5, r6, r7, lr} 8032af6: 4605 mov r5, r0 8032af8: 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) 8032afa: 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) { 8032afc: 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) 8032afe: b93c cbnz r4, 8032b10 { /* empty list, add first node */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc empty list objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 8032b00: f7ff ffc6 bl 8032a90 if (nn != NULL) 8032b04: b350 cbz r0, 8032b5c { rn->head = nn; 8032b06: 6168 str r0, [r5, #20] rn->tail = nn; 8032b08: 61a8 str r0, [r5, #24] *insn = nn; 8032b0a: 6030 str r0, [r6, #0] 8032b0c: e021 b.n 8032b52 *insn = n; insert = 2; } else if (n->objid < objid) { if (n->next == NULL) 8032b0e: 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) 8032b10: 68a3 ldr r3, [r4, #8] 8032b12: 4283 cmp r3, r0 8032b14: d102 bne.n 8032b1c { /* node is already there */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("node already there objid==%"S32_F"\n",objid)); *insn = n; 8032b16: 6034 str r4, [r6, #0] insert = 2; 8032b18: 2302 movs r3, #2 8032b1a: e023 b.n 8032b64 } else if (n->objid < objid) 8032b1c: da0a bge.n 8032b34 { if (n->next == NULL) 8032b1e: 6867 ldr r7, [r4, #4] 8032b20: 2f00 cmp r7, #0 8032b22: d1f4 bne.n 8032b0e { /* 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); 8032b24: f7ff ffb4 bl 8032a90 if (nn != NULL) 8032b28: b1d8 cbz r0, 8032b62 { nn->next = NULL; nn->prev = n; 8032b2a: e880 0090 stmia.w r0, {r4, r7} n->next = nn; 8032b2e: 6060 str r0, [r4, #4] rn->tail = nn; 8032b30: 61a8 str r0, [r5, #24] 8032b32: e00b b.n 8032b4c 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); 8032b34: f7ff ffac bl 8032a90 if (nn != NULL) 8032b38: b198 cbz r0, 8032b62 { if (n->prev == NULL) 8032b3a: 6822 ldr r2, [r4, #0] { /* insert at the head */ nn->next = n; nn->prev = NULL; 8032b3c: 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) 8032b40: b90a cbnz r2, 8032b46 { /* insert at the head */ nn->next = n; nn->prev = NULL; rn->head = nn; 8032b42: 6168 str r0, [r5, #20] 8032b44: e001 b.n 8032b4a else { /* insert in the middle */ nn->next = n; nn->prev = n->prev; n->prev->next = nn; 8032b46: 6822 ldr r2, [r4, #0] 8032b48: 6050 str r0, [r2, #4] n->prev = nn; 8032b4a: 6020 str r0, [r4, #0] } *insn = nn; 8032b4c: 6030 str r0, [r6, #0] insert = 1; 8032b4e: 2301 movs r3, #1 8032b50: e008 b.n 8032b64 } } } if (insert == 1) { rn->count += 1; 8032b52: 8bab ldrh r3, [r5, #28] 8032b54: 3301 adds r3, #1 8032b56: 83ab strh r3, [r5, #28] 8032b58: 2301 movs r3, #1 8032b5a: e000 b.n 8032b5e *insn = nn; insert = 1; } else { insert = -1; 8032b5c: 23ff movs r3, #255 ; 0xff if (insert == 1) { rn->count += 1; } LWIP_ASSERT("insert != 0",insert != 0); return insert; 8032b5e: b258 sxtb r0, r3 8032b60: bdf8 pop {r3, r4, r5, r6, r7, pc} insert = 1; } else { /* insertion failure */ insert = -1; 8032b62: 23ff movs r3, #255 ; 0xff } } } } if (insert == 1) 8032b64: 2b01 cmp r3, #1 8032b66: d1fa bne.n 8032b5e 8032b68: e7f3 b.n 8032b52 08032b6a : { s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; 8032b6a: 6943 ldr r3, [r0, #20] while ((n != NULL) && (n->objid != objid)) 8032b6c: e000 b.n 8032b70 { n = n->next; 8032b6e: 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)) 8032b70: b16b cbz r3, 8032b8e 8032b72: 6898 ldr r0, [r3, #8] 8032b74: 4288 cmp r0, r1 8032b76: d1fa bne.n 8032b6e } if (n == NULL) { fc = 0; } else if (n->nptr == NULL) 8032b78: 68d9 ldr r1, [r3, #12] 8032b7a: b161 cbz r1, 8032b96 } else { struct mib_list_rootnode *r; if (n->nptr->node_type == MIB_NODE_LR) 8032b7c: 7c08 ldrb r0, [r1, #16] 8032b7e: 2804 cmp r0, #4 8032b80: d107 bne.n 8032b92 { r = (struct mib_list_rootnode *)n->nptr; if (r->count > 1) 8032b82: 8b88 ldrh r0, [r1, #28] { /* can't delete node */ fc = 2; 8032b84: 2801 cmp r0, #1 8032b86: bf94 ite ls 8032b88: 2001 movls r0, #1 8032b8a: 2002 movhi r0, #2 8032b8c: e004 b.n 8032b98 { n = n->next; } if (n == NULL) { fc = 0; 8032b8e: 4618 mov r0, r3 8032b90: e002 b.n 8032b98 } } else { /* other node type */ fc = 3; 8032b92: 2003 movs r0, #3 8032b94: e000 b.n 8032b98 fc = 0; } else if (n->nptr == NULL) { /* leaf, can delete node */ fc = 1; 8032b96: 2001 movs r0, #1 { /* other node type */ fc = 3; } } *fn = n; 8032b98: 6013 str r3, [r2, #0] return fc; } 8032b9a: b240 sxtb r0, r0 8032b9c: 4770 bx lr 08032b9e : * @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) { 8032b9e: 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; 8032ba0: 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); 8032ba2: 68cd ldr r5, [r1, #12] rn->count -= 1; 8032ba4: 3b01 subs r3, #1 8032ba6: 8383 strh r3, [r0, #28] if (n == rn->head) 8032ba8: 6943 ldr r3, [r0, #20] 8032baa: 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) { 8032bac: 4604 mov r4, r0 /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; if (n == rn->head) 8032bae: d105 bne.n 8032bbc { rn->head = n->next; 8032bb0: 684b ldr r3, [r1, #4] 8032bb2: 6143 str r3, [r0, #20] if (n->next != NULL) 8032bb4: b17b cbz r3, 8032bd6 { /* not last node, new list begin */ n->next->prev = NULL; 8032bb6: 2200 movs r2, #0 8032bb8: 601a str r2, [r3, #0] 8032bba: e00c b.n 8032bd6 } } else if (n == rn->tail) 8032bbc: 6983 ldr r3, [r0, #24] 8032bbe: 4299 cmp r1, r3 8032bc0: 680b ldr r3, [r1, #0] 8032bc2: d104 bne.n 8032bce { rn->tail = n->prev; 8032bc4: 6183 str r3, [r0, #24] if (n->prev != NULL) 8032bc6: b133 cbz r3, 8032bd6 { /* not last node, new list end */ n->prev->next = NULL; 8032bc8: 2200 movs r2, #0 8032bca: 605a str r2, [r3, #4] 8032bcc: e003 b.n 8032bd6 } } else { /* node must be in the middle */ n->prev->next = n->next; 8032bce: 684a ldr r2, [r1, #4] 8032bd0: 605a str r2, [r3, #4] n->next->prev = n->prev; 8032bd2: 684a ldr r2, [r1, #4] 8032bd4: 6013 str r3, [r2, #0] } LWIP_DEBUGF(SNMP_MIB_DEBUG,("free list objid==%"S32_F"\n",n->objid)); snmp_mib_ln_free(n); 8032bd6: 4608 mov r0, r1 8032bd8: f7ff ff66 bl 8032aa8 if (rn->count == 0) 8032bdc: 8ba3 ldrh r3, [r4, #28] 8032bde: b90b cbnz r3, 8032be4 { rn->head = NULL; 8032be0: 6163 str r3, [r4, #20] rn->tail = NULL; 8032be2: 61a3 str r3, [r4, #24] } return next; } 8032be4: 4628 mov r0, r5 8032be6: bd38 pop {r3, r4, r5, pc} 08032be8 : * @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) { 8032be8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032bec: 4604 mov r4, r0 8032bee: b085 sub sp, #20 8032bf0: 460d mov r5, r1 8032bf2: 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) 8032bf4: f102 0804 add.w r8, r2, #4 { u8_t node_type, ext_level; ext_level = 0; 8032bf8: f04f 0b00 mov.w fp, #0 LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 8032bfc: e068 b.n 8032cd0 { node_type = node->node_type; 8032bfe: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8032c00: 1e9a subs r2, r3, #2 8032c02: 2a01 cmp r2, #1 8032c04: d812 bhi.n 8032c2c { struct mib_array_node *an; u16_t i; if (ident_len > 0) 8032c06: b90d cbnz r5, 8032c0c } else { /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; 8032c08: 2000 movs r0, #0 8032c0a: e06a b.n 8032ce2 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)) 8032c0c: 8a67 ldrh r7, [r4, #18] 8032c0e: 2300 movs r3, #0 8032c10: b29a uxth r2, r3 8032c12: 42ba cmp r2, r7 8032c14: d2f8 bcs.n 8032c08 8032c16: 009a lsls r2, r3, #2 8032c18: 6961 ldr r1, [r4, #20] 8032c1a: 5888 ldr r0, [r1, r2] 8032c1c: f858 1c04 ldr.w r1, [r8, #-4] 8032c20: 3301 adds r3, #1 8032c22: 4288 cmp r0, r1 8032c24: d1f4 bne.n 8032c10 } 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) 8032c26: 69a3 ldr r3, [r4, #24] 8032c28: 589b ldr r3, [r3, r2] 8032c2a: e057 b.n 8032cdc /* 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) 8032c2c: 2b04 cmp r3, #4 8032c2e: d10c bne.n 8032c4a { struct mib_list_rootnode *lrn; struct mib_list_node *ln; if (ident_len > 0) 8032c30: 2d00 cmp r5, #0 8032c32: d0e9 beq.n 8032c08 { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; 8032c34: 6963 ldr r3, [r4, #20] /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 8032c36: e000 b.n 8032c3a { ln = ln->next; 8032c38: 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)) 8032c3a: 2b00 cmp r3, #0 8032c3c: d0e4 beq.n 8032c08 8032c3e: 6899 ldr r1, [r3, #8] 8032c40: f858 2c04 ldr.w r2, [r8, #-4] 8032c44: 4291 cmp r1, r2 8032c46: d1f7 bne.n 8032c38 8032c48: e047 b.n 8032cda /* 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) 8032c4a: 2b05 cmp r3, #5 8032c4c: d12e bne.n 8032cac { struct mib_external_node *en; u16_t i, len; if (ident_len > 0) 8032c4e: 2d00 cmp r5, #0 8032c50: d0da beq.n 8032c08 { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); 8032c52: 69e3 ldr r3, [r4, #28] 8032c54: 6960 ldr r0, [r4, #20] 8032c56: 4659 mov r1, fp 8032c58: 4798 blx r3 if (ident_len > 0) { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; 8032c5a: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 8032c5e: 4684 mov ip, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 8032c60: e003 b.n 8032c6a { i++; 8032c62: f109 0901 add.w r9, r9, #1 8032c66: 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)) 8032c6a: 45e1 cmp r9, ip 8032c6c: d0cc beq.n 8032c08 8032c6e: 6960 ldr r0, [r4, #20] 8032c70: f858 3c04 ldr.w r3, [r8, #-4] 8032c74: 6a27 ldr r7, [r4, #32] 8032c76: f8cd c004 str.w ip, [sp, #4] 8032c7a: 4659 mov r1, fp 8032c7c: 464a mov r2, r9 8032c7e: 47b8 blx r7 8032c80: f8dd c004 ldr.w ip, [sp, #4] 8032c84: 2800 cmp r0, #0 8032c86: d1ec bne.n 8032c62 { i++; } if (i < len) 8032c88: 45e1 cmp r9, ip 8032c8a: d2bd bcs.n 8032c08 { s32_t debug_id; en->get_objid(en->addr_inf,ext_level,i,&debug_id); 8032c8c: 4659 mov r1, fp 8032c8e: ab03 add r3, sp, #12 8032c90: 6a67 ldr r7, [r4, #36] ; 0x24 8032c92: 6960 ldr r0, [r4, #20] 8032c94: 464a mov r2, r9 8032c96: 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) 8032c98: 7e23 ldrb r3, [r4, #24] 8032c9a: f10b 0b01 add.w fp, fp, #1 8032c9e: 459b cmp fp, r3 8032ca0: d100 bne.n 8032ca4 8032ca2: e00b b.n 8032cbc else { /* found it, proceed to child */ ident_len--; ident++; ext_level++; 8032ca4: fa5f fb8b uxtb.w fp, fp 8032ca8: 4623 mov r3, r4 8032caa: e00c b.n 8032cc6 /* 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) 8032cac: 2b01 cmp r3, #1 8032cae: d1ab bne.n 8032c08 { mib_scalar_node *sn; sn = (mib_scalar_node *)node; if ((ident_len == 1) && (*ident == 0)) 8032cb0: 2d01 cmp r5, #1 8032cb2: d1a9 bne.n 8032c08 8032cb4: f8da 3000 ldr.w r3, [sl] 8032cb8: 2b00 cmp r3, #0 8032cba: d1a5 bne.n 8032c08 { np->ident_len = ident_len; 8032cbc: 7035 strb r5, [r6, #0] np->ident = ident; 8032cbe: f8c6 a004 str.w sl, [r6, #4] return (struct mib_node*)sn; 8032cc2: 4620 mov r0, r4 8032cc4: e00d b.n 8032ce2 8032cc6: 3d01 subs r5, #1 8032cc8: b2ed uxtb r5, r5 8032cca: f108 0804 add.w r8, r8, #4 8032cce: 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) 8032cd0: 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) 8032cd4: 2c00 cmp r4, #0 8032cd6: d192 bne.n 8032bfe 8032cd8: e796 b.n 8032c08 } 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) 8032cda: 68db ldr r3, [r3, #12] 8032cdc: 2b00 cmp r3, #0 8032cde: d1f2 bne.n 8032cc6 8032ce0: e7ec b.n 8032cbc } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("search failed node==%p\n",(void*)node)); return NULL; } 8032ce2: b005 add sp, #20 8032ce4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08032ce8 : /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 8032ce8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8032cec: 461d mov r5, r3 8032cee: b08b sub sp, #44 ; 0x2c u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 8032cf0: 4ba4 ldr r3, [pc, #656] ; (8032f84 ) 8032cf2: 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); 8032cf6: 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) { 8032cf8: 4604 mov r4, r0 8032cfa: 460e mov r6, r1 8032cfc: 4690 mov r8, r2 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 8032cfe: 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); 8032d02: 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) 8032d04: e19c b.n 8033040 { climb_tree = 0; node_type = node->node_type; 8032d06: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 8032d08: 1e9a subs r2, r3, #2 8032d0a: 2a01 cmp r2, #1 8032d0c: f200 808f bhi.w 8032e2e 8032d10: 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) 8032d12: b90e cbnz r6, 8032d18 else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 8032d14: 46b1 mov r9, r6 8032d16: e06f b.n 8032df8 /* 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)) 8032d18: f04f 0c00 mov.w ip, #0 8032d1c: fa1f f28c uxth.w r2, ip 8032d20: 42ba cmp r2, r7 8032d22: f080 8168 bcs.w 8032ff6 8032d26: 6963 ldr r3, [r4, #20] 8032d28: f853 102c ldr.w r1, [r3, ip, lsl #2] 8032d2c: f8d8 3000 ldr.w r3, [r8] 8032d30: 4299 cmp r1, r3 8032d32: ea4f 098c mov.w r9, ip, lsl #2 8032d36: f10c 0c01 add.w ip, ip, #1 8032d3a: dbef blt.n 8032d1c } 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]; 8032d3c: 782b ldrb r3, [r5, #0] 8032d3e: eb05 0783 add.w r7, r5, r3, lsl #2 8032d42: 6079 str r1, [r7, #4] (oidret->len)++; 8032d44: 1c59 adds r1, r3, #1 8032d46: 7029 strb r1, [r5, #0] if (an->nptr[i] == NULL) 8032d48: f8d4 b018 ldr.w fp, [r4, #24] 8032d4c: f85b 0009 ldr.w r0, [fp, r9] 8032d50: b998 cbnz r0, 8032d7a { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) 8032d52: 6960 ldr r0, [r4, #20] 8032d54: f850 6009 ldr.w r6, [r0, r9] 8032d58: f8d8 0000 ldr.w r0, [r8] 8032d5c: 4286 cmp r6, r0 8032d5e: f300 8173 bgt.w 8033048 { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 8032d62: 8a60 ldrh r0, [r4, #18] { /* an->objid[i] == *ident */ (oidret->len)--; 8032d64: 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) 8032d66: 3201 adds r2, #1 8032d68: 4282 cmp r2, r0 8032d6a: f280 8144 bge.w 8032ff6 { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 8032d6e: 6963 ldr r3, [r4, #20] 8032d70: f853 302c ldr.w r3, [r3, ip, lsl #2] (oidret->len)++; 8032d74: 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]; 8032d76: 607b str r3, [r7, #4] 8032d78: e166 b.n 8033048 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; 8032d7a: 3201 adds r2, #1 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8032d7c: 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; 8032d7e: fa5f fc82 uxtb.w ip, r2 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 8032d82: 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) 8032d84: eb0c 0307 add.w r3, ip, r7 8032d88: 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]))) 8032d8a: 428b cmp r3, r1 8032d8c: d21a bcs.n 8032dc4 8032d8e: b21b sxth r3, r3 8032d90: 009a lsls r2, r3, #2 8032d92: f85b 3023 ldr.w r3, [fp, r3, lsl #2] 8032d96: 9104 str r1, [sp, #16] 8032d98: 4618 mov r0, r3 8032d9a: 9203 str r2, [sp, #12] 8032d9c: 9302 str r3, [sp, #8] 8032d9e: f8cd c004 str.w ip, [sp, #4] 8032da2: f7ff fe23 bl 80329ec 8032da6: 3701 adds r7, #1 8032da8: 9904 ldr r1, [sp, #16] 8032daa: 9a03 ldr r2, [sp, #12] 8032dac: 9b02 ldr r3, [sp, #8] 8032dae: f8dd c004 ldr.w ip, [sp, #4] 8032db2: 2800 cmp r0, #0 8032db4: d1e6 bne.n 8032d84 { j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; 8032db6: 9307 str r3, [sp, #28] cur_node.r_id = an->objid[j]; 8032db8: 6963 ldr r3, [r4, #20] 8032dba: 589b ldr r3, [r3, r2] cur_node.r_nl = 0; 8032dbc: 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]; 8032dc0: 9308 str r3, [sp, #32] 8032dc2: e001 b.n 8032dc8 cur_node.r_nl = 0; } else { cur_node.r_ptr = NULL; 8032dc4: 2300 movs r3, #0 8032dc6: 9307 str r3, [sp, #28] } push_node(&cur_node); 8032dc8: a807 add r0, sp, #28 8032dca: f7ff fdfb bl 80329c4 if (an->objid[i] == *ident) 8032dce: 6963 ldr r3, [r4, #20] 8032dd0: f853 2009 ldr.w r2, [r3, r9] 8032dd4: f8d8 3000 ldr.w r3, [r8] 8032dd8: 429a cmp r2, r3 8032dda: d104 bne.n 8032de6 { ident_len--; 8032ddc: 3e01 subs r6, #1 8032dde: b2f6 uxtb r6, r6 ident++; 8032de0: f108 0804 add.w r8, r8, #4 8032de4: e000 b.n 8032de8 } else { /* an->objid[i] < *ident */ ident_len = 0; 8032de6: 2600 movs r6, #0 } /* follow next child pointer */ node = an->nptr[i]; 8032de8: 69a3 ldr r3, [r4, #24] 8032dea: f853 3009 ldr.w r3, [r3, r9] 8032dee: e140 b.n 8033072 u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) { j++; 8032df0: f109 0901 add.w r9, r9, #1 8032df4: 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])) 8032df8: 45b9 cmp r9, r7 8032dfa: f080 80fc bcs.w 8032ff6 8032dfe: fa0f f289 sxth.w r2, r9 8032e02: 69a3 ldr r3, [r4, #24] 8032e04: f853 0022 ldr.w r0, [r3, r2, lsl #2] 8032e08: ea4f 0b82 mov.w fp, r2, lsl #2 8032e0c: f7ff fdee bl 80329ec 8032e10: 2800 cmp r0, #0 8032e12: d1ed bne.n 8032df0 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]; 8032e14: 6962 ldr r2, [r4, #20] 8032e16: 782b ldrb r3, [r5, #0] 8032e18: f852 100b ldr.w r1, [r2, fp] 8032e1c: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 8032e20: 3301 adds r3, #1 8032e22: 702b strb r3, [r5, #0] if (an->nptr[j] == NULL) 8032e24: 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]; 8032e26: 6051 str r1, [r2, #4] (oidret->len)++; if (an->nptr[j] == NULL) 8032e28: f853 300b ldr.w r3, [r3, fp] 8032e2c: e11f b.n 803306e /* j == an->maxlength */ climb_tree = 1; } } } else if(node_type == MIB_NODE_LR) 8032e2e: 2b04 cmp r3, #4 8032e30: d14c bne.n 8032ecc 8032e32: 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) 8032e34: 2e00 cmp r6, #0 8032e36: d040 beq.n 8032eba { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 8032e38: e000 b.n 8032e3c { ln = ln->next; 8032e3a: 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)) 8032e3c: 2f00 cmp r7, #0 8032e3e: f000 80da beq.w 8032ff6 8032e42: 68ba ldr r2, [r7, #8] 8032e44: f8d8 3000 ldr.w r3, [r8] 8032e48: 429a cmp r2, r3 8032e4a: dbf6 blt.n 8032e3a 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; 8032e4c: 782b ldrb r3, [r5, #0] 8032e4e: eb05 0183 add.w r1, r5, r3, lsl #2 8032e52: 604a str r2, [r1, #4] (oidret->len)++; 8032e54: 1c5a adds r2, r3, #1 8032e56: 702a strb r2, [r5, #0] if (ln->nptr == NULL) 8032e58: 68f8 ldr r0, [r7, #12] 8032e5a: b978 cbnz r0, 8032e7c { /* leaf node */ if (ln->objid > *ident) 8032e5c: 68b8 ldr r0, [r7, #8] 8032e5e: f8d8 6000 ldr.w r6, [r8] 8032e62: 42b0 cmp r0, r6 8032e64: f300 80f0 bgt.w 8033048 { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8032e68: 6878 ldr r0, [r7, #4] { /* ln->objid == *ident */ (oidret->len)--; 8032e6a: 702b strb r3, [r5, #0] /* leaf node */ if (ln->objid > *ident) { return (struct mib_node*)lrn; } else if (ln->next != NULL) 8032e6c: 2800 cmp r0, #0 8032e6e: f000 80c2 beq.w 8032ff6 { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 8032e72: 687b ldr r3, [r7, #4] 8032e74: 689b ldr r3, [r3, #8] (oidret->len)++; 8032e76: 702a strb r2, [r5, #0] } else if (ln->next != NULL) { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 8032e78: 604b str r3, [r1, #4] 8032e7a: e0e5 b.n 8033048 { struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; 8032e7c: 687c ldr r4, [r7, #4] while ((jn != NULL) && empty_table(jn->nptr)) 8032e7e: e000 b.n 8032e82 { jn = jn->next; 8032e80: 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)) 8032e82: 2c00 cmp r4, #0 8032e84: f000 80e9 beq.w 803305a 8032e88: f8d4 900c ldr.w r9, [r4, #12] 8032e8c: 4648 mov r0, r9 8032e8e: f7ff fdad bl 80329ec 8032e92: 2800 cmp r0, #0 8032e94: d1f4 bne.n 8032e80 8032e96: e0d9 b.n 803304c } else { cur_node.r_ptr = NULL; } push_node(&cur_node); 8032e98: a807 add r0, sp, #28 8032e9a: f7ff fd93 bl 80329c4 if (ln->objid == *ident) 8032e9e: 68ba ldr r2, [r7, #8] 8032ea0: f8d8 3000 ldr.w r3, [r8] 8032ea4: 429a cmp r2, r3 8032ea6: d104 bne.n 8032eb2 { ident_len--; 8032ea8: 3e01 subs r6, #1 8032eaa: b2f6 uxtb r6, r6 ident++; 8032eac: f108 0804 add.w r8, r8, #4 8032eb0: e000 b.n 8032eb4 } else { /* ln->objid < *ident */ ident_len = 0; 8032eb2: 2600 movs r6, #0 } /* follow next child pointer */ node = ln->nptr; 8032eb4: 68fb ldr r3, [r7, #12] 8032eb6: e0dc b.n 8033072 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; 8032eb8: 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)) 8032eba: 2f00 cmp r7, #0 8032ebc: f000 809b beq.w 8032ff6 8032ec0: 68f8 ldr r0, [r7, #12] 8032ec2: f7ff fd93 bl 80329ec 8032ec6: 2800 cmp r0, #0 8032ec8: d1f6 bne.n 8032eb8 8032eca: e0c8 b.n 803305e /* jn == NULL */ climb_tree = 1; } } } else if(node_type == MIB_NODE_EX) 8032ecc: 2b05 cmp r3, #5 8032ece: f040 8086 bne.w 8032fde 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) 8032ed2: 2e00 cmp r6, #0 8032ed4: d06e beq.n 8032fb4 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); 8032ed6: 69e3 ldr r3, [r4, #28] 8032ed8: 6960 ldr r0, [r4, #20] 8032eda: 4651 mov r1, sl 8032edc: 4798 blx r3 en = (struct mib_external_node *)node; if (ident_len > 0) { u16_t i, len; i = 0; 8032ede: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 8032ee2: 4683 mov fp, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 8032ee4: e003 b.n 8032eee { i++; 8032ee6: f109 0901 add.w r9, r9, #1 8032eea: 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)) 8032eee: 45d9 cmp r9, fp 8032ef0: f000 8081 beq.w 8032ff6 8032ef4: 6a27 ldr r7, [r4, #32] 8032ef6: 6960 ldr r0, [r4, #20] 8032ef8: f8d8 3000 ldr.w r3, [r8] 8032efc: 4651 mov r1, sl 8032efe: 464a mov r2, r9 8032f00: 47b8 blx r7 8032f02: 2800 cmp r0, #0 8032f04: dbef blt.n 8032ee6 { i++; } if (i < len) 8032f06: 45d9 cmp r9, fp 8032f08: d275 bcs.n 8032ff6 { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); 8032f0a: 4651 mov r1, sl 8032f0c: 464a mov r2, r9 8032f0e: ab06 add r3, sp, #24 8032f10: 6a67 ldr r7, [r4, #36] ; 0x24 8032f12: 6960 ldr r0, [r4, #20] 8032f14: 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; 8032f16: 782b ldrb r3, [r5, #0] 8032f18: 9a06 ldr r2, [sp, #24] 8032f1a: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; if ((ext_level + 1) == en->tree_levels) 8032f1e: 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; 8032f22: 604a str r2, [r1, #4] (oidret->len)++; 8032f24: 1c59 adds r1, r3, #1 8032f26: 7029 strb r1, [r5, #0] if ((ext_level + 1) == en->tree_levels) 8032f28: 7e21 ldrb r1, [r4, #24] 8032f2a: 458c cmp ip, r1 8032f2c: d118 bne.n 8032f60 { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node */ if (ex_id > *ident) 8032f2e: f8d8 1000 ldr.w r1, [r8] 8032f32: 428a cmp r2, r1 8032f34: f300 8088 bgt.w 8033048 { return (struct mib_node*)en; } else if ((i + 1) < len) 8032f38: f109 0201 add.w r2, r9, #1 8032f3c: 455a cmp r2, fp 8032f3e: da0d bge.n 8032f5c { /* ex_id == *ident */ en->get_objid(en->addr_inf,ext_level,i + 1,&ex_id); 8032f40: ab06 add r3, sp, #24 8032f42: 6a66 ldr r6, [r4, #36] ; 0x24 8032f44: 6960 ldr r0, [r4, #20] 8032f46: 4651 mov r1, sl 8032f48: b292 uxth r2, r2 8032f4a: 47b0 blx r6 (oidret->len)--; 8032f4c: 782b ldrb r3, [r5, #0] 8032f4e: 3b01 subs r3, #1 oidret->id[oidret->len] = ex_id; 8032f50: b2db uxtb r3, r3 8032f52: eb05 0583 add.w r5, r5, r3, lsl #2 8032f56: 9b06 ldr r3, [sp, #24] 8032f58: 606b str r3, [r5, #4] 8032f5a: e075 b.n 8033048 return (struct mib_node*)en; } else { /* (i + 1) == len */ (oidret->len)--; 8032f5c: 702b strb r3, [r5, #0] 8032f5e: e04a b.n 8032ff6 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; 8032f60: f109 0201 add.w r2, r9, #1 if (j < len) 8032f64: b2d2 uxtb r2, r2 8032f66: 455a cmp r2, fp 8032f68: d20e bcs.n 8032f88 { /* right node is the current external node */ cur_node.r_ptr = node; 8032f6a: 9407 str r4, [sp, #28] en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 8032f6c: 6960 ldr r0, [r4, #20] 8032f6e: 9b05 ldr r3, [sp, #20] 8032f70: f8cd c004 str.w ip, [sp, #4] 8032f74: 4651 mov r1, sl 8032f76: 6a67 ldr r7, [r4, #36] ; 0x24 8032f78: 47b8 blx r7 cur_node.r_nl = ext_level + 1; 8032f7a: f8dd c004 ldr.w ip, [sp, #4] 8032f7e: f88d c024 strb.w ip, [sp, #36] ; 0x24 8032f82: e003 b.n 8032f8c 8032f84: 2000e328 .word 0x2000e328 } else { cur_node.r_ptr = NULL; 8032f88: 2300 movs r3, #0 8032f8a: 9307 str r3, [sp, #28] } push_node(&cur_node); 8032f8c: a807 add r0, sp, #28 8032f8e: f7ff fd19 bl 80329c4 if (en->ident_cmp(en->addr_inf,ext_level,i,*ident) == 0) 8032f92: 6a27 ldr r7, [r4, #32] 8032f94: 6960 ldr r0, [r4, #20] 8032f96: f8d8 3000 ldr.w r3, [r8] 8032f9a: 4651 mov r1, sl 8032f9c: 464a mov r2, r9 8032f9e: 47b8 blx r7 8032fa0: b920 cbnz r0, 8032fac { ident_len--; 8032fa2: 3e01 subs r6, #1 8032fa4: b2f6 uxtb r6, r6 ident++; 8032fa6: f108 0804 add.w r8, r8, #4 8032faa: e000 b.n 8032fae } else { /* external id < *ident */ ident_len = 0; 8032fac: 2600 movs r6, #0 } /* proceed to child */ ext_level++; 8032fae: f10a 0a01 add.w sl, sl, #1 8032fb2: e011 b.n 8032fd8 } } else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); 8032fb4: 4651 mov r1, sl 8032fb6: 4632 mov r2, r6 8032fb8: ab06 add r3, sp, #24 8032fba: 6a67 ldr r7, [r4, #36] ; 0x24 8032fbc: 6960 ldr r0, [r4, #20] 8032fbe: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 8032fc0: 782b ldrb r3, [r5, #0] 8032fc2: 9a06 ldr r2, [sp, #24] 8032fc4: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 8032fc8: 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; 8032fca: 604a str r2, [r1, #4] (oidret->len)++; 8032fcc: 702b strb r3, [r5, #0] if ((ext_level + 1) == en->tree_levels) 8032fce: 7e23 ldrb r3, [r4, #24] 8032fd0: f10a 0a01 add.w sl, sl, #1 8032fd4: 459a cmp sl, r3 8032fd6: d037 beq.n 8033048 return (struct mib_node*)en; } else { /* no leaf, proceed to child */ ext_level++; 8032fd8: fa5f fa8a uxtb.w sl, sl 8032fdc: e030 b.n 8033040 } } } else if(node_type == MIB_NODE_SC) 8032fde: 2b01 cmp r3, #1 8032fe0: d001 beq.n 8032fe6 } else { /* unknown/unhandled node_type */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node_type %"U16_F" unkown\n",(u16_t)node_type)); return NULL; 8032fe2: 2000 movs r0, #0 8032fe4: e047 b.n 8033076 { mib_scalar_node *sn; /* scalar node */ sn = (mib_scalar_node *)node; if (ident_len > 0) 8032fe6: b936 cbnz r6, 8032ff6 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 8032fe8: 782b ldrb r3, [r5, #0] 8032fea: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 8032fee: 3301 adds r3, #1 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 8032ff0: 6056 str r6, [r2, #4] (oidret->len)++; 8032ff2: 702b strb r3, [r5, #0] 8032ff4: e028 b.n 8033048 8032ff6: 4921 ldr r1, [pc, #132] ; (803307c ) struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; 8032ff8: f04f 0a00 mov.w sl, #0 8032ffc: 780b ldrb r3, [r1, #0] pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 8032ffe: 4920 ldr r1, [pc, #128] ; (8033080 ) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; 8033000: 4652 mov r2, sl if (climb_tree) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; 8033002: 4654 mov r4, sl pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 8033004: 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)) 8033006: e00b b.n 8033020 static void pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; 8033008: 3b01 subs r3, #1 803300a: b2db uxtb r3, r3 *node = node_stack[node_stack_cnt]; 803300c: fb06 f203 mul.w r2, r6, r3 8033010: 1888 adds r0, r1, r2 8033012: 588c ldr r4, [r1, r2] 8033014: f890 a008 ldrb.w sl, [r0, #8] 8033018: 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)--; 803301a: 7828 ldrb r0, [r5, #0] 803301c: 3801 subs r0, #1 803301e: 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)) 8033020: b91b cbnz r3, 803302a 8033022: 4f16 ldr r7, [pc, #88] ; (803307c ) 8033024: 703b strb r3, [r7, #0] { pop_node(&child); /* trim returned oid */ (oidret->len)--; } if (child.r_ptr != NULL) 8033026: b924 cbnz r4, 8033032 8033028: e7db b.n 8032fe2 /* 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)) 803302a: 2c00 cmp r4, #0 803302c: d0ec beq.n 8033008 803302e: 4913 ldr r1, [pc, #76] ; (803307c ) 8033030: 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; 8033032: 782b ldrb r3, [r5, #0] 8033034: eb05 0183 add.w r1, r5, r3, lsl #2 oidret->len++; 8033038: 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; 803303a: 604a str r2, [r1, #4] oidret->len++; 803303c: 702b strb r3, [r5, #0] (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 803303e: 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) 8033040: 2c00 cmp r4, #0 8033042: f47f ae60 bne.w 8032d06 8033046: e7cc b.n 8032fe2 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) 8033048: 4620 mov r0, r4 803304a: e014 b.n 8033076 jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; cur_node.r_id = jn->objid; 803304c: 68a3 ldr r3, [r4, #8] { jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; 803304e: f8cd 901c str.w r9, [sp, #28] cur_node.r_id = jn->objid; 8033052: 9308 str r3, [sp, #32] cur_node.r_nl = 0; 8033054: f88d 0024 strb.w r0, [sp, #36] ; 0x24 8033058: e71e b.n 8032e98 } else { cur_node.r_ptr = NULL; 803305a: 9407 str r4, [sp, #28] 803305c: e71c b.n 8032e98 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; 803305e: 782b ldrb r3, [r5, #0] 8033060: 68ba ldr r2, [r7, #8] 8033062: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 8033066: 3301 adds r3, #1 8033068: 702b strb r3, [r5, #0] if (jn->nptr == NULL) 803306a: 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; 803306c: 604a str r2, [r1, #4] (oidret->len)++; if (jn->nptr == NULL) 803306e: 2b00 cmp r3, #0 8033070: d0ea beq.n 8033048 (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 8033072: 461c mov r4, r3 8033074: e7e4 b.n 8033040 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node==%p\n",(void*)node)); return NULL; } 8033076: b00b add sp, #44 ; 0x2c 8033078: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 803307c: 2000e328 .word 0x2000e328 8033080: 2000e32c .word 0x2000e32c 08033084 : * @return 1 if it matches, 0 otherwise */ u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident) { if ((ident_len > 3) && 8033084: 2803 cmp r0, #3 8033086: d90d bls.n 80330a4 8033088: 680b ldr r3, [r1, #0] 803308a: 2b01 cmp r3, #1 803308c: d10a bne.n 80330a4 (ident[0] == 1) && (ident[1] == 3) && 803308e: 684b ldr r3, [r1, #4] 8033090: 2b03 cmp r3, #3 8033092: d107 bne.n 80330a4 8033094: 688b ldr r3, [r1, #8] 8033096: 2b06 cmp r3, #6 8033098: d104 bne.n 80330a4 (ident[2] == 6) && (ident[3] == 1)) 803309a: 68c8 ldr r0, [r1, #12] { return 1; 803309c: 1e43 subs r3, r0, #1 803309e: 4258 negs r0, r3 80330a0: 4158 adcs r0, r3 80330a2: 4770 bx lr } else { return 0; 80330a4: 2000 movs r0, #0 } } 80330a6: 4770 bx lr 080330a8 : 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))) 80330a8: 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) { 80330aa: 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]; 80330ae: 1d15 adds r5, r2, #4 ident_len = ((ident_len < 4)?ident_len:4); 80330b0: 2804 cmp r0, #4 80330b2: bf34 ite cc 80330b4: 4680 movcc r8, r0 80330b6: f04f 0804 movcs.w r8, #4 { const s32_t *prefix_ptr; s32_t *ret_ptr; u8_t i; i = 0; 80330ba: 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) 80330bc: 4f10 ldr r7, [pc, #64] ; (8033100 ) 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))) 80330be: e003 b.n 80330c8 { *ret_ptr++ = *prefix_ptr++; ident++; i++; 80330c0: 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++; 80330c2: 50ee str r6, [r5, r3] ident++; i++; 80330c4: b2e4 uxtb r4, r4 80330c6: 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))) 80330c8: 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) 80330ca: eb05 0c03 add.w ip, r5, r3 80330ce: 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))) 80330d2: d101 bne.n 80330d8 80330d4: 2300 movs r3, #0 80330d6: e00c b.n 80330f2 80330d8: 59de ldr r6, [r3, r7] 80330da: 58c8 ldr r0, [r1, r3] 80330dc: 42b0 cmp r0, r6 80330de: ddef ble.n 80330c0 return 1; } else { /* i != ident_len */ return 0; 80330e0: 2000 movs r0, #0 80330e2: 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++; 80330e6: 58f1 ldr r1, [r6, r3] i++; 80330e8: 3401 adds r4, #1 if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 80330ea: f84c 1003 str.w r1, [ip, r3] i++; 80330ee: b2e4 uxtb r4, r4 80330f0: 3304 adds r3, #4 i++; } if (i == ident_len) { /* match, complete missing bits */ while (i < 4) 80330f2: 2c03 cmp r4, #3 80330f4: d9f7 bls.n 80330e6 { *ret_ptr++ = *prefix_ptr++; i++; } oidret->len = i; 80330f6: 7014 strb r4, [r2, #0] return 1; 80330f8: 2001 movs r0, #1 else { /* i != ident_len */ return 0; } } 80330fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80330fe: bf00 nop 8033100: 08041cc8 .word 0x08041cc8 08033104 : * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ void snmp_init(void) { 8033104: b510 push {r4, lr} struct snmp_msg_pstat *msg_ps; u8_t i; snmp1_pcb = udp_new(); 8033106: f7fd fa1d bl 8030544 803310a: 4c0b ldr r4, [pc, #44] ; (8033138 ) 803310c: 6020 str r0, [r4, #0] if (snmp1_pcb != NULL) 803310e: b140 cbz r0, 8033122 { udp_recv(snmp1_pcb, snmp_recv, (void *)SNMP_IN_PORT); 8033110: 490a ldr r1, [pc, #40] ; (803313c ) 8033112: 22a1 movs r2, #161 ; 0xa1 8033114: f7fd f9f6 bl 8030504 udp_bind(snmp1_pcb, IP_ADDR_ANY, SNMP_IN_PORT); 8033118: 6820 ldr r0, [r4, #0] 803311a: 4909 ldr r1, [pc, #36] ; (8033140 ) 803311c: 22a1 movs r2, #161 ; 0xa1 803311e: f7fd f8f9 bl 8030314 } msg_ps = &msg_input_list[0]; for (i=0; istate = SNMP_MSG_EMPTY; 8033122: 4b08 ldr r3, [pc, #32] ; (8033144 ) 8033124: 2200 movs r2, #0 8033126: f883 205a strb.w r2, [r3, #90] ; 0x5a msg_ps->error_index = 0; 803312a: 615a str r2, [r3, #20] msg_ps->error_status = SNMP_ES_NOERROR; 803312c: 611a str r2, [r3, #16] msg_ps++; } trap_msg.pcb = snmp1_pcb; 803312e: 4b02 ldr r3, [pc, #8] ; (8033138 ) 8033130: 681a ldr r2, [r3, #0] 8033132: 4b05 ldr r3, [pc, #20] ; (8033148 ) 8033134: 601a str r2, [r3, #0] 8033136: bd10 pop {r4, pc} 8033138: 200110ac .word 0x200110ac 803313c: 08033cb1 .word 0x08033cb1 8033140: 080413b4 .word 0x080413b4 8033144: 200110b0 .word 0x200110b0 8033148: 200111e8 .word 0x200111e8 0803314c : return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 803314c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8033150: 4680 mov r8, r0 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8033152: 200c movs r0, #12 return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 8033154: 4689 mov r9, r1 8033156: 4617 mov r7, r2 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 8033158: f7fa fb6c bl 802d834 if (vb != NULL) 803315c: 4604 mov r4, r0 803315e: 2800 cmp r0, #0 8033160: d032 beq.n 80331c8 { u8_t i; vb->next = NULL; 8033162: 2300 movs r3, #0 8033164: 6003 str r3, [r0, #0] vb->prev = NULL; 8033166: 6043 str r3, [r0, #4] i = oid->len; 8033168: f898 5000 ldrb.w r5, [r8] vb->ident_len = i; 803316c: 7205 strb r5, [r0, #8] if (i > 0) 803316e: b1ad cbz r5, 803319c { 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); 8033170: 200d movs r0, #13 8033172: f7fa fb5f bl 802d834 8033176: 4606 mov r6, r0 8033178: 60e0 str r0, [r4, #12] if (vb->ident == NULL) 803317a: b928 cbnz r0, 8033188 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); 803317c: 4621 mov r1, r4 803317e: 200c movs r0, #12 8033180: f7fa fb6e bl 802d860 return NULL; 8033184: 4634 mov r4, r6 8033186: e01f b.n 80331c8 } while(i > 0) { i--; 8033188: 3d01 subs r5, #1 803318a: b2ed uxtb r5, r5 vb->ident[i] = oid->id[i]; 803318c: eb08 0385 add.w r3, r8, r5, lsl #2 8033190: 685b ldr r3, [r3, #4] 8033192: 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) 8033196: 2d00 cmp r5, #0 8033198: d1f6 bne.n 8033188 803319a: e000 b.n 803319e } } else { /* i == 0, pass zero length object identifier */ vb->ident = NULL; 803319c: 60c5 str r5, [r0, #12] } vb->value_type = type; 803319e: f884 9010 strb.w r9, [r4, #16] vb->value_len = len; 80331a2: 7467 strb r7, [r4, #17] if (len > 0) 80331a4: b17f cbz r7, 80331c6 { 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); 80331a6: 200d movs r0, #13 80331a8: f7fa fb44 bl 802d834 80331ac: 6160 str r0, [r4, #20] if (vb->value == NULL) 80331ae: b958 cbnz r0, 80331c8 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate value space\n")); if (vb->ident != NULL) 80331b0: 68e1 ldr r1, [r4, #12] 80331b2: b111 cbz r1, 80331ba { memp_free(MEMP_SNMP_VALUE, vb->ident); 80331b4: 200d movs r0, #13 80331b6: f7fa fb53 bl 802d860 } memp_free(MEMP_SNMP_VARBIND, vb); 80331ba: 4621 mov r1, r4 80331bc: 200c movs r0, #12 80331be: f7fa fb4f bl 802d860 return NULL; 80331c2: 2400 movs r4, #0 80331c4: e000 b.n 80331c8 } } else { /* ASN1_NUL type, or zero length ASN1_OC_STR */ vb->value = NULL; 80331c6: 6167 str r7, [r4, #20] else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate varbind space\n")); } return vb; } 80331c8: 4620 mov r0, r4 80331ca: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 080331ce : void snmp_varbind_free(struct snmp_varbind *vb) { if (vb->value != NULL ) 80331ce: 6941 ldr r1, [r0, #20] return vb; } void snmp_varbind_free(struct snmp_varbind *vb) { 80331d0: b510 push {r4, lr} 80331d2: 4604 mov r4, r0 if (vb->value != NULL ) 80331d4: b111 cbz r1, 80331dc { memp_free(MEMP_SNMP_VALUE, vb->value); 80331d6: 200d movs r0, #13 80331d8: f7fa fb42 bl 802d860 } if (vb->ident != NULL ) 80331dc: 68e1 ldr r1, [r4, #12] 80331de: b111 cbz r1, 80331e6 { memp_free(MEMP_SNMP_VALUE, vb->ident); 80331e0: 200d movs r0, #13 80331e2: f7fa fb3d bl 802d860 } memp_free(MEMP_SNMP_VARBIND, vb); 80331e6: 200c movs r0, #12 80331e8: 4621 mov r1, r4 } 80331ea: e8bd 4010 ldmia.w sp!, {r4, lr} } if (vb->ident != NULL ) { memp_free(MEMP_SNMP_VALUE, vb->ident); } memp_free(MEMP_SNMP_VARBIND, vb); 80331ee: f7fa bb37 b.w 802d860 080331f2 : } void snmp_varbind_list_free(struct snmp_varbind_root *root) { 80331f2: b538 push {r3, r4, r5, lr} 80331f4: 4604 mov r4, r0 struct snmp_varbind *vb, *prev; vb = root->tail; 80331f6: 6840 ldr r0, [r0, #4] while ( vb != NULL ) 80331f8: e003 b.n 8033202 { prev = vb->prev; 80331fa: 6845 ldr r5, [r0, #4] snmp_varbind_free(vb); 80331fc: f7ff ffe7 bl 80331ce vb = prev; 8033200: 4628 mov r0, r5 snmp_varbind_list_free(struct snmp_varbind_root *root) { struct snmp_varbind *vb, *prev; vb = root->tail; while ( vb != NULL ) 8033202: 2800 cmp r0, #0 8033204: d1f9 bne.n 80331fa { prev = vb->prev; snmp_varbind_free(vb); vb = prev; } root->count = 0; 8033206: 7220 strb r0, [r4, #8] root->head = NULL; 8033208: 6020 str r0, [r4, #0] root->tail = NULL; 803320a: 6060 str r0, [r4, #4] 803320c: bd38 pop {r3, r4, r5, pc} 0803320e : //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 803320e: b570 push {r4, r5, r6, lr} 8033210: 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++) { 8033212: 2200 movs r2, #0 //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 8033214: 460e mov r6, r1 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; 8033216: f8d0 0100 ldr.w r0, [r0, #256] ; 0x100 struct snmp_varbind *vbo = msg_ps->outvb.head; 803321a: f8d4 310c ldr.w r3, [r4, #268] ; 0x10c for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 803321e: 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++) { 8033220: e008 b.n 8033234 vbi->ident_len = vbo->ident_len; 8033222: 7a1d ldrb r5, [r3, #8] 8033224: 7205 strb r5, [r0, #8] vbo->ident_len = 0; vbi->ident = vbo->ident; 8033226: 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; 8033228: 7219 strb r1, [r3, #8] vbi->ident = vbo->ident; 803322a: 60c5 str r5, [r0, #12] vbo->ident = NULL; 803322c: 60d9 str r1, [r3, #12] vbi = vbi->next; 803322e: 6800 ldr r0, [r0, #0] vbo = vbo->next; 8033230: 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++) { 8033232: 3201 adds r2, #1 8033234: f894 50f8 ldrb.w r5, [r4, #248] ; 0xf8 8033238: 42aa cmp r2, r5 803323a: dbf2 blt.n 8033222 vbo->ident = NULL; vbi = vbi->next; vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); 803323c: f504 7586 add.w r5, r4, #268 ; 0x10c 8033240: 4628 mov r0, r5 8033242: f7ff ffd6 bl 80331f2 /* we send invb back */ msg_ps->outvb = msg_ps->invb; 8033246: f504 7380 add.w r3, r4, #256 ; 0x100 803324a: e893 0007 ldmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 803324e: 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; 8033250: 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; 8033252: f8c4 3100 str.w r3, [r4, #256] ; 0x100 msg_ps->invb.tail = NULL; 8033256: f8c4 3104 str.w r3, [r4, #260] ; 0x104 msg_ps->invb.count = 0; 803325a: 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; 803325e: bf18 it ne 8033260: 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; 8033264: 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; 8033266: bf18 it ne 8033268: 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; 803326a: 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; 803326e: 6163 str r3, [r4, #20] snmp_send_response(msg_ps); 8033270: 4620 mov r0, r4 8033272: f001 f879 bl 8034368 snmp_varbind_list_free(&msg_ps->outvb); 8033276: 4628 mov r0, r5 8033278: f7ff ffbb bl 80331f2 msg_ps->state = SNMP_MSG_EMPTY; 803327c: 2300 movs r3, #0 803327e: f884 305a strb.w r3, [r4, #90] ; 0x5a 8033282: bd70 pop {r4, r5, r6, pc} 08033284 : } static void snmp_ok_response(struct snmp_msg_pstat *msg_ps) { 8033284: b510 push {r4, lr} 8033286: 4604 mov r4, r0 err_t err_ret; err_ret = snmp_send_response(msg_ps); 8033288: f001 f86e bl 8034368 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); 803328c: f504 7080 add.w r0, r4, #256 ; 0x100 8033290: f7ff ffaf bl 80331f2 snmp_varbind_list_free(&msg_ps->outvb); 8033294: f504 7086 add.w r0, r4, #268 ; 0x10c 8033298: f7ff ffab bl 80331f2 msg_ps->state = SNMP_MSG_EMPTY; 803329c: 2300 movs r3, #0 803329e: f884 305a strb.w r3, [r4, #90] ; 0x5a 80332a2: bd10 pop {r4, pc} 080332a4 : } void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb) { if (root->count == 0) 80332a4: 7a03 ldrb r3, [r0, #8] 80332a6: b90b cbnz r3, 80332ac { /* add first varbind to list */ root->head = vb; 80332a8: 6001 str r1, [r0, #0] 80332aa: e002 b.n 80332b2 root->tail = vb; } else { /* add nth varbind to list tail */ root->tail->next = vb; 80332ac: 6843 ldr r3, [r0, #4] 80332ae: 6019 str r1, [r3, #0] vb->prev = root->tail; 80332b0: 604b str r3, [r1, #4] root->tail = vb; } root->count += 1; 80332b2: 7a03 ldrb r3, [r0, #8] else { /* add nth varbind to list tail */ root->tail->next = vb; vb->prev = root->tail; root->tail = vb; 80332b4: 6041 str r1, [r0, #4] } root->count += 1; 80332b6: 3301 adds r3, #1 80332b8: 7203 strb r3, [r0, #8] 80332ba: 4770 bx lr 080332bc : * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80332bc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80332c0: 4605 mov r5, r0 * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 80332c2: b0a7 sub sp, #156 ; 0x9c struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 80332c4: 2800 cmp r0, #0 80332c6: f040 8390 bne.w 80339ea { msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) 80332ca: 4cb2 ldr r4, [pc, #712] ; (8033594 ) 80332cc: 7aa6 ldrb r6, [r4, #10] 80332ce: 2e01 cmp r6, #1 80332d0: f040 80d4 bne.w 803347c 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) 80332d4: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80332d8: 2b07 cmp r3, #7 80332da: d125 bne.n 8033328 /* 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); 80332dc: 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; 80332e0: 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); 80332e4: eb04 0282 add.w r2, r4, r2, lsl #2 80332e8: 4631 mov r1, r6 80332ea: 3274 adds r2, #116 ; 0x74 80332ec: f104 0368 add.w r3, r4, #104 ; 0x68 80332f0: f8d8 7038 ldr.w r7, [r8, #56] ; 0x38 80332f4: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 80332f6: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 80332fa: b148 cbz r0, 8033310 { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 80332fc: 2308 movs r3, #8 80332fe: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 8033302: f8d8 302c ldr.w r3, [r8, #44] ; 0x2c 8033306: 4628 mov r0, r5 8033308: f104 0168 add.w r1, r4, #104 ; 0x68 803330c: 4798 blx r3 803330e: e0a6 b.n 803345e } else { en->get_object_def_pc(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1]); 8033310: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 8033314: f8d8 3048 ldr.w r3, [r8, #72] ; 0x48 8033318: eb04 0282 add.w r2, r4, r2, lsl #2 803331c: 4631 mov r1, r6 803331e: 3274 adds r2, #116 ; 0x74 8033320: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 8033322: 4620 mov r0, r4 8033324: 2102 movs r1, #2 8033326: e02a b.n 803337e } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 8033328: 2b08 cmp r3, #8 803332a: f040 8098 bne.w 803345e /* 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, 803332e: f104 0074 add.w r0, r4, #116 ; 0x74 8033332: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 8033336: 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; 803333a: 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, 803333e: f7ff ff05 bl 803314c msg_ps->ext_object_def.asn_type, (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) 8033342: 4607 mov r7, r0 8033344: b1a0 cbz r0, 8033370 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8033346: 697b ldr r3, [r7, #20] 8033348: f8d8 c03c ldr.w ip, [r8, #60] ; 0x3c 803334c: 7c7a ldrb r2, [r7, #17] 803334e: 4628 mov r0, r5 8033350: f104 0168 add.w r1, r4, #104 ; 0x68 8033354: 47e0 blx ip snmp_varbind_tail_add(&msg_ps->outvb, vb); 8033356: f504 7086 add.w r0, r4, #268 ; 0x10c 803335a: 4639 mov r1, r7 803335c: f7ff ffa2 bl 80332a4 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; 8033360: 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; 8033364: f884 605a strb.w r6, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8033368: 3301 adds r3, #1 803336a: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803336e: e076 b.n 803345e } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8033370: f104 0168 add.w r1, r4, #104 ; 0x68 8033374: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 8033378: 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); 803337a: 4620 mov r0, r4 803337c: 4631 mov r1, r6 803337e: f7ff ff46 bl 803320e 8033382: e06c b.n 803345e (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_obj_id oid; if (msg_ps->vb_idx == 0) 8033384: b913 cbnz r3, 803338c { msg_ps->vb_ptr = msg_ps->invb.head; 8033386: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 803338a: e002 b.n 8033392 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 803338c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8033390: 681b ldr r3, [r3, #0] 8033392: 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)) 8033396: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803339a: aa05 add r2, sp, #20 803339c: 7a18 ldrb r0, [r3, #8] 803339e: 68d9 ldr r1, [r3, #12] 80333a0: f7ff fe82 bl 80330a8 80333a4: 2800 cmp r0, #0 80333a6: f000 82ff beq.w 80339a8 { if (msg_ps->vb_ptr->ident_len > 3) 80333aa: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80333ae: 7a19 ldrb r1, [r3, #8] 80333b0: 2903 cmp r1, #3 80333b2: d905 bls.n 80333c0 { /* can offset ident_len and ident */ mn = snmp_expand_tree((struct mib_node*)&internet, 80333b4: 68da ldr r2, [r3, #12] 80333b6: 4878 ldr r0, [pc, #480] ; (8033598 ) 80333b8: 3904 subs r1, #4 80333ba: b2c9 uxtb r1, r1 80333bc: 3210 adds r2, #16 80333be: e002 b.n 80333c6 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); 80333c0: 2100 movs r1, #0 80333c2: 4875 ldr r0, [pc, #468] ; (8033598 ) 80333c4: 460a mov r2, r1 80333c6: ab05 add r3, sp, #20 80333c8: f7ff fc8e bl 8032ce8 80333cc: 4605 mov r5, r0 } else { mn = NULL; } if (mn != NULL) 80333ce: 2800 cmp r0, #0 80333d0: f000 82ea beq.w 80339a8 { if (mn->node_type == MIB_NODE_EX) 80333d4: 7c03 ldrb r3, [r0, #16] 80333d6: 2b05 cmp r3, #5 80333d8: d113 bne.n 8033402 { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 80333da: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 80333dc: 65e0 str r0, [r4, #92] ; 0x5c msg_ps->ext_oid = oid; 80333de: a905 add r1, sp, #20 80333e0: 2284 movs r2, #132 ; 0x84 80333e2: 486e ldr r0, [pc, #440] ; (803359c ) 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; 80333e4: 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; 80333e8: f7ee fab0 bl 802194c en->get_object_def_q(en->addr_inf, request_id, 1, &oid.id[oid.len - 1]); 80333ec: f89d 3014 ldrb.w r3, [sp, #20] 80333f0: 6aae ldr r6, [r5, #40] ; 0x28 80333f2: 6968 ldr r0, [r5, #20] 80333f4: ad05 add r5, sp, #20 80333f6: 2100 movs r1, #0 80333f8: 2201 movs r2, #1 80333fa: eb05 0383 add.w r3, r5, r3, lsl #2 80333fe: 47b0 blx r6 8033400: e02e b.n 8033460 { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8033402: 2302 movs r3, #2 mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 8033404: 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; 8033408: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 803340c: af05 add r7, sp, #20 803340e: 6803 ldr r3, [r0, #0] 8033410: eb07 0181 add.w r1, r7, r1, lsl #2 8033414: 2001 movs r0, #1 8033416: aa02 add r2, sp, #8 8033418: 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); 803341a: a805 add r0, sp, #20 803341c: f89d 100a ldrb.w r1, [sp, #10] 8033420: f89d 200c ldrb.w r2, [sp, #12] 8033424: f7ff fe92 bl 803314c if (vb != NULL) 8033428: 4606 mov r6, r0 803342a: b1a8 cbz r0, 8033458 { msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 803342c: 2303 movs r3, #3 803342e: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_value(&object_def, object_def.v_len, vb->value); 8033432: 686b ldr r3, [r5, #4] 8033434: f8bd 100c ldrh.w r1, [sp, #12] 8033438: 6972 ldr r2, [r6, #20] 803343a: a802 add r0, sp, #8 803343c: 4798 blx r3 snmp_varbind_tail_add(&msg_ps->outvb, vb); 803343e: 4858 ldr r0, [pc, #352] ; (80335a0 ) 8033440: 4631 mov r1, r6 8033442: f7ff ff2f bl 80332a4 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8033446: 2301 movs r3, #1 8033448: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 803344c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8033450: 3301 adds r3, #1 8033452: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8033456: e003 b.n 8033460 } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8033458: 484e ldr r0, [pc, #312] ; (8033594 ) 803345a: 2101 movs r1, #1 803345c: e2a6 b.n 80339ac 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) && 803345e: 4c4d ldr r4, [pc, #308] ; (8033594 ) 8033460: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8033464: 2b01 cmp r3, #1 8033466: f040 82c0 bne.w 80339ea (msg_ps->vb_idx < msg_ps->invb.count)) 803346a: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 803346e: 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) && 8033472: 4293 cmp r3, r2 8033474: d386 bcc.n 8033384 8033476: e2a7 b.n 80339c8 } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { snmp_ok_response(msg_ps); 8033478: 4846 ldr r0, [pc, #280] ; (8033594 ) 803347a: e292 b.n 80339a2 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) 803347c: 2e00 cmp r6, #0 803347e: f040 8126 bne.w 80336ce 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) 8033482: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8033486: 2b07 cmp r3, #7 8033488: d122 bne.n 80334d0 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 803348a: 6de5 ldr r5, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 803348c: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 8033490: 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); 8033494: 6baf ldr r7, [r5, #56] ; 0x38 8033496: f104 0368 add.w r3, r4, #104 ; 0x68 803349a: 4649 mov r1, r9 803349c: 4642 mov r2, r8 803349e: 47b8 blx r7 if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 80334a0: f894 3068 ldrb.w r3, [r4, #104] ; 0x68 80334a4: b163 cbz r3, 80334c0 (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) 80334a6: 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) && 80334aa: 07da lsls r2, r3, #31 80334ac: d508 bpl.n 80334c0 (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 80334ae: 2308 movs r3, #8 80334b0: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 80334b4: 6aeb ldr r3, [r5, #44] ; 0x2c 80334b6: 4630 mov r0, r6 80334b8: f104 0168 add.w r1, r4, #104 ; 0x68 80334bc: 4798 blx r3 80334be: e0f7 b.n 80336b0 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 80334c0: 2000 movs r0, #0 80334c2: 4649 mov r1, r9 80334c4: 6cab ldr r3, [r5, #72] ; 0x48 80334c6: 4642 mov r2, r8 80334c8: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80334ca: 4832 ldr r0, [pc, #200] ; (8033594 ) 80334cc: 2102 movs r1, #2 80334ce: e059 b.n 8033584 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 80334d0: 2b08 cmp r3, #8 80334d2: f040 80ed bne.w 80336b0 /* get_value() answer */ en = msg_ps->ext_mib_node; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80334d6: 200c movs r0, #12 { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 80334d8: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80334dc: f7fa f9aa bl 802d834 if (vb != NULL) 80334e0: 4605 mov r5, r0 80334e2: 2800 cmp r0, #0 80334e4: d047 beq.n 8033576 { vb->next = NULL; 80334e6: 6006 str r6, [r0, #0] vb->prev = NULL; 80334e8: 6046 str r6, [r0, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80334ea: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80334ee: 68da ldr r2, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 80334f0: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 80334f2: 60c2 str r2, [r0, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 80334f4: 7203 strb r3, [r0, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 80334f6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 80334fa: 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; 80334fc: 60de str r6, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = msg_ps->ext_object_def.asn_type; 80334fe: f894 306a ldrb.w r3, [r4, #106] ; 0x6a 8033502: 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; 8033504: f894 706c ldrb.w r7, [r4, #108] ; 0x6c 8033508: 7447 strb r7, [r0, #17] if (vb->value_len > 0) 803350a: b1ef cbz r7, 8033548 { 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); 803350c: 200d movs r0, #13 803350e: f7fa f991 bl 802d834 8033512: 4603 mov r3, r0 8033514: 6168 str r0, [r5, #20] if (vb->value != NULL) 8033516: b138 cbz r0, 8033528 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 8033518: f8d8 703c ldr.w r7, [r8, #60] ; 0x3c 803351c: 7c6a ldrb r2, [r5, #17] 803351e: 4630 mov r0, r6 8033520: f104 0168 add.w r1, r4, #104 ; 0x68 8033524: 47b8 blx r7 8033526: e018 b.n 803355a msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8033528: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 803352c: f104 0168 add.w r1, r4, #104 ; 0x68 8033530: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 8033532: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8033536: 68ea ldr r2, [r5, #12] 8033538: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 803353a: 7a2a ldrb r2, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 803353c: 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; 803353e: 721a strb r2, [r3, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8033540: 4629 mov r1, r5 8033542: f7fa f98d bl 802d860 8033546: e01b b.n 8033580 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ en->get_value_a(request_id, &msg_ps->ext_object_def, 0, NULL); 8033548: f8d8 603c ldr.w r6, [r8, #60] ; 0x3c 803354c: 4638 mov r0, r7 803354e: f104 0168 add.w r1, r4, #104 ; 0x68 8033552: 463a mov r2, r7 8033554: 463b mov r3, r7 8033556: 47b0 blx r6 vb->value = NULL; 8033558: 616f str r7, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 803355a: f504 7086 add.w r0, r4, #268 ; 0x10c 803355e: 4629 mov r1, r5 8033560: f7ff fea0 bl 80332a4 /* search again (if vb_idx < msg_ps->invb.count) */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8033564: 2301 movs r3, #1 8033566: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 803356a: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 803356e: 3301 adds r3, #1 8033570: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8033574: e09c b.n 80336b0 } } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 8033576: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 803357a: f104 0168 add.w r1, r4, #104 ; 0x68 803357e: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 8033580: 4620 mov r0, r4 8033582: 2101 movs r1, #1 8033584: f7ff fe43 bl 803320e 8033588: e092 b.n 80336b0 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 803358a: b95b cbnz r3, 80335a4 { msg_ps->vb_ptr = msg_ps->invb.head; 803358c: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 8033590: e00b b.n 80335aa 8033592: bf00 nop 8033594: 200110b0 .word 0x200110b0 8033598: 08041be0 .word 0x08041be0 803359c: 20011124 .word 0x20011124 80335a0: 200111bc .word 0x200111bc } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 80335a4: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80335a8: 681b ldr r3, [r3, #0] 80335aa: 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)) 80335ae: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80335b2: 7a18 ldrb r0, [r3, #8] 80335b4: 68d9 ldr r1, [r3, #12] 80335b6: f7ff fd65 bl 8033084 80335ba: 2800 cmp r0, #0 80335bc: d073 beq.n 80336a6 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 80335be: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80335c2: 48a6 ldr r0, [pc, #664] ; (803385c ) 80335c4: 7a19 ldrb r1, [r3, #8] 80335c6: 68da ldr r2, [r3, #12] 80335c8: 3904 subs r1, #4 80335ca: b2c9 uxtb r1, r1 80335cc: 3210 adds r2, #16 80335ce: 466b mov r3, sp 80335d0: f7ff fb0a bl 8032be8 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 80335d4: 4606 mov r6, r0 80335d6: 2800 cmp r0, #0 80335d8: d065 beq.n 80336a6 { if (mn->node_type == MIB_NODE_EX) 80335da: 7c03 ldrb r3, [r0, #16] 80335dc: 2b05 cmp r3, #5 80335de: d110 bne.n 8033602 /* 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; 80335e0: 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; 80335e2: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 80335e4: 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; 80335e8: 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; 80335ec: 4b9c ldr r3, [pc, #624] ; (8033860 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 80335ee: 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; 80335f2: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 80335f6: 2100 movs r1, #0 80335f8: 6ab5 ldr r5, [r6, #40] ; 0x28 80335fa: 6970 ldr r0, [r6, #20] 80335fc: 9b01 ldr r3, [sp, #4] 80335fe: 47a8 blx r5 8033600: e058 b.n 80336b4 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 8033602: 2302 movs r3, #2 8033604: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8033608: 6803 ldr r3, [r0, #0] 803360a: 9901 ldr r1, [sp, #4] 803360c: f89d 0000 ldrb.w r0, [sp] 8033610: aa02 add r2, sp, #8 8033612: 4798 blx r3 if ((object_def.instance != MIB_OBJECT_NONE) && 8033614: f89d 3008 ldrb.w r3, [sp, #8] 8033618: 2b00 cmp r3, #0 803361a: d044 beq.n 80336a6 (object_def.access & MIB_ACCESS_READ)) 803361c: 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) && 8033620: 07db lsls r3, r3, #31 8033622: f100 81c6 bmi.w 80339b2 8033626: e03e b.n 80336a6 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; 8033628: 2200 movs r2, #0 803362a: 602a str r2, [r5, #0] vb->prev = NULL; 803362c: 606a str r2, [r5, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 803362e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8033632: 68d9 ldr r1, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8033634: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 8033636: 60e9 str r1, [r5, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 8033638: 722b strb r3, [r5, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 803363a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 803363e: 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; 8033640: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = object_def.asn_type; 8033642: f89d 300a ldrb.w r3, [sp, #10] 8033646: 742b strb r3, [r5, #16] LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb->value_len = (u8_t)object_def.v_len; 8033648: f89d 300c ldrb.w r3, [sp, #12] 803364c: 746b strb r3, [r5, #17] if (vb->value_len > 0) 803364e: b1bb cbz r3, 8033680 { 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); 8033650: 200d movs r0, #13 8033652: f7fa f8ef bl 802d834 8033656: 4602 mov r2, r0 8033658: 6168 str r0, [r5, #20] if (vb->value != NULL) 803365a: b120 cbz r0, 8033666 { mn->get_value(&object_def, vb->value_len, vb->value); 803365c: 6877 ldr r7, [r6, #4] 803365e: 7c69 ldrb r1, [r5, #17] 8033660: a802 add r0, sp, #8 8033662: 47b8 blx r7 8033664: e00d b.n 8033682 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; 8033666: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803366a: 68e9 ldr r1, [r5, #12] 803366c: 60d9 str r1, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 803366e: 7a29 ldrb r1, [r5, #8] vb->ident = NULL; 8033670: 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; 8033672: 7219 strb r1, [r3, #8] vb->ident = NULL; vb->ident_len = 0; 8033674: 7228 strb r0, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 8033676: 4629 mov r1, r5 8033678: 200c movs r0, #12 803367a: f7fa f8f1 bl 802d860 803367e: e00d b.n 803369c } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ vb->value = NULL; 8033680: 616b str r3, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 8033682: 4878 ldr r0, [pc, #480] ; (8033864 ) 8033684: 4629 mov r1, r5 8033686: f7ff fe0d bl 80332a4 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803368a: 2301 movs r3, #1 803368c: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8033690: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8033694: 3301 adds r3, #1 8033696: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803369a: e003 b.n 80336a4 } } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 803369c: 4872 ldr r0, [pc, #456] ; (8033868 ) 803369e: 2101 movs r1, #1 80336a0: f7ff fdb5 bl 803320e } else { mn = NULL; } if (mn == NULL) 80336a4: b936 cbnz r6, 80336b4 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80336a6: 4870 ldr r0, [pc, #448] ; (8033868 ) 80336a8: 2102 movs r1, #2 80336aa: f7ff fdb0 bl 803320e 80336ae: e001 b.n 80336b4 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) && 80336b0: 4c6d ldr r4, [pc, #436] ; (8033868 ) 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, 80336b2: 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) && 80336b4: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80336b8: 2b01 cmp r3, #1 80336ba: f040 8196 bne.w 80339ea (msg_ps->vb_idx < msg_ps->invb.count)) 80336be: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80336c2: 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) && 80336c6: 4293 cmp r3, r2 80336c8: f4ff af5f bcc.w 803358a 80336cc: e17c b.n 80339c8 } 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) 80336ce: 2e03 cmp r6, #3 80336d0: f040 818b bne.w 80339ea 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) 80336d4: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 80336d8: 2b07 cmp r3, #7 80336da: d11b bne.n 8033714 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 80336dc: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 80336de: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 80336e2: 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); 80336e6: 6bb7 ldr r7, [r6, #56] ; 0x38 80336e8: 4649 mov r1, r9 80336ea: 4642 mov r2, r8 80336ec: f104 0368 add.w r3, r4, #104 ; 0x68 80336f0: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 80336f2: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 80336f6: b140 cbz r0, 803370a { msg_ps->state = SNMP_MSG_EXTERNAL_SET_TEST; 80336f8: 2309 movs r3, #9 80336fa: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_test_q(request_id, &msg_ps->ext_object_def); 80336fe: 6b33 ldr r3, [r6, #48] ; 0x30 8033700: 4628 mov r0, r5 8033702: f104 0168 add.w r1, r4, #104 ; 0x68 8033706: 4798 blx r3 8033708: e0d5 b.n 80338b6 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 803370a: 6cb3 ldr r3, [r6, #72] ; 0x48 803370c: 4649 mov r1, r9 803370e: 4642 mov r2, r8 8033710: 4798 blx r3 8033712: e023 b.n 803375c /* 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) 8033714: 2b09 cmp r3, #9 8033716: d124 bne.n 8033762 struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 8033718: 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; 803371c: 6de5 ldr r5, [r4, #92] ; 0x5c if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 803371e: f003 0302 and.w r3, r3, #2 8033722: b2db uxtb r3, r3 8033724: b1b3 cbz r3, 8033754 { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 8033726: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 803372a: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 803372e: 7c1a ldrb r2, [r3, #16] 8033730: 4291 cmp r1, r2 8033732: d108 bne.n 8033746 (en->set_test_a(request_id,&msg_ps->ext_object_def, 8033734: 7c5a ldrb r2, [r3, #17] 8033736: 6c2e ldr r6, [r5, #64] ; 0x40 8033738: 695b ldr r3, [r3, #20] 803373a: f104 0168 add.w r1, r4, #104 ; 0x68 803373e: 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) && 8033740: b108 cbz r0, 8033746 (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; 8033742: 2301 movs r3, #1 8033744: e040 b.n 80337c8 msg_ps->vb_idx += 1; } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8033746: 2000 movs r0, #0 8033748: 4948 ldr r1, [pc, #288] ; (803386c ) 803374a: 6d2b ldr r3, [r5, #80] ; 0x50 803374c: 4798 blx r3 /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 803374e: 4846 ldr r0, [pc, #280] ; (8033868 ) 8033750: 2103 movs r1, #3 8033752: e029 b.n 80337a8 } } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 8033754: 6d2b ldr r3, [r5, #80] ; 0x50 8033756: f104 0168 add.w r1, r4, #104 ; 0x68 803375a: 4798 blx r3 /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 803375c: 4620 mov r0, r4 803375e: 2102 movs r1, #2 8033760: e022 b.n 80337a8 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF_S) 8033762: 2b0a cmp r3, #10 8033764: d123 bne.n 80337ae { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 8033766: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 8033768: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 803376c: 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); 8033770: 6bb7 ldr r7, [r6, #56] ; 0x38 8033772: 4649 mov r1, r9 8033774: 4642 mov r2, r8 8033776: f104 0368 add.w r3, r4, #104 ; 0x68 803377a: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 803377c: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 8033780: b160 cbz r0, 803379c { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; 8033782: 230b movs r3, #11 8033784: 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); 8033788: 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, 803378c: 6b76 ldr r6, [r6, #52] ; 0x34 803378e: 7c5a ldrb r2, [r3, #17] 8033790: 695b ldr r3, [r3, #20] 8033792: 4628 mov r0, r5 8033794: f104 0168 add.w r1, r4, #104 ; 0x68 8033798: 47b0 blx r6 803379a: e08c b.n 80338b6 msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 803379c: 4649 mov r1, r9 803379e: 6cb3 ldr r3, [r6, #72] ; 0x48 80337a0: 4642 mov r2, r8 80337a2: 4798 blx r3 /* set_value failed, object has disappeared for some odd reason?? */ snmp_error_response(msg_ps,SNMP_ES_GENERROR); 80337a4: 4620 mov r0, r4 80337a6: 2105 movs r1, #5 80337a8: f7ff fd31 bl 803320e 80337ac: e083 b.n 80338b6 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_VALUE) 80337ae: 2b0b cmp r3, #11 80337b0: f040 8081 bne.w 80338b6 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); 80337b4: 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, 80337b8: 6de2 ldr r2, [r4, #92] ; 0x5c 80337ba: f104 0168 add.w r1, r4, #104 ; 0x68 80337be: 6c55 ldr r5, [r2, #68] ; 0x44 80337c0: 7c5a ldrb r2, [r3, #17] 80337c2: 695b ldr r3, [r3, #20] 80337c4: 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; 80337c6: 2306 movs r3, #6 80337c8: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 80337cc: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 80337d0: 3301 adds r3, #1 80337d2: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 80337d6: e06e b.n 80338b6 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 80337d8: b912 cbnz r2, 80337e0 { msg_ps->vb_ptr = msg_ps->invb.head; 80337da: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 80337de: e002 b.n 80337e6 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 80337e0: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80337e4: 681b ldr r3, [r3, #0] 80337e6: 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)) 80337ea: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80337ee: 7a18 ldrb r0, [r3, #8] 80337f0: 68d9 ldr r1, [r3, #12] 80337f2: f7ff fc47 bl 8033084 80337f6: 2800 cmp r0, #0 80337f8: d058 beq.n 80338ac { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 80337fa: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80337fe: 4817 ldr r0, [pc, #92] ; (803385c ) 8033800: 7a19 ldrb r1, [r3, #8] 8033802: 68da ldr r2, [r3, #12] 8033804: 3904 subs r1, #4 8033806: b2c9 uxtb r1, r1 8033808: 3210 adds r2, #16 803380a: 466b mov r3, sp 803380c: f7ff f9ec bl 8032be8 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 8033810: 4605 mov r5, r0 8033812: 2800 cmp r0, #0 8033814: d04a beq.n 80338ac { if (mn->node_type == MIB_NODE_EX) 8033816: 7c03 ldrb r3, [r0, #16] 8033818: 2b05 cmp r3, #5 803381a: d110 bne.n 803383e /* 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; 803381c: 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; 803381e: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8033820: 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; 8033824: 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; 8033828: 4b0d ldr r3, [pc, #52] ; (8033860 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 803382a: 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; 803382e: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8033832: 2100 movs r1, #0 8033834: 6aaf ldr r7, [r5, #40] ; 0x28 8033836: 6968 ldr r0, [r5, #20] 8033838: 9b01 ldr r3, [sp, #4] 803383a: 47b8 blx r7 803383c: e03d b.n 80338ba else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 803383e: 2702 movs r7, #2 8033840: f884 705a strb.w r7, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 8033844: 6803 ldr r3, [r0, #0] 8033846: 9901 ldr r1, [sp, #4] 8033848: f89d 0000 ldrb.w r0, [sp] 803384c: aa02 add r2, sp, #8 803384e: 4798 blx r3 if (object_def.instance != MIB_OBJECT_NONE) 8033850: f89d 3008 ldrb.w r3, [sp, #8] 8033854: 2b00 cmp r3, #0 8033856: f040 80b9 bne.w 80339cc 803385a: e027 b.n 80338ac 803385c: 08041be0 .word 0x08041be0 8033860: 20011110 .word 0x20011110 8033864: 200111bc .word 0x200111bc 8033868: 200110b0 .word 0x200110b0 803386c: 20011118 .word 0x20011118 { 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) && 8033870: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8033874: f89d 100a ldrb.w r1, [sp, #10] 8033878: 7c1a ldrb r2, [r3, #16] 803387a: 4291 cmp r1, r2 803387c: d10e bne.n 803389c (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) 803387e: 68af ldr r7, [r5, #8] 8033880: 7c59 ldrb r1, [r3, #17] 8033882: 695a ldr r2, [r3, #20] 8033884: a802 add r0, sp, #8 8033886: 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) && 8033888: b140 cbz r0, 803389c (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 803388a: 2301 movs r3, #1 803388c: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 8033890: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8033894: 3301 adds r3, #1 8033896: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 803389a: e006 b.n 80338aa } else { /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 803389c: 4854 ldr r0, [pc, #336] ; (80339f0 ) 803389e: 2103 movs r1, #3 80338a0: e001 b.n 80338a6 } } else { /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80338a2: 4853 ldr r0, [pc, #332] ; (80339f0 ) 80338a4: 4639 mov r1, r7 80338a6: f7ff fcb2 bl 803320e } else { mn = NULL; } if (mn == NULL) 80338aa: b935 cbnz r5, 80338ba { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80338ac: 4850 ldr r0, [pc, #320] ; (80339f0 ) 80338ae: 2102 movs r1, #2 80338b0: f7ff fcad bl 803320e 80338b4: e001 b.n 80338ba 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) && 80338b6: 4c4e ldr r4, [pc, #312] ; (80339f0 ) 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, 80338b8: 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) && 80338ba: f894 205a ldrb.w r2, [r4, #90] ; 0x5a 80338be: 4b4c ldr r3, [pc, #304] ; (80339f0 ) 80338c0: 2a01 cmp r2, #1 80338c2: d151 bne.n 8033968 (msg_ps->vb_idx < msg_ps->invb.count)) 80338c4: f894 20f8 ldrb.w r2, [r4, #248] ; 0xf8 80338c8: 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) && 80338cc: 428a cmp r2, r1 80338ce: d383 bcc.n 80337d8 80338d0: e088 b.n 80339e4 } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { msg_ps->vb_idx = 0; 80338d2: 2200 movs r2, #0 80338d4: f883 20f8 strb.w r2, [r3, #248] ; 0xf8 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 80338d8: 2206 movs r2, #6 80338da: f883 205a strb.w r2, [r3, #90] ; 0x5a 80338de: e043 b.n 8033968 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 80338e0: b913 cbnz r3, 80338e8 { msg_ps->vb_ptr = msg_ps->invb.head; 80338e2: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 80338e6: e002 b.n 80338ee } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 80338e8: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80338ec: 681b ldr r3, [r3, #0] 80338ee: 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, 80338f2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 80338f6: 483f ldr r0, [pc, #252] ; (80339f4 ) 80338f8: 7a19 ldrb r1, [r3, #8] 80338fa: 68da ldr r2, [r3, #12] 80338fc: 3904 subs r1, #4 80338fe: b2c9 uxtb r1, r1 8033900: 3210 adds r2, #16 8033902: 466b mov r3, sp 8033904: f7ff f970 bl 8032be8 msg_ps->vb_ptr->ident + 4, &np); /* check if object is still available (e.g. external hot-plug thingy present?) */ if (mn != NULL) 8033908: 4605 mov r5, r0 803390a: 2800 cmp r0, #0 803390c: d02e beq.n 803396c { if (mn->node_type == MIB_NODE_EX) 803390e: 7c03 ldrb r3, [r0, #16] 8033910: 2b05 cmp r3, #5 8033912: d110 bne.n 8033936 /* 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; 8033914: 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; 8033916: 230a movs r3, #10 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 8033918: 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; 803391c: 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; 8033920: 4b35 ldr r3, [pc, #212] ; (80339f8 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 8033922: 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; 8033926: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 803392a: 2100 movs r1, #0 803392c: 6aaf ldr r7, [r5, #40] ; 0x28 803392e: 6968 ldr r0, [r5, #20] 8033930: 9b01 ldr r3, [sp, #4] 8033932: 47b8 blx r7 8033934: e01a b.n 803396c else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF_S; 8033936: 2305 movs r3, #5 8033938: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 803393c: 6803 ldr r3, [r0, #0] 803393e: 9901 ldr r1, [sp, #4] 8033940: f89d 0000 ldrb.w r0, [sp] 8033944: aa02 add r2, sp, #8 8033946: 4798 blx r3 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 8033948: 2306 movs r3, #6 803394a: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 803394e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 8033952: 68ed ldr r5, [r5, #12] 8033954: 7c59 ldrb r1, [r3, #17] 8033956: 695a ldr r2, [r3, #20] 8033958: a802 add r0, sp, #8 803395a: 47a8 blx r5 msg_ps->vb_idx += 1; 803395c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 8033960: 3301 adds r3, #1 8033962: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 8033966: e001 b.n 803396c 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) && 8033968: 4c21 ldr r4, [pc, #132] ; (80339f0 ) 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, 803396a: 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) && 803396c: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 8033970: 4d1f ldr r5, [pc, #124] ; (80339f0 ) 8033972: 2b06 cmp r3, #6 8033974: d139 bne.n 80339ea (msg_ps->vb_idx < msg_ps->invb.count)) 8033976: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 803397a: 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) && 803397e: 4293 cmp r3, r2 8033980: d3ae bcc.n 80338e0 8033982: e031 b.n 80339e8 (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; 8033984: f505 7280 add.w r2, r5, #256 ; 0x100 8033988: ca07 ldmia r2, {r0, r1, r2} 803398a: f505 7386 add.w r3, r5, #268 ; 0x10c 803398e: e883 0007 stmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 8033992: 2300 movs r3, #0 8033994: f8c5 3100 str.w r3, [r5, #256] ; 0x100 msg_ps->invb.tail = NULL; 8033998: f8c5 3104 str.w r3, [r5, #260] ; 0x104 msg_ps->invb.count = 0; 803399c: f885 3108 strb.w r3, [r5, #264] ; 0x108 snmp_ok_response(msg_ps); 80339a0: 4628 mov r0, r5 80339a2: f7ff fc6f bl 8033284 80339a6: e020 b.n 80339ea } } if (mn == NULL) { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 80339a8: 4811 ldr r0, [pc, #68] ; (80339f0 ) 80339aa: 2102 movs r1, #2 80339ac: f7ff fc2f bl 803320e 80339b0: e556 b.n 8033460 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 80339b2: 2303 movs r3, #3 /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80339b4: 200c movs r0, #12 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 80339b6: f884 305a strb.w r3, [r4, #90] ; 0x5a /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 80339ba: f7f9 ff3b bl 802d834 if (vb != NULL) 80339be: 4605 mov r5, r0 80339c0: 2800 cmp r0, #0 80339c2: f47f ae31 bne.w 8033628 80339c6: e669 b.n 803369c { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 80339c8: d10f bne.n 80339ea 80339ca: e555 b.n 8033478 /* search failed, object id points to unknown object (nosuchname) */ mn = NULL; } if (mn != NULL) { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; 80339cc: 2304 movs r3, #4 80339ce: f884 305a strb.w r3, [r4, #90] ; 0x5a if (object_def.access & MIB_ACCESS_WRITE) 80339d2: f89d 3009 ldrb.w r3, [sp, #9] 80339d6: f003 0302 and.w r3, r3, #2 80339da: b2db uxtb r3, r3 80339dc: 2b00 cmp r3, #0 80339de: f47f af47 bne.w 8033870 80339e2: e75e b.n 80338a2 /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 80339e4: d1c0 bne.n 8033968 80339e6: e774 b.n 80338d2 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) && 80339e8: d0cc beq.n 8033984 else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) { snmp_msg_set_event(request_id, msg_ps); } } } 80339ea: b027 add sp, #156 ; 0x9c 80339ec: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 80339f0: 200110b0 .word 0x200110b0 80339f4: 08041be0 .word 0x08041be0 80339f8: 20011110 .word 0x20011110 080339fc : 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) { 80339fc: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8033a00: 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); 8033a02: 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) { 8033a06: 468a mov sl, r1 8033a08: 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); 8033a0a: 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) { 8033a0c: 4604 mov r4, r0 8033a0e: 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); 8033a10: 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); 8033a14: f7fd f928 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 8033a18: f10a 0101 add.w r1, sl, #1 8033a1c: 4620 mov r0, r4 8033a1e: b289 uxth r1, r1 8033a20: f10d 020a add.w r2, sp, #10 8033a24: 4633 mov r3, r6 8033a26: f7fd f934 bl 8030c92 if ((derr != ERR_OK) || 8033a2a: b910 cbnz r0, 8033a32 8033a2c: 783b ldrb r3, [r7, #0] 8033a2e: 2b30 cmp r3, #48 ; 0x30 8033a30: d002 beq.n 8033a38 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); 8033a32: f7fe ff21 bl 8032878 8033a36: e02b b.n 8033a90 return ERR_ARG; } ofs += (1 + len_octets); 8033a38: f89d 800a ldrb.w r8, [sp, #10] /* start with empty list */ m_stat->invb.count = 0; 8033a3c: 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); 8033a40: f108 0801 add.w r8, r8, #1 8033a44: 44d0 add r8, sl 8033a46: fa1f f888 uxth.w r8, r8 /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; 8033a4a: f8c5 0100 str.w r0, [r5, #256] ; 0x100 m_stat->invb.tail = NULL; 8033a4e: f8c5 0104 str.w r0, [r5, #260] ; 0x104 while (vb_len > 0) 8033a52: e118 b.n 8033c86 { struct snmp_obj_id oid, oid_value; struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); 8033a54: 4641 mov r1, r8 8033a56: 463a mov r2, r7 8033a58: 4620 mov r0, r4 8033a5a: f7fd f905 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033a5e: f108 0101 add.w r1, r8, #1 8033a62: 4620 mov r0, r4 8033a64: b289 uxth r1, r1 8033a66: f10d 020a add.w r2, sp, #10 8033a6a: ab03 add r3, sp, #12 8033a6c: f7fd f911 bl 8030c92 if ((derr != ERR_OK) || 8033a70: b940 cbnz r0, 8033a84 8033a72: 783b ldrb r3, [r7, #0] 8033a74: 2b30 cmp r3, #48 ; 0x30 8033a76: d105 bne.n 8033a84 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || (len == 0) || (len > vb_len)) 8033a78: 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)) || 8033a7c: b112 cbz r2, 8033a84 (len == 0) || (len > vb_len)) 8033a7e: 8833 ldrh r3, [r6, #0] 8033a80: 429a cmp r2, r3 8033a82: d907 bls.n 8033a94 { snmp_inc_snmpinasnparseerrs(); 8033a84: f7fe fef8 bl 8032878 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); 8033a88: f505 7080 add.w r0, r5, #256 ; 0x100 8033a8c: f7ff fbb1 bl 80331f2 8033a90: 20f2 movs r0, #242 ; 0xf2 8033a92: e109 b.n 8033ca8 return ERR_ARG; } ofs += (1 + len_octets); 8033a94: f89d 200a ldrb.w r2, [sp, #10] 8033a98: 4490 add r8, r2 8033a9a: fa1f f888 uxth.w r8, r8 8033a9e: f108 0a01 add.w sl, r8, #1 vb_len -= (1 + len_octets); 8033aa2: 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); 8033aa4: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets); 8033aa8: 189b adds r3, r3, r2 snmp_asn1_dec_type(p, ofs, &type); 8033aaa: 4651 mov r1, sl 8033aac: 463a mov r2, r7 8033aae: 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); 8033ab0: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8033ab2: f7fd f8d9 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033ab6: f108 0102 add.w r1, r8, #2 8033aba: 4620 mov r0, r4 8033abc: b289 uxth r1, r1 8033abe: f10d 020a add.w r2, sp, #10 8033ac2: ab03 add r3, sp, #12 8033ac4: f7fd f8e5 bl 8030c92 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID))) 8033ac8: 2800 cmp r0, #0 8033aca: d1db bne.n 8033a84 8033acc: 783b ldrb r3, [r7, #0] 8033ace: 2b06 cmp r3, #6 8033ad0: d1d8 bne.n 8033a84 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); 8033ad2: f89d 100a ldrb.w r1, [sp, #10] 8033ad6: f8bd 200c ldrh.w r2, [sp, #12] 8033ada: 3101 adds r1, #1 8033adc: 4451 add r1, sl 8033ade: 4620 mov r0, r4 8033ae0: b289 uxth r1, r1 8033ae2: ab04 add r3, sp, #16 8033ae4: f7fd fa04 bl 8030ef0 if (derr != ERR_OK) 8033ae8: 2800 cmp r0, #0 8033aea: d1cb bne.n 8033a84 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8033aec: f89d 300a ldrb.w r3, [sp, #10] 8033af0: f8bd 200c ldrh.w r2, [sp, #12] 8033af4: 1899 adds r1, r3, r2 8033af6: 448a add sl, r1 8033af8: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets + len); 8033afc: 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); 8033afe: f10a 0801 add.w r8, sl, #1 vb_len -= (1 + len_octets + len); 8033b02: 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); 8033b04: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8033b08: 43db mvns r3, r3 8033b0a: 18d3 adds r3, r2, r3 snmp_asn1_dec_type(p, ofs, &type); 8033b0c: 4641 mov r1, r8 8033b0e: 463a mov r2, r7 8033b10: 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); 8033b12: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 8033b14: f7fd f8a8 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033b18: f10a 0102 add.w r1, sl, #2 8033b1c: 4620 mov r0, r4 8033b1e: b289 uxth r1, r1 8033b20: f10d 020a add.w r2, sp, #10 8033b24: ab03 add r3, sp, #12 8033b26: f7fd f8b4 bl 8030c92 if (derr != ERR_OK) 8033b2a: 2800 cmp r0, #0 8033b2c: d1aa bne.n 8033a84 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } switch (type) 8033b2e: 7839 ldrb r1, [r7, #0] 8033b30: 2906 cmp r1, #6 8033b32: d047 beq.n 8033bc4 8033b34: d805 bhi.n 8033b42 8033b36: 2904 cmp r1, #4 8033b38: d036 beq.n 8033ba8 8033b3a: d839 bhi.n 8033bb0 8033b3c: 2902 cmp r1, #2 8033b3e: d1a1 bne.n 8033a84 8033b40: e009 b.n 8033b56 8033b42: 2943 cmp r1, #67 ; 0x43 8033b44: d804 bhi.n 8033b50 8033b46: 2941 cmp r1, #65 ; 0x41 8033b48: d219 bcs.n 8033b7e 8033b4a: 2940 cmp r1, #64 ; 0x40 8033b4c: d19a bne.n 8033a84 8033b4e: e069 b.n 8033c24 8033b50: 2944 cmp r1, #68 ; 0x44 8033b52: d197 bne.n 8033a84 8033b54: e028 b.n 8033ba8 { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): vb = snmp_varbind_alloc(&oid, type, sizeof(s32_t)); 8033b56: a804 add r0, sp, #16 8033b58: 2204 movs r2, #4 8033b5a: f7ff faf7 bl 803314c if (vb != NULL) 8033b5e: 4683 mov fp, r0 8033b60: 2800 cmp r0, #0 8033b62: d08f beq.n 8033a84 { s32_t *vptr = (s32_t*)vb->value; derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, vptr); 8033b64: f89d 100a ldrb.w r1, [sp, #10] 8033b68: f8bd 200c ldrh.w r2, [sp, #12] 8033b6c: f8db 3014 ldr.w r3, [fp, #20] 8033b70: 3101 adds r1, #1 8033b72: 4441 add r1, r8 8033b74: 4620 mov r0, r4 8033b76: b289 uxth r1, r1 8033b78: f7fd f961 bl 8030e3e 8033b7c: e06b b.n 8033c56 } 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)); 8033b7e: a804 add r0, sp, #16 8033b80: 2204 movs r2, #4 8033b82: f7ff fae3 bl 803314c if (vb != NULL) 8033b86: 4683 mov fp, r0 8033b88: 2800 cmp r0, #0 8033b8a: f43f af7b beq.w 8033a84 { u32_t *vptr = (u32_t*)vb->value; derr = snmp_asn1_dec_u32t(p, ofs + 1 + len_octets, len, vptr); 8033b8e: f89d 100a ldrb.w r1, [sp, #10] 8033b92: f8bd 200c ldrh.w r2, [sp, #12] 8033b96: f8db 3014 ldr.w r3, [fp, #20] 8033b9a: 3101 adds r1, #1 8033b9c: 4441 add r1, r8 8033b9e: 4620 mov r0, r4 8033ba0: b289 uxth r1, r1 8033ba2: f7fd f8f8 bl 8030d96 8033ba6: e056 b.n 8033c56 } 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); 8033ba8: a804 add r0, sp, #16 8033baa: f89d 200c ldrb.w r2, [sp, #12] 8033bae: e03f b.n 8033c30 { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): vb = snmp_varbind_alloc(&oid, type, 0); 8033bb0: 2105 movs r1, #5 8033bb2: a804 add r0, sp, #16 8033bb4: 2200 movs r2, #0 8033bb6: f7ff fac9 bl 803314c if (vb != NULL) 8033bba: 4601 mov r1, r0 8033bbc: 2800 cmp r0, #0 8033bbe: f43f af61 beq.w 8033a84 8033bc2: e02a b.n 8033c1a { 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); 8033bc4: f89d 100a ldrb.w r1, [sp, #10] 8033bc8: f8bd 200c ldrh.w r2, [sp, #12] 8033bcc: 3101 adds r1, #1 8033bce: 4441 add r1, r8 8033bd0: 4620 mov r0, r4 8033bd2: b289 uxth r1, r1 8033bd4: ab25 add r3, sp, #148 ; 0x94 8033bd6: f7fd f98b bl 8030ef0 if (derr == ERR_OK) 8033bda: 2800 cmp r0, #0 8033bdc: f47f af52 bne.w 8033a84 { vb = snmp_varbind_alloc(&oid, type, oid_value.len * sizeof(s32_t)); 8033be0: f89d 2094 ldrb.w r2, [sp, #148] ; 0x94 8033be4: 7839 ldrb r1, [r7, #0] 8033be6: 0092 lsls r2, r2, #2 8033be8: a804 add r0, sp, #16 8033bea: f002 02fc and.w r2, r2, #252 ; 0xfc 8033bee: f7ff faad bl 803314c if (vb != NULL) 8033bf2: 4601 mov r1, r0 8033bf4: 2800 cmp r0, #0 8033bf6: f43f af45 beq.w 8033a84 { u8_t i = oid_value.len; 8033bfa: f89d 3094 ldrb.w r3, [sp, #148] ; 0x94 s32_t *vptr = (s32_t*)vb->value; 8033bfe: 6940 ldr r0, [r0, #20] while(i > 0) 8033c00: e009 b.n 8033c16 { i--; 8033c02: 3b01 subs r3, #1 8033c04: b2db uxtb r3, r3 vptr[i] = oid_value.id[i]; 8033c06: f50d 7e8c add.w lr, sp, #280 ; 0x118 8033c0a: eb0e 0283 add.w r2, lr, r3, lsl #2 8033c0e: f852 2c80 ldr.w r2, [r2, #-128] 8033c12: 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) 8033c16: 2b00 cmp r3, #0 8033c18: d1f3 bne.n 8033c02 { i--; vptr[i] = oid_value.id[i]; } snmp_varbind_tail_add(&m_stat->invb, vb); 8033c1a: f505 7080 add.w r0, r5, #256 ; 0x100 8033c1e: f7ff fb41 bl 80332a4 8033c22: e022 b.n 8033c6a derr = ERR_ARG; } } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): if (len == 4) 8033c24: f8bd 200c ldrh.w r2, [sp, #12] 8033c28: 2a04 cmp r2, #4 8033c2a: f47f af2b bne.w 8033a84 { /* must be exactly 4 octets! */ vb = snmp_varbind_alloc(&oid, type, 4); 8033c2e: a804 add r0, sp, #16 8033c30: f7ff fa8c bl 803314c if (vb != NULL) 8033c34: 4683 mov fp, r0 8033c36: 2800 cmp r0, #0 8033c38: f43f af24 beq.w 8033a84 { derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, vb->value_len, (u8_t*)vb->value); 8033c3c: f89d 100a ldrb.w r1, [sp, #10] 8033c40: 7c43 ldrb r3, [r0, #17] 8033c42: 6940 ldr r0, [r0, #20] 8033c44: f8bd 200c ldrh.w r2, [sp, #12] 8033c48: 9000 str r0, [sp, #0] 8033c4a: 3101 adds r1, #1 8033c4c: 4441 add r1, r8 8033c4e: 4620 mov r0, r4 8033c50: b289 uxth r1, r1 8033c52: f7fd f9e9 bl 8031028 8033c56: 4682 mov sl, r0 snmp_varbind_tail_add(&m_stat->invb, vb); 8033c58: 4659 mov r1, fp 8033c5a: f505 7080 add.w r0, r5, #256 ; 0x100 8033c5e: f7ff fb21 bl 80332a4 break; default: derr = ERR_ARG; break; } if (derr != ERR_OK) 8033c62: f1ba 0f00 cmp.w sl, #0 8033c66: f47f af0d bne.w 8033a84 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 8033c6a: f8bd 200c ldrh.w r2, [sp, #12] 8033c6e: f89d 300a ldrb.w r3, [sp, #10] 8033c72: 1c51 adds r1, r2, #1 8033c74: 1859 adds r1, r3, r1 8033c76: 4488 add r8, r1 vb_len -= (1 + len_octets + len); 8033c78: 8831 ldrh r1, [r6, #0] 8033c7a: 43db mvns r3, r3 8033c7c: 1a8a subs r2, r1, r2 8033c7e: 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); 8033c80: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 8033c84: 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) 8033c86: 8833 ldrh r3, [r6, #0] 8033c88: 2b00 cmp r3, #0 8033c8a: f47f aee3 bne.w 8033a54 } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); } if (m_stat->rt == SNMP_ASN1_PDU_SET_REQ) 8033c8e: 7aab ldrb r3, [r5, #10] 8033c90: f895 0108 ldrb.w r0, [r5, #264] ; 0x108 8033c94: 2b03 cmp r3, #3 8033c96: d102 bne.n 8033c9e { snmp_add_snmpintotalsetvars(m_stat->invb.count); 8033c98: f7fe fe26 bl 80328e8 8033c9c: e001 b.n 8033ca2 } else { snmp_add_snmpintotalreqvars(m_stat->invb.count); 8033c9e: f7fe fe1b bl 80328d8 } *ofs_ret = ofs; 8033ca2: f8a9 8000 strh.w r8, [r9] return ERR_OK; 8033ca6: 2000 movs r0, #0 } 8033ca8: b240 sxtb r0, r0 8033caa: b047 add sp, #284 ; 0x11c 8033cac: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08033cb0 : /* 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) { 8033cb0: 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)) 8033cb4: 4da3 ldr r5, [pc, #652] ; (8033f44 ) snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; 8033cb6: 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)) 8033cb8: 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) { 8033cbc: b087 sub sp, #28 8033cbe: 4699 mov r9, r3 volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 8033cc0: 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) { 8033cc2: 4688 mov r8, r1 8033cc4: 4614 mov r4, r2 volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 8033cc6: 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)) 8033cca: 2e00 cmp r6, #0 8033ccc: f000 81aa beq.w 8034024 msg_ps++; } if (req_idx == SNMP_CONCURRENT_REQUESTS) { /* exceeding number of concurrent requests */ pbuf_free(p); 8033cd0: 4620 mov r0, r4 8033cd2: f7f9 fecf bl 802da74 8033cd6: e1d6 b.n 8034086 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)) || 8033cd8: f89d 600e ldrb.w r6, [sp, #14] 8033cdc: f8bd 3012 ldrh.w r3, [sp, #18] 8033ce0: 1c75 adds r5, r6, #1 8033ce2: 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) || 8033ce4: 429f cmp r7, r3 8033ce6: f040 80c4 bne.w 8033e72 (pdu_len != (1 + len_octets + len)) || 8033cea: f89d 300f ldrb.w r3, [sp, #15] 8033cee: 2b30 cmp r3, #48 ; 0x30 8033cf0: d000 beq.n 8033cf4 8033cf2: e0be b.n 8033e72 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 8033cf4: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 8033cf6: 4629 mov r1, r5 8033cf8: f10d 020f add.w r2, sp, #15 8033cfc: 4620 mov r0, r4 8033cfe: f7fc ffb3 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033d02: 4620 mov r0, r4 8033d04: 1cb1 adds r1, r6, #2 8033d06: f10d 020e add.w r2, sp, #14 8033d0a: f10d 0312 add.w r3, sp, #18 8033d0e: f7fc ffc0 bl 8030c92 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8033d12: 2800 cmp r0, #0 8033d14: f040 80ad bne.w 8033e72 8033d18: f89d 300f ldrb.w r3, [sp, #15] 8033d1c: 2b02 cmp r3, #2 8033d1e: f040 80a8 bne.w 8033e72 { /* 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); 8033d22: f89d 100e ldrb.w r1, [sp, #14] 8033d26: f8bd 2012 ldrh.w r2, [sp, #18] 8033d2a: 3101 adds r1, #1 8033d2c: 4620 mov r0, r4 8033d2e: 1869 adds r1, r5, r1 8033d30: ab05 add r3, sp, #20 8033d32: f7fd f884 bl 8030e3e if (derr != ERR_OK) 8033d36: 2800 cmp r0, #0 8033d38: f040 809b bne.w 8033e72 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } if (version != 0) 8033d3c: 9b05 ldr r3, [sp, #20] 8033d3e: b113 cbz r3, 8033d46 { /* not version 1 */ snmp_inc_snmpinbadversions(); 8033d40: f7fe fd8a bl 8032858 8033d44: e7c4 b.n 8033cd0 return ERR_ARG; } ofs += (1 + len_octets + len); 8033d46: f89d 200e ldrb.w r2, [sp, #14] 8033d4a: f8bd 3012 ldrh.w r3, [sp, #18] 8033d4e: 18d3 adds r3, r2, r3 8033d50: 18ed adds r5, r5, r3 8033d52: b2ad uxth r5, r5 8033d54: 1c6e adds r6, r5, #1 8033d56: b2b6 uxth r6, r6 snmp_asn1_dec_type(p, ofs, &type); 8033d58: 4631 mov r1, r6 8033d5a: f10d 020f add.w r2, sp, #15 8033d5e: 4620 mov r0, r4 8033d60: f7fc ff82 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033d64: 1ca9 adds r1, r5, #2 8033d66: 4620 mov r0, r4 8033d68: b289 uxth r1, r1 8033d6a: f10d 020e add.w r2, sp, #14 8033d6e: f10d 0312 add.w r3, sp, #18 8033d72: f7fc ff8e bl 8030c92 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR))) 8033d76: 2800 cmp r0, #0 8033d78: d17b bne.n 8033e72 8033d7a: f89d 300f ldrb.w r3, [sp, #15] 8033d7e: 2b04 cmp r3, #4 8033d80: d177 bne.n 8033e72 { /* 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); 8033d82: f89d 100e ldrb.w r1, [sp, #14] 8033d86: 4d70 ldr r5, [pc, #448] ; (8033f48 ) 8033d88: f8bd 2012 ldrh.w r2, [sp, #18] 8033d8c: 9500 str r5, [sp, #0] 8033d8e: 3101 adds r1, #1 8033d90: 1871 adds r1, r6, r1 8033d92: 4620 mov r0, r4 8033d94: b289 uxth r1, r1 8033d96: 2340 movs r3, #64 ; 0x40 8033d98: f7fd f946 bl 8031028 if (derr != ERR_OK) 8033d9c: 2800 cmp r0, #0 8033d9e: d168 bne.n 8033e72 { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 8033da0: f8bd 3012 ldrh.w r3, [sp, #18] m_stat->community[len] = 0; 8033da4: 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)); 8033da8: 2b40 cmp r3, #64 ; 0x40 8033daa: bf28 it cs 8033dac: 2340 movcs r3, #64 ; 0x40 m_stat->community[len] = 0; 8033dae: 18d1 adds r1, r2, r3 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 8033db0: 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)); 8033db4: f8ad 3012 strh.w r3, [sp, #18] m_stat->community[len] = 0; m_stat->com_strlen = (u8_t)len; 8033db8: f885 3041 strb.w r3, [r5, #65] ; 0x41 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 8033dbc: 189b adds r3, r3, r2 8033dbe: 18f6 adds r6, r6, r3 8033dc0: b2b6 uxth r6, r6 8033dc2: f106 0801 add.w r8, r6, #1 8033dc6: 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; 8033dca: 7608 strb r0, [r1, #24] snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); snmp_asn1_dec_type(p, ofs, &type); 8033dcc: f10d 020f add.w r2, sp, #15 8033dd0: 4641 mov r1, r8 8033dd2: 4620 mov r0, r4 8033dd4: f7fc ff48 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033dd8: 1cb1 adds r1, r6, #2 8033dda: 4620 mov r0, r4 8033ddc: b289 uxth r1, r1 8033dde: f10d 020e add.w r2, sp, #14 8033de2: f10d 0312 add.w r3, sp, #18 8033de6: f7fc ff54 bl 8030c92 if (derr != ERR_OK) 8033dea: 2800 cmp r0, #0 8033dec: d141 bne.n 8033e72 return ERR_ARG; } /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) 8033dee: f89d 300f ldrb.w r3, [sp, #15] 8033df2: 2ba0 cmp r3, #160 ; 0xa0 8033df4: d10f bne.n 8033e16 { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 8033df6: 4855 ldr r0, [pc, #340] ; (8033f4c ) 8033df8: f7ee f83a bl 8021e70 8033dfc: 4629 mov r1, r5 8033dfe: 4602 mov r2, r0 8033e00: 4852 ldr r0, [pc, #328] ; (8033f4c ) 8033e02: f7ee f897 bl 8021f34 8033e06: b120 cbz r0, 8033e12 || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) { snmp_inc_snmpinbadcommunitynames(); 8033e08: f7fe fd2e bl 8032868 snmp_authfail_trap(); 8033e0c: f000 fd84 bl 8034918 8033e10: e75e b.n 8033cd0 /* 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)) ) 8033e12: 484e ldr r0, [pc, #312] ; (8033f4c ) 8033e14: e00c b.n 8033e30 snmp_authfail_trap(); return ERR_ARG; } } /* SetRequest PDU */ else if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ)) 8033e16: 2ba3 cmp r3, #163 ; 0xa3 8033e18: d112 bne.n 8033e40 { if (strncmp(sSettings.sSnmp.writeCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.writeCommunity)) != 0 8033e1a: 484d ldr r0, [pc, #308] ; (8033f50 ) 8033e1c: f7ee f828 bl 8021e70 8033e20: 4629 mov r1, r5 8033e22: 4602 mov r2, r0 8033e24: 484a ldr r0, [pc, #296] ; (8033f50 ) 8033e26: f7ee f885 bl 8021f34 8033e2a: 2800 cmp r0, #0 8033e2c: d1ec bne.n 8033e08 || (strlen(sSettings.sSnmp.writeCommunity) != strlen((const char*)m_stat->community)) ) 8033e2e: 4848 ldr r0, [pc, #288] ; (8033f50 ) 8033e30: f7ee f81e bl 8021e70 8033e34: 4606 mov r6, r0 8033e36: 4628 mov r0, r5 8033e38: f7ee f81a bl 8021e70 8033e3c: 4286 cmp r6, r0 8033e3e: d1e3 bne.n 8033e08 snmp_authfail_trap(); return ERR_ARG; } } switch(type) 8033e40: f89d 300f ldrb.w r3, [sp, #15] 8033e44: 3ba0 subs r3, #160 ; 0xa0 8033e46: 2b04 cmp r3, #4 8033e48: d813 bhi.n 8033e72 8033e4a: e8df f003 tbb [pc, r3] 8033e4e: 0603 .short 0x0603 8033e50: 0c09 .short 0x0c09 8033e52: 0f .byte 0x0f 8033e53: 00 .byte 0x00 { case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ): // GetRequest PDU snmp_inc_snmpingetrequests(); 8033e54: f7fe fd50 bl 80328f8 8033e58: e100 b.n 803405c derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_NEXT_REQ): // GetNextRequest PDU snmp_inc_snmpingetnexts(); 8033e5a: f7fe fd55 bl 8032908 8033e5e: e0fd b.n 803405c derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP): // GetResponse PDU snmp_inc_snmpingetresponses(); 8033e60: f7fe fd62 bl 8032928 8033e64: e734 b.n 8033cd0 derr = ERR_ARG; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ): // SetRequest PDU snmp_inc_snmpinsetrequests(); 8033e66: f7fe fd57 bl 8032918 8033e6a: e0f7 b.n 803405c derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP): // Trap PDU snmp_inc_snmpintraps(); 8033e6c: f7fe fd64 bl 8032938 8033e70: e72e b.n 8033cd0 derr = ERR_ARG; break; default: snmp_inc_snmpinasnparseerrs(); 8033e72: f7fe fd01 bl 8032878 8033e76: e72b b.n 8033cd0 { /* decoded PDU length does not equal actual payload length */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } snmp_asn1_dec_type(p, ofs, &type); 8033e78: 4631 mov r1, r6 8033e7a: f10d 020f add.w r2, sp, #15 8033e7e: 4620 mov r0, r4 8033e80: f7fc fef2 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033e84: f108 0102 add.w r1, r8, #2 8033e88: 4620 mov r0, r4 8033e8a: b289 uxth r1, r1 8033e8c: f10d 020e add.w r2, sp, #14 8033e90: f10d 0312 add.w r3, sp, #18 8033e94: f7fc fefd bl 8030c92 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8033e98: 2800 cmp r0, #0 8033e9a: d1ea bne.n 8033e72 8033e9c: f89d 300f ldrb.w r3, [sp, #15] 8033ea0: 2b02 cmp r3, #2 8033ea2: d1e6 bne.n 8033e72 { /* 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); 8033ea4: f89d 100e ldrb.w r1, [sp, #14] 8033ea8: f8bd 2012 ldrh.w r2, [sp, #18] 8033eac: 3101 adds r1, #1 8033eae: 1871 adds r1, r6, r1 8033eb0: 4620 mov r0, r4 8033eb2: b289 uxth r1, r1 8033eb4: f105 030c add.w r3, r5, #12 8033eb8: f7fc ffc1 bl 8030e3e if (derr != ERR_OK) 8033ebc: 2800 cmp r0, #0 8033ebe: d1d8 bne.n 8033e72 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 8033ec0: f89d 200e ldrb.w r2, [sp, #14] 8033ec4: f8bd 3012 ldrh.w r3, [sp, #18] 8033ec8: 18d3 adds r3, r2, r3 8033eca: 18f6 adds r6, r6, r3 8033ecc: b2b6 uxth r6, r6 8033ece: 1c77 adds r7, r6, #1 8033ed0: b2bf uxth r7, r7 snmp_asn1_dec_type(p, ofs, &type); 8033ed2: 4639 mov r1, r7 8033ed4: f10d 020f add.w r2, sp, #15 8033ed8: 4620 mov r0, r4 8033eda: f7fc fec5 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033ede: 1cb1 adds r1, r6, #2 8033ee0: 4620 mov r0, r4 8033ee2: b289 uxth r1, r1 8033ee4: f10d 020e add.w r2, sp, #14 8033ee8: f10d 0312 add.w r3, sp, #18 8033eec: f7fc fed1 bl 8030c92 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8033ef0: 2800 cmp r0, #0 8033ef2: d1be bne.n 8033e72 8033ef4: f89d 300f ldrb.w r3, [sp, #15] 8033ef8: 2b02 cmp r3, #2 8033efa: d1ba bne.n 8033e72 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); 8033efc: f89d 100e ldrb.w r1, [sp, #14] 8033f00: f8bd 2012 ldrh.w r2, [sp, #18] 8033f04: 3101 adds r1, #1 8033f06: 1879 adds r1, r7, r1 8033f08: 4620 mov r0, r4 8033f0a: b289 uxth r1, r1 8033f0c: f105 0310 add.w r3, r5, #16 8033f10: f7fc ff95 bl 8030e3e if (derr != ERR_OK) 8033f14: 2800 cmp r0, #0 8033f16: d1ac bne.n 8033e72 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } switch (m_stat->error_status) 8033f18: 692b ldr r3, [r5, #16] 8033f1a: 3b01 subs r3, #1 8033f1c: 2b04 cmp r3, #4 8033f1e: d81b bhi.n 8033f58 8033f20: e8df f003 tbb [pc, r3] 8033f24: 0c090603 .word 0x0c090603 8033f28: 18 .byte 0x18 8033f29: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpintoobigs(); 8033f2a: f7fe fcad bl 8032888 8033f2e: e013 b.n 8033f58 break; case SNMP_ES_NOSUCHNAME: snmp_inc_snmpinnosuchnames(); 8033f30: f7fe fcb2 bl 8032898 8033f34: e010 b.n 8033f58 break; case SNMP_ES_BADVALUE: snmp_inc_snmpinbadvalues(); 8033f36: f7fe fcb7 bl 80328a8 8033f3a: e00d b.n 8033f58 break; case SNMP_ES_READONLY: snmp_inc_snmpinreadonlys(); 8033f3c: f7fe fcbc bl 80328b8 8033f40: e00a b.n 8033f58 8033f42: bf00 nop 8033f44: 200110b0 .word 0x200110b0 8033f48: 200110c8 .word 0x200110c8 8033f4c: 2000ea88 .word 0x2000ea88 8033f50: 2000ea9c .word 0x2000ea9c break; case SNMP_ES_GENERROR: snmp_inc_snmpingenerrs(); 8033f54: f7fe fcb8 bl 80328c8 break; } ofs += (1 + len_octets + len); 8033f58: f89d 200e ldrb.w r2, [sp, #14] 8033f5c: f8bd 3012 ldrh.w r3, [sp, #18] 8033f60: 18d3 adds r3, r2, r3 8033f62: 18ff adds r7, r7, r3 8033f64: b2bf uxth r7, r7 8033f66: 1c7d adds r5, r7, #1 8033f68: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 8033f6a: 4629 mov r1, r5 8033f6c: f10d 020f add.w r2, sp, #15 8033f70: 4620 mov r0, r4 8033f72: f7fc fe79 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8033f76: 1cb9 adds r1, r7, #2 8033f78: 4620 mov r0, r4 8033f7a: b289 uxth r1, r1 8033f7c: f10d 020e add.w r2, sp, #14 8033f80: f10d 0312 add.w r3, sp, #18 8033f84: f7fc fe85 bl 8030c92 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 8033f88: 2800 cmp r0, #0 8033f8a: f47f af72 bne.w 8033e72 8033f8e: f89d 300f ldrb.w r3, [sp, #15] 8033f92: 2b02 cmp r3, #2 8033f94: f47f af6d bne.w 8033e72 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); 8033f98: f89d 100e ldrb.w r1, [sp, #14] 8033f9c: f8bd 2012 ldrh.w r2, [sp, #18] 8033fa0: 4b3a ldr r3, [pc, #232] ; (803408c ) 8033fa2: 3101 adds r1, #1 8033fa4: 1869 adds r1, r5, r1 8033fa6: 4620 mov r0, r4 8033fa8: b289 uxth r1, r1 8033faa: f7fc ff48 bl 8030e3e if (derr != ERR_OK) 8033fae: 2800 cmp r0, #0 8033fb0: f47f af5f bne.w 8033e72 { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 8033fb4: f8bd 3012 ldrh.w r3, [sp, #18] 8033fb8: f89d 200e ldrb.w r2, [sp, #14] 8033fbc: 3301 adds r3, #1 8033fbe: 189b adds r3, r3, r2 8033fc0: 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) && 8033fc2: 4b33 ldr r3, [pc, #204] ; (8034090 ) /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); *ofs_ret = ofs; 8033fc4: f8ad 5010 strh.w r5, [sp, #16] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 8033fc8: 7a9a ldrb r2, [r3, #10] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || 8033fca: b132 cbz r2, 8033fda ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 8033fcc: 7a9a ldrb r2, [r3, #10] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 8033fce: 2a01 cmp r2, #1 8033fd0: d003 beq.n 8033fda (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 8033fd2: 7a9a ldrb r2, [r3, #10] err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 8033fd4: 2a03 cmp r2, #3 8033fd6: f47f ae7b bne.w 8033cd0 (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 8033fda: 691b ldr r3, [r3, #16] 8033fdc: 4d2c ldr r5, [pc, #176] ; (8034090 ) /* 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)) || 8033fde: 2b00 cmp r3, #0 8033fe0: f47f ae76 bne.w 8033cd0 ((msg_ps->error_status != SNMP_ES_NOERROR) || (msg_ps->error_index != 0)) ) 8033fe4: 696b ldr r3, [r5, #20] /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 8033fe6: 2b00 cmp r3, #0 8033fe8: f47f ae72 bne.w 8033cd0 } 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); 8033fec: aa06 add r2, sp, #24 8033fee: 4620 mov r0, r4 8033ff0: f832 1d08 ldrh.w r1, [r2, #-8]! 8033ff4: 462b mov r3, r5 8033ff6: f7ff fd01 bl 80339fc 8033ffa: 4606 mov r6, r0 /* we've decoded the incoming message, release input msg now */ pbuf_free(p); 8033ffc: 4620 mov r0, r4 8033ffe: f7f9 fd39 bl 802da74 if ((err_ret != ERR_OK) || (msg_ps->invb.count == 0)) 8034002: 2e00 cmp r6, #0 8034004: d13f bne.n 8034086 8034006: f895 3108 ldrb.w r3, [r5, #264] ; 0x108 803400a: 2b00 cmp r3, #0 803400c: d03b beq.n 8034086 } 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; 803400e: 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; 8034010: 612e str r6, [r5, #16] msg_ps->vb_idx = 0; LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv varbind cnt=%"U16_F"\n",(u16_t)msg_ps->invb.count)); /* handle input event and as much objects as possible in one go */ snmp_msg_event(req_idx); 8034012: 4630 mov r0, r6 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_pdu_dec_varbindlist() failed\n")); return; } msg_ps->error_status = SNMP_ES_NOERROR; msg_ps->error_index = 0; 8034014: 616e str r6, [r5, #20] /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 8034016: f885 305a strb.w r3, [r5, #90] ; 0x5a /* first variable binding from list to inspect */ msg_ps->vb_idx = 0; 803401a: 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); 803401e: f7ff f94d bl 80332bc 8034022: e030 b.n 8034086 pbuf_free(p); return; } /* accepting request */ snmp_inc_snmpinpkts(); 8034024: f7fe fc08 bl 8032838 /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; 8034028: f8d9 3000 ldr.w r3, [r9] } /* accepting request */ snmp_inc_snmpinpkts(); /* record used 'protocol control block' */ msg_ps->pcb = pcb; 803402c: f8c5 8000 str.w r8, [r5] /* source address (network order) */ msg_ps->sip = *addr; 8034030: 606b str r3, [r5, #4] /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 8034032: 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); 8034036: 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; 8034038: 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); 803403a: f10d 020f add.w r2, sp, #15 803403e: 4620 mov r0, r4 8034040: f7fc fe12 bl 8030c68 derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 8034044: 4620 mov r0, r4 8034046: 2101 movs r1, #1 8034048: f10d 020e add.w r2, sp, #14 803404c: f10d 0312 add.w r3, sp, #18 8034050: f7fc fe1f bl 8030c92 if ((derr != ERR_OK) || 8034054: 2800 cmp r0, #0 8034056: f43f ae3f beq.w 8033cd8 803405a: e70a b.n 8033e72 if (derr != ERR_OK) { /* unsupported input PDU for this agent (no parse error) */ return ERR_ARG; } m_stat->rt = type & 0x1F; 803405c: f89d 300f ldrb.w r3, [sp, #15] 8034060: 4d0b ldr r5, [pc, #44] ; (8034090 ) 8034062: f003 031f and.w r3, r3, #31 8034066: 72ab strb r3, [r5, #10] ofs += (1 + len_octets); 8034068: f89d 300e ldrb.w r3, [sp, #14] 803406c: 4498 add r8, r3 803406e: fa1f f888 uxth.w r8, r8 8034072: f108 0601 add.w r6, r8, #1 8034076: b2b6 uxth r6, r6 if (len != (pdu_len - (ofs - ofs_base))) 8034078: f8bd 3012 ldrh.w r3, [sp, #18] 803407c: 1bbf subs r7, r7, r6 803407e: 42bb cmp r3, r7 8034080: f43f aefa beq.w 8033e78 8034084: e6f5 b.n 8033e72 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); } 8034086: b007 add sp, #28 8034088: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 803408c: 200110c4 .word 0x200110c4 8034090: 200110b0 .word 0x200110b0 08034094 : * @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) { 8034094: 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; 8034096: 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) { 8034098: 4606 mov r6, r0 u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; 803409a: 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; 803409c: 462f mov r7, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 803409e: e051 b.n 8034144 { /* encoded value lenght depends on type */ switch (vb->value_type) 80340a0: 7c23 ldrb r3, [r4, #16] 80340a2: 2b06 cmp r3, #6 80340a4: d020 beq.n 80340e8 80340a6: d805 bhi.n 80340b4 80340a8: 2b02 cmp r3, #2 80340aa: d00c beq.n 80340c6 80340ac: d324 bcc.n 80340f8 80340ae: 2b04 cmp r3, #4 80340b0: d322 bcc.n 80340f8 80340b2: e016 b.n 80340e2 80340b4: 2b43 cmp r3, #67 ; 0x43 80340b6: d803 bhi.n 80340c0 80340b8: 2b41 cmp r3, #65 ; 0x41 80340ba: d20b bcs.n 80340d4 80340bc: 2b40 cmp r3, #64 ; 0x40 80340be: e000 b.n 80340c2 80340c0: 2b44 cmp r3, #68 ; 0x44 80340c2: d119 bne.n 80340f8 80340c4: e00d b.n 80340e2 { 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); 80340c6: 6963 ldr r3, [r4, #20] 80340c8: f104 0120 add.w r1, r4, #32 80340cc: 6818 ldr r0, [r3, #0] 80340ce: f7fd f802 bl 80310d6 break; 80340d2: e012 b.n 80340fa 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); 80340d4: 6963 ldr r3, [r4, #20] 80340d6: f104 0120 add.w r1, r4, #32 80340da: 6818 ldr r0, [r3, #0] 80340dc: f7fc ffe6 bl 80310ac break; 80340e0: e00b b.n 80340fa 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; 80340e2: 7c63 ldrb r3, [r4, #17] 80340e4: 8423 strh r3, [r4, #32] break; 80340e6: e008 b.n 80340fa 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); 80340e8: 7c60 ldrb r0, [r4, #17] 80340ea: 6961 ldr r1, [r4, #20] 80340ec: 0880 lsrs r0, r0, #2 80340ee: f104 0220 add.w r2, r4, #32 80340f2: f7fd f805 bl 8031100 break; 80340f6: e000 b.n 80340fa default: /* unsupported type */ vb->vlen = 0; 80340f8: 8427 strh r7, [r4, #32] break; }; /* encoding length of value length field */ snmp_asn1_enc_length_cnt(vb->vlen, &vb->vlenlen); 80340fa: 8c20 ldrh r0, [r4, #32] 80340fc: f104 011a add.w r1, r4, #26 8034100: f7fc ffc9 bl 8031096 snmp_asn1_enc_oid_cnt(vb->ident_len, vb->ident, &vb->olen); 8034104: f104 021e add.w r2, r4, #30 8034108: 7a20 ldrb r0, [r4, #8] 803410a: 68e1 ldr r1, [r4, #12] 803410c: f7fc fff8 bl 8031100 snmp_asn1_enc_length_cnt(vb->olen, &vb->olenlen); 8034110: 8be0 ldrh r0, [r4, #30] 8034112: f104 0119 add.w r1, r4, #25 8034116: f7fc ffbe bl 8031096 vb->seqlen = 1 + vb->vlenlen + vb->vlen; 803411a: 8be3 ldrh r3, [r4, #30] 803411c: 8c20 ldrh r0, [r4, #32] 803411e: 18c0 adds r0, r0, r3 8034120: 7ea3 ldrb r3, [r4, #26] vb->seqlen += 1 + vb->olenlen + vb->olen; 8034122: 3002 adds r0, #2 8034124: 18c0 adds r0, r0, r3 8034126: 7e63 ldrb r3, [r4, #25] 8034128: 18c0 adds r0, r0, r3 803412a: b280 uxth r0, r0 803412c: 83a0 strh r0, [r4, #28] snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); 803412e: f104 0118 add.w r1, r4, #24 8034132: f7fc ffb0 bl 8031096 /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 8034136: 8ba3 ldrh r3, [r4, #28] 8034138: 7e22 ldrb r2, [r4, #24] vb = vb->prev; 803413a: 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; 803413c: 3301 adds r3, #1 803413e: 189b adds r3, r3, r2 8034140: 18ed adds r5, r5, r3 8034142: b2ad uxth r5, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 8034144: 2c00 cmp r4, #0 8034146: d1ab bne.n 80340a0 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 8034148: 4628 mov r0, r5 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; 803414a: 8175 strh r5, [r6, #10] snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 803414c: f106 0109 add.w r1, r6, #9 8034150: f7fc ffa1 bl 8031096 tot_len += 1 + root->seqlenlen; 8034154: 7a73 ldrb r3, [r6, #9] 8034156: 3301 adds r3, #1 8034158: 18e8 adds r0, r5, r3 return tot_len; } 803415a: b280 uxth r0, r0 803415c: bdf8 pop {r3, r4, r5, r6, r7, pc} 803415e: 0000 movs r0, r0 08034160 : * @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) { 8034160: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8034164: 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); 8034166: 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) { 803416a: 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); 803416c: 6940 ldr r0, [r0, #20] 803416e: f504 7190 add.w r1, r4, #288 ; 0x120 8034172: f7fc ffb0 bl 80310d6 snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); 8034176: f8b4 0120 ldrh.w r0, [r4, #288] ; 0x120 803417a: 4629 mov r1, r5 803417c: f7fc ff8b bl 8031096 tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 8034180: 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; 8034182: f894 8118 ldrb.w r8, [r4, #280] ; 0x118 8034186: f8b4 a120 ldrh.w sl, [r4, #288] ; 0x120 snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 803418a: f504 7191 add.w r1, r4, #290 ; 0x122 803418e: f7fc ffa2 bl 80310d6 snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); 8034192: 1c69 adds r1, r5, #1 8034194: f8b4 0122 ldrh.w r0, [r4, #290] ; 0x122 8034198: f7fc ff7d bl 8031096 tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 803419c: f8b4 9122 ldrh.w r9, [r4, #290] ; 0x122 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 80341a0: 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; 80341a2: f894 6119 ldrb.w r6, [r4, #281] ; 0x119 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 80341a6: f504 7192 add.w r1, r4, #292 ; 0x124 80341aa: f7fc ff94 bl 80310d6 snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); 80341ae: f8b4 0124 ldrh.w r0, [r4, #292] ; 0x124 80341b2: f504 718d add.w r1, r4, #282 ; 0x11a 80341b6: f7fc ff6e bl 8031096 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; 80341ba: 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; 80341bc: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 80341c0: f109 0903 add.w r9, r9, #3 80341c4: 4499 add r9, r3 80341c6: 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; 80341ca: f894 311a ldrb.w r3, [r4, #282] ; 0x11a 80341ce: 4446 add r6, r8 80341d0: 18f6 adds r6, r6, r3 80341d2: fa17 f686 uxtah r6, r7, r6 80341d6: b2b6 uxth r6, r6 rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80341d8: 1ce9 adds r1, r5, #3 80341da: 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; 80341dc: f8a4 6126 strh.w r6, [r4, #294] ; 0x126 snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 80341e0: f7fc ff59 bl 8031096 tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; 80341e4: 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; 80341e8: f894 811b ldrb.w r8, [r4, #283] ; 0x11b rhl->comlen = m_stat->com_strlen; 80341ec: f8a4 0128 strh.w r0, [r4, #296] ; 0x128 snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); 80341f0: f504 718e add.w r1, r4, #284 ; 0x11c 80341f4: f7fc ff4f bl 8031096 tot_len += 1 + rhl->comlenlen + rhl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80341f8: 4b14 ldr r3, [pc, #80] ; (803424c ) 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; 80341fa: f894 711c ldrb.w r7, [r4, #284] ; 0x11c snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 80341fe: 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; 8034200: f8b4 9128 ldrh.w r9, [r4, #296] ; 0x128 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 8034204: f504 7195 add.w r1, r4, #298 ; 0x12a 8034208: f7fc ff65 bl 80310d6 snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); 803420c: 1d69 adds r1, r5, #5 803420e: f8b4 012a ldrh.w r0, [r4, #298] ; 0x12a 8034212: f7fc ff40 bl 8031096 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; 8034216: 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; 803421a: 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; 803421e: 444d add r5, r9 8034220: 3503 adds r5, #3 8034222: 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; 8034224: 197d adds r5, r7, r5 8034226: 18ed adds r5, r5, r3 8034228: fa16 f585 uxtah r5, r6, r5 803422c: b2ad uxth r5, r5 rhl->seqlen = tot_len; snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 803422e: 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; 8034230: f8a4 512c strh.w r5, [r4, #300] ; 0x12c snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 8034234: f504 718f add.w r1, r4, #286 ; 0x11e 8034238: f7fc ff2d bl 8031096 tot_len += 1 + rhl->seqlenlen; 803423c: f894 311e ldrb.w r3, [r4, #286] ; 0x11e 8034240: 3301 adds r3, #1 8034242: 18e8 adds r0, r5, r3 return tot_len; } 8034244: b280 uxth r0, r0 8034246: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 803424a: bf00 nop 803424c: 08041cd8 .word 0x08041cd8 08034250 : /** * 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) { 8034250: b570 push {r4, r5, r6, lr} 8034252: 4616 mov r6, r2 8034254: 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; 8034256: 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) { 8034258: 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)); 803425a: 4608 mov r0, r1 ofs += 1; 803425c: 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)); 803425e: 4611 mov r1, r2 8034260: 2230 movs r2, #48 ; 0x30 8034262: f7fc ff65 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); 8034266: 4628 mov r0, r5 8034268: 4631 mov r1, r6 803426a: 8962 ldrh r2, [r4, #10] 803426c: f7fc ff74 bl 8031158 ofs += root->seqlenlen; 8034270: 7a63 ldrb r3, [r4, #9] 8034272: e064 b.n 803433e vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 8034274: 4631 mov r1, r6 ofs += 1; 8034276: 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)); 8034278: 2230 movs r2, #48 ; 0x30 ofs += 1; 803427a: 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)); 803427c: 4628 mov r0, r5 803427e: f7fc ff57 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); 8034282: 4631 mov r1, r6 8034284: 8ba2 ldrh r2, [r4, #28] 8034286: 4628 mov r0, r5 8034288: f7fc ff66 bl 8031158 ofs += vb->seqlenlen; 803428c: 7e23 ldrb r3, [r4, #24] 803428e: 18f6 adds r6, r6, r3 8034290: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 8034292: 4631 mov r1, r6 ofs += 1; 8034294: 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)); 8034296: 2206 movs r2, #6 ofs += 1; 8034298: 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)); 803429a: 4628 mov r0, r5 803429c: f7fc ff48 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); 80342a0: 4631 mov r1, r6 80342a2: 8be2 ldrh r2, [r4, #30] 80342a4: 4628 mov r0, r5 80342a6: f7fc ff57 bl 8031158 ofs += vb->olenlen; 80342aa: 7e63 ldrb r3, [r4, #25] snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 80342ac: 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; 80342ae: 18f6 adds r6, r6, r3 80342b0: b2b6 uxth r6, r6 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 80342b2: 4631 mov r1, r6 80342b4: 68e3 ldr r3, [r4, #12] 80342b6: 4628 mov r0, r5 80342b8: f7fd f803 bl 80312c2 ofs += vb->olen; 80342bc: 8be3 ldrh r3, [r4, #30] snmp_asn1_enc_type(p, ofs, vb->value_type); 80342be: 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; 80342c0: 18f6 adds r6, r6, r3 80342c2: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, vb->value_type); 80342c4: 4631 mov r1, r6 ofs += 1; 80342c6: 3601 adds r6, #1 80342c8: 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); 80342ca: 4628 mov r0, r5 80342cc: f7fc ff30 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); 80342d0: 4631 mov r1, r6 80342d2: 4628 mov r0, r5 80342d4: 8c22 ldrh r2, [r4, #32] 80342d6: f7fc ff3f bl 8031158 ofs += vb->vlenlen; 80342da: 7ea3 ldrb r3, [r4, #26] 80342dc: 18f6 adds r6, r6, r3 switch (vb->value_type) 80342de: 7c23 ldrb r3, [r4, #16] 80342e0: 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; 80342e2: b2b6 uxth r6, r6 switch (vb->value_type) 80342e4: d01c beq.n 8034320 80342e6: d806 bhi.n 80342f6 80342e8: 2b04 cmp r3, #4 80342ea: d019 beq.n 8034320 80342ec: 2b06 cmp r3, #6 80342ee: d01e beq.n 803432e 80342f0: 2b02 cmp r3, #2 80342f2: d123 bne.n 803433c 80342f4: e004 b.n 8034300 80342f6: 2b43 cmp r3, #67 ; 0x43 80342f8: d90a bls.n 8034310 80342fa: 2b44 cmp r3, #68 ; 0x44 80342fc: d11e bne.n 803433c 80342fe: e00f b.n 8034320 { 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); 8034300: 6963 ldr r3, [r4, #20] 8034302: 8c22 ldrh r2, [r4, #32] 8034304: 681b ldr r3, [r3, #0] 8034306: 4628 mov r0, r5 8034308: 4631 mov r1, r6 803430a: f7fc ffad bl 8031268 break; 803430e: e015 b.n 803433c 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); 8034310: 6963 ldr r3, [r4, #20] 8034312: 8c22 ldrh r2, [r4, #32] 8034314: 681b ldr r3, [r3, #0] 8034316: 4628 mov r0, r5 8034318: 4631 mov r1, r6 803431a: f7fc ff65 bl 80311e8 break; 803431e: e00d b.n 803433c 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); 8034320: 4628 mov r0, r5 8034322: 4631 mov r1, r6 8034324: 8c22 ldrh r2, [r4, #32] 8034326: 6963 ldr r3, [r4, #20] 8034328: f7fd f83e bl 80313a8 break; 803432c: e006 b.n 803433c 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); 803432e: 7c62 ldrb r2, [r4, #17] 8034330: 6963 ldr r3, [r4, #20] 8034332: 4628 mov r0, r5 8034334: 4631 mov r1, r6 8034336: 0892 lsrs r2, r2, #2 8034338: f7fc ffc3 bl 80312c2 break; default: /* unsupported type */ break; }; ofs += vb->vlen; 803433c: 8c23 ldrh r3, [r4, #32] vb = vb->next; 803433e: 6824 ldr r4, [r4, #0] break; default: /* unsupported type */ break; }; ofs += vb->vlen; 8034340: 18f6 adds r6, r6, r3 8034342: b2b6 uxth r6, r6 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) 8034344: 2c00 cmp r4, #0 8034346: d195 bne.n 8034274 }; ofs += vb->vlen; vb = vb->next; } return ofs; } 8034348: 4630 mov r0, r6 803434a: bd70 pop {r4, r5, r6, pc} 0803434c : * @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) 803434c: b908 cbnz r0, 8034352 { trap_dst[dst_idx].enable = enable; 803434e: 4b01 ldr r3, [pc, #4] ; (8034354 ) 8034350: 7119 strb r1, [r3, #4] 8034352: 4770 bx lr 8034354: 200111e0 .word 0x200111e0 08034358 : * @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) 8034358: b918 cbnz r0, 8034362 { ip_addr_set(&trap_dst[dst_idx].dip, dst); 803435a: b101 cbz r1, 803435e 803435c: 6809 ldr r1, [r1, #0] 803435e: 4b01 ldr r3, [pc, #4] ; (8034364 ) 8034360: 6019 str r1, [r3, #0] 8034362: 4770 bx lr 8034364: 200111e0 .word 0x200111e0 08034368 : * @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) { 8034368: b5f0 push {r4, r5, r6, r7, lr} 803436a: 4604 mov r4, r0 803436c: b085 sub sp, #20 struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 803436e: 220c movs r2, #12 8034370: 2100 movs r1, #0 8034372: 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); 8034374: 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}; 8034378: f7ed fba2 bl 8021ac0 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 803437c: 4630 mov r0, r6 803437e: f7ff fe89 bl 8034094 8034382: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 8034384: 4620 mov r0, r4 8034386: f7ff feeb bl 8034160 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803438a: 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); 803438c: 4601 mov r1, r0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 803438e: 2000 movs r0, #0 8034390: f7f9 fbbd bl 802db0e if (p == NULL) 8034394: 4605 mov r5, r0 8034396: b990 cbnz r0, 80343be { 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; 8034398: 2301 movs r3, #1 803439a: 6123 str r3, [r4, #16] m_stat->error_index = 0; 803439c: 6160 str r0, [r4, #20] /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); 803439e: a801 add r0, sp, #4 80343a0: f7ff fe78 bl 8034094 80343a4: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 80343a6: 4620 mov r0, r4 80343a8: f7ff feda bl 8034160 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 80343ac: 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); 80343ae: 4601 mov r1, r0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 80343b0: 4628 mov r0, r5 80343b2: f7f9 fbac bl 802db0e } if (p != NULL) 80343b6: 4605 mov r5, r0 80343b8: 2800 cmp r0, #0 80343ba: f000 80dc beq.w 8034576 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)); 80343be: 2100 movs r1, #0 80343c0: 2230 movs r2, #48 ; 0x30 80343c2: 4628 mov r0, r5 80343c4: f7fc feb4 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); 80343c8: 2101 movs r1, #1 80343ca: f8b4 212c ldrh.w r2, [r4, #300] ; 0x12c 80343ce: 4628 mov r0, r5 80343d0: f7fc fec2 bl 8031158 ofs += m_stat->rhl.seqlenlen; 80343d4: f894 711e ldrb.w r7, [r4, #286] ; 0x11e snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80343d8: 2202 movs r2, #2 80343da: 1c79 adds r1, r7, #1 80343dc: 4628 mov r0, r5 ofs += 1; 80343de: 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)); 80343e0: f7fc fea6 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); 80343e4: 4639 mov r1, r7 80343e6: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a 80343ea: 4628 mov r0, r5 80343ec: f7fc feb4 bl 8031158 ofs += m_stat->rhl.verlenlen; 80343f0: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 80343f4: 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; 80343f8: 18ff adds r7, r7, r3 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 80343fa: 4b61 ldr r3, [pc, #388] ; (8034580 ) 80343fc: 4639 mov r1, r7 80343fe: 681b ldr r3, [r3, #0] 8034400: 4628 mov r0, r5 8034402: f7fc ff31 bl 8031268 ofs += m_stat->rhl.verlen; 8034406: f8b4 312a ldrh.w r3, [r4, #298] ; 0x12a 803440a: 18ff adds r7, r7, r3 803440c: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 803440e: 4639 mov r1, r7 ofs += 1; 8034410: 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)); 8034412: 2204 movs r2, #4 ofs += 1; 8034414: 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)); 8034416: 4628 mov r0, r5 8034418: f7fc fe8a bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); 803441c: 4639 mov r1, r7 803441e: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 8034422: 4628 mov r0, r5 8034424: f7fc fe98 bl 8031158 ofs += m_stat->rhl.comlenlen; 8034428: f894 311c ldrb.w r3, [r4, #284] ; 0x11c snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 803442c: 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; 8034430: 18ff adds r7, r7, r3 8034432: b2bf uxth r7, r7 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 8034434: 4639 mov r1, r7 8034436: f104 0318 add.w r3, r4, #24 803443a: 4628 mov r0, r5 803443c: f7fc ffb4 bl 80313a8 ofs += m_stat->rhl.comlen; 8034440: f8b4 3128 ldrh.w r3, [r4, #296] ; 0x128 8034444: 18ff adds r7, r7, r3 8034446: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 8034448: 4639 mov r1, r7 ofs += 1; 803444a: 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)); 803444c: 22a2 movs r2, #162 ; 0xa2 ofs += 1; 803444e: 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)); 8034450: 4628 mov r0, r5 8034452: f7fc fe6d bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); 8034456: 4639 mov r1, r7 8034458: f8b4 2126 ldrh.w r2, [r4, #294] ; 0x126 803445c: 4628 mov r0, r5 803445e: f7fc fe7b bl 8031158 ofs += m_stat->rhl.pdulenlen; 8034462: f894 311b ldrb.w r3, [r4, #283] ; 0x11b 8034466: 18ff adds r7, r7, r3 8034468: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 803446a: 4639 mov r1, r7 ofs += 1; 803446c: 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)); 803446e: 2202 movs r2, #2 ofs += 1; 8034470: 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)); 8034472: 4628 mov r0, r5 8034474: f7fc fe5c bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); 8034478: 4639 mov r1, r7 803447a: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 803447e: 4628 mov r0, r5 8034480: f7fc fe6a bl 8031158 ofs += m_stat->rhl.ridlenlen; 8034484: f894 311a ldrb.w r3, [r4, #282] ; 0x11a snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8034488: 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; 803448c: 18ff adds r7, r7, r3 803448e: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 8034490: 4639 mov r1, r7 8034492: 68e3 ldr r3, [r4, #12] 8034494: 4628 mov r0, r5 8034496: f7fc fee7 bl 8031268 ofs += m_stat->rhl.ridlen; 803449a: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 803449e: 18ff adds r7, r7, r3 80344a0: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80344a2: 4639 mov r1, r7 ofs += 1; 80344a4: 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)); 80344a6: 2202 movs r2, #2 ofs += 1; 80344a8: 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)); 80344aa: 4628 mov r0, r5 80344ac: f7fc fe40 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); 80344b0: 4639 mov r1, r7 80344b2: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 80344b6: 4628 mov r0, r5 80344b8: f7fc fe4e bl 8031158 ofs += m_stat->rhl.errstatlenlen; 80344bc: f894 3119 ldrb.w r3, [r4, #281] ; 0x119 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 80344c0: 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; 80344c4: 18ff adds r7, r7, r3 80344c6: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 80344c8: 4639 mov r1, r7 80344ca: 6923 ldr r3, [r4, #16] 80344cc: 4628 mov r0, r5 80344ce: f7fc fecb bl 8031268 ofs += m_stat->rhl.errstatlen; 80344d2: f8b4 3122 ldrh.w r3, [r4, #290] ; 0x122 80344d6: 18ff adds r7, r7, r3 80344d8: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 80344da: 4639 mov r1, r7 ofs += 1; 80344dc: 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)); 80344de: 2202 movs r2, #2 ofs += 1; 80344e0: 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)); 80344e2: 4628 mov r0, r5 80344e4: f7fc fe24 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); 80344e8: 4639 mov r1, r7 80344ea: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 80344ee: 4628 mov r0, r5 80344f0: f7fc fe32 bl 8031158 ofs += m_stat->rhl.erridxlenlen; 80344f4: f894 3118 ldrb.w r3, [r4, #280] ; 0x118 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 80344f8: 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; 80344fc: 18ff adds r7, r7, r3 80344fe: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 8034500: 4639 mov r1, r7 8034502: 6963 ldr r3, [r4, #20] 8034504: 4628 mov r0, r5 8034506: f7fc feaf bl 8031268 ofs += m_stat->rhl.erridxlen; 803450a: f8b4 3120 ldrh.w r3, [r4, #288] ; 0x120 803450e: 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); 8034510: 4630 mov r0, r6 8034512: 4629 mov r1, r5 8034514: b292 uxth r2, r2 8034516: f7ff fe9b bl 8034250 switch (m_stat->error_status) 803451a: 6923 ldr r3, [r4, #16] 803451c: 3b01 subs r3, #1 803451e: 2b04 cmp r3, #4 8034520: d80f bhi.n 8034542 8034522: e8df f003 tbb [pc, r3] 8034526: 0603 .short 0x0603 8034528: 0e09 .short 0x0e09 803452a: 0c .byte 0x0c 803452b: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpouttoobigs(); 803452c: f7fe fa0c bl 8032948 break; 8034530: e007 b.n 8034542 case SNMP_ES_NOSUCHNAME: snmp_inc_snmpoutnosuchnames(); 8034532: f7fe fa11 bl 8032958 break; 8034536: e004 b.n 8034542 case SNMP_ES_BADVALUE: snmp_inc_snmpoutbadvalues(); 8034538: f7fe fa16 bl 8032968 break; 803453c: e001 b.n 8034542 case SNMP_ES_GENERROR: snmp_inc_snmpoutgenerrs(); 803453e: f7fe fa1b bl 8032978 break; } snmp_inc_snmpoutgetresponses(); 8034542: f7fe fa21 bl 8032988 snmp_inc_snmpoutpkts(); 8034546: f7fe f97f bl 8032848 /** @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); 803454a: 8922 ldrh r2, [r4, #8] 803454c: 6820 ldr r0, [r4, #0] 803454e: 1d21 adds r1, r4, #4 8034550: f7fb ffaa bl 80304a8 err = udp_send(m_stat->pcb, p); 8034554: 4629 mov r1, r5 8034556: 6820 ldr r0, [r4, #0] 8034558: f7fb ffa1 bl 803049e /** @todo release some memory, retry and return tooBig? tooMuchHassle? */ err = ERR_MEM; } else { err = ERR_OK; 803455c: f1b0 3fff cmp.w r0, #4294967295 8034560: bf0c ite eq 8034562: f04f 36ff moveq.w r6, #4294967295 8034566: 2600 movne r6, #0 } /** disassociate remote address and port with this pcb */ udp_disconnect(m_stat->pcb); 8034568: 6820 ldr r0, [r4, #0] 803456a: f7fb ffc3 bl 80304f4 pbuf_free(p); 803456e: 4628 mov r0, r5 8034570: f7f9 fa80 bl 802da74 8034574: e000 b.n 8034578 } else { /* first pbuf alloc try or retry alloc failed very low on memory, couldn't return tooBig */ return ERR_MEM; 8034576: 26ff movs r6, #255 ; 0xff } } 8034578: b270 sxtb r0, r6 803457a: b005 add sp, #20 803457c: bdf0 pop {r4, r5, r6, r7, pc} 803457e: bf00 nop 8034580: 08041cd8 .word 0x08041cd8 08034584 : * 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) { 8034584: 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)) 8034588: 4b11 ldr r3, [pc, #68] ; (80345d0 ) * 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) { 803458a: 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)) 803458c: 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) { 803458e: b085 sub sp, #20 8034590: 4605 mov r5, r0 8034592: 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)) 8034594: 2a00 cmp r2, #0 8034596: f000 81b8 beq.w 803490a 803459a: 6818 ldr r0, [r3, #0] 803459c: 2800 cmp r0, #0 803459e: f000 81b4 beq.w 803490a { /* network order trap destination */ ip_addr_copy(trap_msg.dip, td->dip); 80345a2: 4c0c ldr r4, [pc, #48] ; (80345d4 ) 80345a4: 6060 str r0, [r4, #4] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); 80345a6: 4618 mov r0, r3 80345a8: f7fc f9ee bl 8030988 ip_addr_copy(dst_ip, dst_if->ip_addr); 80345ac: 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; 80345ae: 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); 80345b0: 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); 80345b4: 7323 strb r3, [r4, #12] trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 80345b6: 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) 80345b8: 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); 80345ba: f3c3 4207 ubfx r2, r3, #16, #8 trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 80345be: 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); 80345c2: 73a2 strb r2, [r4, #14] trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 80345c4: 73e3 strb r3, [r4, #15] trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; 80345c6: 6167 str r7, [r4, #20] if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 80345c8: d106 bne.n 80345d8 { /* enterprise-Specific trap */ trap_msg.enterprise = eoid; 80345ca: 60a6 str r6, [r4, #8] 80345cc: e008 b.n 80345e0 80345ce: bf00 nop 80345d0: 200111e0 .word 0x200111e0 80345d4: 200111e8 .word 0x200111e8 } else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); 80345d8: f104 0008 add.w r0, r4, #8 80345dc: f7fe f9e4 bl 80329a8 } snmp_get_sysuptime(&trap_msg.ts); 80345e0: 48bb ldr r0, [pc, #748] ; (80348d0 ) struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 80345e2: 4cbc ldr r4, [pc, #752] ; (80348d4 ) else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); 80345e4: f7fd fd4a bl 803207c /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 80345e8: 48bb ldr r0, [pc, #748] ; (80348d8 ) 80345ea: f7ff fd53 bl 8034094 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 80345ee: 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); 80345f2: 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); 80345f4: 69a0 ldr r0, [r4, #24] 80345f6: f7fc fd59 bl 80310ac snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); 80345fa: 8e60 ldrh r0, [r4, #50] ; 0x32 80345fc: f104 0128 add.w r1, r4, #40 ; 0x28 8034600: f7fc fd49 bl 8031096 tot_len += 1 + thl->tslen + thl->tslenlen; 8034604: f8b4 c032 ldrh.w ip, [r4, #50] ; 0x32 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8034608: 6960 ldr r0, [r4, #20] 803460a: f8cd c004 str.w ip, [sp, #4] 803460e: 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; 8034612: f894 9028 ldrb.w r9, [r4, #40] ; 0x28 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 8034616: f7fc fd5e bl 80310d6 snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); 803461a: 8ea0 ldrh r0, [r4, #52] ; 0x34 803461c: f104 0129 add.w r1, r4, #41 ; 0x29 8034620: f7fc fd39 bl 8031096 tot_len += 1 + thl->strplen + thl->strplenlen; 8034624: 8ea3 ldrh r3, [r4, #52] ; 0x34 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 8034626: 6920 ldr r0, [r4, #16] 8034628: 9302 str r3, [sp, #8] 803462a: 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; 803462e: 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; 8034632: 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); 8034634: f7fc fd4f bl 80310d6 snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); 8034638: 8ee0 ldrh r0, [r4, #54] ; 0x36 803463a: f104 012a add.w r1, r4, #42 ; 0x2a 803463e: f7fc fd2a bl 8031096 tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8034642: 4628 mov r0, r5 8034644: 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; 8034648: f8b4 b036 ldrh.w fp, [r4, #54] ; 0x36 803464c: f894 702a ldrb.w r7, [r4, #42] ; 0x2a thl->aaddrlen = 4; 8034650: 8725 strh r5, [r4, #56] ; 0x38 snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 8034652: f7fc fd20 bl 8031096 tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 8034656: f894 202b ldrb.w r2, [r4, #43] ; 0x2b snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 803465a: 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; 803465c: 9203 str r2, [sp, #12] snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 803465e: 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; 8034662: f8b4 a038 ldrh.w sl, [r4, #56] ; 0x38 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 8034666: f104 023a add.w r2, r4, #58 ; 0x3a 803466a: f7fc fd49 bl 8031100 snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); 803466e: 8f60 ldrh r0, [r4, #58] ; 0x3a 8034670: f104 012c add.w r1, r4, #44 ; 0x2c 8034674: f7fc fd0f bl 8031096 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; 8034678: f8dd c004 ldr.w ip, [sp, #4] 803467c: 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; 803467e: 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; 8034680: 4463 add r3, ip 8034682: 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; 8034684: 449b add fp, r3 8034686: 44da add sl, fp 8034688: 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; 803468c: 44d1 add r9, sl 803468e: 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; 8034690: 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; 8034692: 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; 8034696: 19df adds r7, r3, r7 8034698: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 803469c: 18ff adds r7, r7, r3 803469e: fa16 f687 uxtah r6, r6, r7 80346a2: b2b6 uxth r6, r6 thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 80346a4: 4630 mov r0, r6 80346a6: f104 012d add.w r1, r4, #45 ; 0x2d tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; 80346aa: 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; 80346ac: 87a6 strh r6, [r4, #60] ; 0x3c snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 80346ae: f7fc fcf2 bl 8031096 tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 80346b2: 4638 mov r0, r7 80346b4: 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; 80346b8: f894 a02d ldrb.w sl, [r4, #45] ; 0x2d thl->comlen = sizeof(snmp_publiccommunity) - 1; 80346bc: 87e7 strh r7, [r4, #62] ; 0x3e snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 80346be: f7fc fcea bl 8031096 tot_len += 1 + thl->comlenlen + thl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 80346c2: 4b86 ldr r3, [pc, #536] ; (80348dc ) 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; 80346c4: f894 902e ldrb.w r9, [r4, #46] ; 0x2e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 80346c8: 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; 80346cc: f8b4 b03e ldrh.w fp, [r4, #62] ; 0x3e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 80346d0: 4640 mov r0, r8 80346d2: f104 0140 add.w r1, r4, #64 ; 0x40 80346d6: f7fc fcfe bl 80310d6 snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); 80346da: f8b4 0040 ldrh.w r0, [r4, #64] ; 0x40 80346de: f104 012f add.w r1, r4, #47 ; 0x2f 80346e2: f7fc fcd8 bl 8031096 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; 80346e6: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 80346ea: 449b add fp, r3 80346ec: 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; 80346f0: 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; 80346f4: 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; 80346f6: 44d1 add r9, sl 80346f8: 4499 add r9, r3 80346fa: fa16 f689 uxtah r6, r6, r9 80346fe: b2b6 uxth r6, r6 thl->seqlen = tot_len; snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 8034700: 4630 mov r0, r6 8034702: 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; 8034706: f8a4 6042 strh.w r6, [r4, #66] ; 0x42 snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 803470a: f7fc fcc4 bl 8031096 tot_len += 1 + thl->seqlenlen; 803470e: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 8034712: 3301 adds r3, #1 8034714: 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); 8034716: 2000 movs r0, #0 8034718: b289 uxth r1, r1 803471a: 2203 movs r2, #3 803471c: f7f9 f9f7 bl 802db0e if (p != NULL) 8034720: 4606 mov r6, r0 8034722: 2800 cmp r0, #0 8034724: f000 80f3 beq.w 803490e 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)); 8034728: 2100 movs r1, #0 803472a: 2230 movs r2, #48 ; 0x30 803472c: f7fc fd00 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); 8034730: 2101 movs r1, #1 8034732: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 8034736: 4630 mov r0, r6 8034738: f7fc fd0e bl 8031158 ofs += m_trap->thl.seqlenlen; 803473c: f894 9030 ldrb.w r9, [r4, #48] ; 0x30 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8034740: 2202 movs r2, #2 8034742: f109 0101 add.w r1, r9, #1 8034746: 4630 mov r0, r6 ofs += 1; 8034748: 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)); 803474c: f7fc fcf0 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); 8034750: 4649 mov r1, r9 8034752: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 8034756: 4630 mov r0, r6 8034758: f7fc fcfe bl 8031158 ofs += m_trap->thl.verlenlen; 803475c: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8034760: 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; 8034764: 4499 add r9, r3 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 8034766: 4649 mov r1, r9 8034768: 4643 mov r3, r8 803476a: 4630 mov r0, r6 803476c: f7fc fd7c bl 8031268 ofs += m_trap->thl.verlen; 8034770: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 8034774: 4499 add r9, r3 8034776: fa1f f989 uxth.w r9, r9 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 803477a: 462a mov r2, r5 ofs += 1; 803477c: 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)); 8034780: 4649 mov r1, r9 ofs += 1; 8034782: 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)); 8034784: 4630 mov r0, r6 8034786: f7fc fcd3 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); 803478a: 4629 mov r1, r5 803478c: 8fe2 ldrh r2, [r4, #62] ; 0x3e 803478e: 4630 mov r0, r6 8034790: f7fc fce2 bl 8031158 ofs += m_trap->thl.comlenlen; 8034794: f894 302e ldrb.w r3, [r4, #46] ; 0x2e snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 8034798: 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; 803479a: 18ed adds r5, r5, r3 803479c: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 803479e: 4629 mov r1, r5 80347a0: 4b4f ldr r3, [pc, #316] ; (80348e0 ) 80347a2: 4630 mov r0, r6 80347a4: f7fc fe00 bl 80313a8 ofs += m_trap->thl.comlen; 80347a8: 8fe3 ldrh r3, [r4, #62] ; 0x3e 80347aa: 18ed adds r5, r5, r3 80347ac: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 80347ae: 4629 mov r1, r5 ofs += 1; 80347b0: 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)); 80347b2: 22a4 movs r2, #164 ; 0xa4 ofs += 1; 80347b4: 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)); 80347b6: 4630 mov r0, r6 80347b8: f7fc fcba bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); 80347bc: 4629 mov r1, r5 80347be: 8fa2 ldrh r2, [r4, #60] ; 0x3c 80347c0: 4630 mov r0, r6 80347c2: f7fc fcc9 bl 8031158 ofs += m_trap->thl.pdulenlen; 80347c6: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 80347ca: 18ed adds r5, r5, r3 80347cc: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 80347ce: 4629 mov r1, r5 ofs += 1; 80347d0: 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)); 80347d2: 463a mov r2, r7 ofs += 1; 80347d4: 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)); 80347d6: 4630 mov r0, r6 80347d8: f7fc fcaa bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); 80347dc: 4629 mov r1, r5 80347de: 8f62 ldrh r2, [r4, #58] ; 0x3a 80347e0: 4630 mov r0, r6 80347e2: f7fc fcb9 bl 8031158 ofs += m_trap->thl.eidlenlen; 80347e6: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 80347ea: 18ed adds r5, r5, r3 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 80347ec: 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; 80347ee: b2ad uxth r5, r5 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 80347f0: 4629 mov r1, r5 80347f2: f813 2b04 ldrb.w r2, [r3], #4 80347f6: 4630 mov r0, r6 80347f8: f7fc fd63 bl 80312c2 ofs += m_trap->thl.eidlen; 80347fc: 8f63 ldrh r3, [r4, #58] ; 0x3a 80347fe: 18ed adds r5, r5, r3 8034800: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 8034802: 4629 mov r1, r5 ofs += 1; 8034804: 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)); 8034806: 2240 movs r2, #64 ; 0x40 ofs += 1; 8034808: 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)); 803480a: 4630 mov r0, r6 803480c: f7fc fc90 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); 8034810: 4629 mov r1, r5 8034812: 8f22 ldrh r2, [r4, #56] ; 0x38 8034814: 4630 mov r0, r6 8034816: f7fc fc9f bl 8031158 ofs += m_trap->thl.aaddrlenlen; 803481a: f894 302b ldrb.w r3, [r4, #43] ; 0x2b snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 803481e: 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; 8034820: 18ed adds r5, r5, r3 8034822: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 8034824: 4629 mov r1, r5 8034826: f104 030c add.w r3, r4, #12 803482a: 4630 mov r0, r6 803482c: f7fc fdbc bl 80313a8 ofs += m_trap->thl.aaddrlen; 8034830: 8f23 ldrh r3, [r4, #56] ; 0x38 8034832: 18ed adds r5, r5, r3 8034834: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8034836: 4629 mov r1, r5 ofs += 1; 8034838: 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)); 803483a: 2202 movs r2, #2 ofs += 1; 803483c: 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)); 803483e: 4630 mov r0, r6 8034840: f7fc fc76 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); 8034844: 4629 mov r1, r5 8034846: 8ee2 ldrh r2, [r4, #54] ; 0x36 8034848: 4630 mov r0, r6 803484a: f7fc fc85 bl 8031158 ofs += m_trap->thl.gtrplenlen; 803484e: f894 302a ldrb.w r3, [r4, #42] ; 0x2a snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8034852: 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; 8034854: 18ed adds r5, r5, r3 8034856: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 8034858: 4629 mov r1, r5 803485a: 6923 ldr r3, [r4, #16] 803485c: 4630 mov r0, r6 803485e: f7fc fcc3 bl 80311e8 ofs += m_trap->thl.gtrplen; 8034862: 8ee3 ldrh r3, [r4, #54] ; 0x36 8034864: 18ed adds r5, r5, r3 8034866: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 8034868: 4629 mov r1, r5 ofs += 1; 803486a: 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)); 803486c: 2202 movs r2, #2 ofs += 1; 803486e: 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)); 8034870: 4630 mov r0, r6 8034872: f7fc fc5d bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); 8034876: 4629 mov r1, r5 8034878: 8ea2 ldrh r2, [r4, #52] ; 0x34 803487a: 4630 mov r0, r6 803487c: f7fc fc6c bl 8031158 ofs += m_trap->thl.strplenlen; 8034880: f894 3029 ldrb.w r3, [r4, #41] ; 0x29 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 8034884: 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; 8034886: 18ed adds r5, r5, r3 8034888: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 803488a: 4629 mov r1, r5 803488c: 6963 ldr r3, [r4, #20] 803488e: 4630 mov r0, r6 8034890: f7fc fcaa bl 80311e8 ofs += m_trap->thl.strplen; 8034894: 8ea3 ldrh r3, [r4, #52] ; 0x34 8034896: 18ed adds r5, r5, r3 8034898: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 803489a: 4629 mov r1, r5 ofs += 1; 803489c: 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)); 803489e: 2243 movs r2, #67 ; 0x43 ofs += 1; 80348a0: 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)); 80348a2: 4630 mov r0, r6 80348a4: f7fc fc44 bl 8031130 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); 80348a8: 4629 mov r1, r5 80348aa: 8e62 ldrh r2, [r4, #50] ; 0x32 80348ac: 4630 mov r0, r6 80348ae: f7fc fc53 bl 8031158 ofs += m_trap->thl.tslenlen; 80348b2: f894 3028 ldrb.w r3, [r4, #40] ; 0x28 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 80348b6: 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; 80348b8: 18ed adds r5, r5, r3 80348ba: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 80348bc: 4629 mov r1, r5 80348be: 69a3 ldr r3, [r4, #24] 80348c0: 4630 mov r0, r6 80348c2: f7fc fc91 bl 80311e8 ofs += m_trap->thl.tslen; 80348c6: 8e63 ldrh r3, [r4, #50] ; 0x32 80348c8: 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); 80348ca: 4631 mov r1, r6 80348cc: e00a b.n 80348e4 80348ce: bf00 nop 80348d0: 20011200 .word 0x20011200 80348d4: 200111e8 .word 0x200111e8 80348d8: 20011204 .word 0x20011204 80348dc: 08041cd8 .word 0x08041cd8 80348e0: 08041cdc .word 0x08041cdc 80348e4: b292 uxth r2, r2 80348e6: f104 001c add.w r0, r4, #28 80348ea: f7ff fcb1 bl 8034250 snmp_inc_snmpouttraps(); 80348ee: f7fe f853 bl 8032998 snmp_inc_snmpoutpkts(); 80348f2: f7fd ffa9 bl 8032848 /** send to the TRAP destination */ udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT); 80348f6: 4622 mov r2, r4 80348f8: 4631 mov r1, r6 80348fa: f852 0b04 ldr.w r0, [r2], #4 80348fe: 23a2 movs r3, #162 ; 0xa2 8034900: f7fb fdb9 bl 8030476 pbuf_free(p); 8034904: 4630 mov r0, r6 8034906: f7f9 f8b5 bl 802da74 { return ERR_MEM; } } } return ERR_OK; 803490a: 2000 movs r0, #0 803490c: e000 b.n 8034910 pbuf_free(p); } else { return ERR_MEM; 803490e: 20ff movs r0, #255 ; 0xff } } } return ERR_OK; } 8034910: b240 sxtb r0, r0 8034912: b005 add sp, #20 8034914: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 08034918 : snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0); } void snmp_authfail_trap(void) { 8034918: b507 push {r0, r1, r2, lr} u8_t enable; snmp_get_snmpenableauthentraps(&enable); 803491a: f10d 0007 add.w r0, sp, #7 803491e: f7fe f849 bl 80329b4 if (enable == 1) 8034922: f89d 3007 ldrb.w r3, [sp, #7] 8034926: 2b01 cmp r3, #1 8034928: d109 bne.n 803493e { trap_msg.outvb.head = NULL; 803492a: 2100 movs r1, #0 803492c: 4b04 ldr r3, [pc, #16] ; (8034940 ) trap_msg.outvb.tail = NULL; trap_msg.outvb.count = 0; snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 803492e: 2004 movs r0, #4 8034930: 460a mov r2, r1 { u8_t enable; snmp_get_snmpenableauthentraps(&enable); if (enable == 1) { trap_msg.outvb.head = NULL; 8034932: 61d9 str r1, [r3, #28] trap_msg.outvb.tail = NULL; 8034934: 6219 str r1, [r3, #32] trap_msg.outvb.count = 0; 8034936: f883 1024 strb.w r1, [r3, #36] ; 0x24 snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 803493a: f7ff fe23 bl 8034584 } } 803493e: bd0e pop {r1, r2, r3, pc} 8034940: 200111e8 .word 0x200111e8 08034944 : * @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) { 8034944: b5f8 push {r3, r4, r5, r6, r7, lr} struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; 8034946: 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) { 8034948: 4606 mov r6, r0 803494a: 460d mov r5, r1 803494c: 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); 803494e: 4619 mov r1, r3 8034950: 2206 movs r2, #6 8034952: 4620 mov r0, r4 8034954: f7ec fffa bl 802194c ETHADDR16_COPY(ðhdr->src, src); 8034958: 4639 mov r1, r7 803495a: 1da0 adds r0, r4, #6 803495c: 2206 movs r2, #6 803495e: f7ec fff5 bl 802194c ethhdr->type = PP_HTONS(ETHTYPE_IP); 8034962: 2308 movs r3, #8 8034964: 7323 strb r3, [r4, #12] 8034966: 2300 movs r3, #0 8034968: 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); 803496a: 69b3 ldr r3, [r6, #24] 803496c: 4630 mov r0, r6 803496e: 4629 mov r1, r5 8034970: 4798 blx r3 } 8034972: bdf8 pop {r3, r4, r5, r6, r7, pc} 08034974 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8034974: b570 push {r4, r5, r6, lr} /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8034976: 4d0b ldr r5, [pc, #44] ; (80349a4 ) 8034978: 2414 movs r4, #20 803497a: 4344 muls r4, r0 803497c: 1929 adds r1, r5, r4 #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 803497e: 4606 mov r6, r0 /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 8034980: 3104 adds r1, #4 8034982: 6848 ldr r0, [r1, #4] 8034984: f7fd fc54 bl 8032230 /* and empty packet queue */ if (arp_table[i].q != NULL) { 8034988: 5928 ldr r0, [r5, r4] 803498a: b118 cbz r0, 8034994 /* 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); 803498c: f7f9 f872 bl 802da74 arp_table[i].q = NULL; 8034990: 2300 movs r3, #0 8034992: 512b str r3, [r5, r4] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8034994: 2314 movs r3, #20 8034996: fb03 5506 mla r5, r3, r6, r5 803499a: 2300 movs r3, #0 803499c: 74ab strb r3, [r5, #18] 803499e: 3510 adds r5, #16 80349a0: bd70 pop {r4, r5, r6, pc} 80349a2: bf00 nop 80349a4: 2000e4b0 .word 0x2000e4b0 080349a8 : * @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) { 80349a8: 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; 80349ac: 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; 80349ae: 240a movs r4, #10 80349b0: 4a35 ldr r2, [pc, #212] ; (8034a88 ) * @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) { 80349b2: 9101 str r1, [sp, #4] 80349b4: 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; 80349b6: 46a8 mov r8, r5 80349b8: 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) { 80349ba: 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; 80349bc: 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; 80349be: 46a4 mov ip, r4 80349c0: 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)) { 80349c2: 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; 80349c4: 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)) { 80349c8: d104 bne.n 80349d4 80349ca: f1b9 0f00 cmp.w r9, #0 80349ce: d104 bne.n 80349da LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); /* remember first empty entry */ empty = i; 80349d0: b2df uxtb r7, r3 80349d2: e023 b.n 8034a1c } else if (state != ETHARP_STATE_EMPTY) { 80349d4: f1b9 0f00 cmp.w r9, #0 80349d8: d020 beq.n 8034a1c 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)) { 80349da: b12e cbz r6, 80349e8 80349dc: 6830 ldr r0, [r6, #0] 80349de: 6851 ldr r1, [r2, #4] 80349e0: 4288 cmp r0, r1 80349e2: d101 bne.n 80349e8 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; 80349e4: 4618 mov r0, r3 80349e6: e04b b.n 8034a80 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 80349e8: f1b9 0f01 cmp.w r9, #1 80349ec: d10e bne.n 8034a0c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 80349ee: 6810 ldr r0, [r2, #0] if (arp_table[i].ctime >= age_queue) { 80349f0: 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) { 80349f4: b120 cbz r0, 8034a00 if (arp_table[i].ctime >= age_queue) { 80349f6: 45a9 cmp r9, r5 80349f8: d310 bcc.n 8034a1c old_queue = i; 80349fa: b2dc uxtb r4, r3 80349fc: 464d mov r5, r9 80349fe: e00d b.n 8034a1c age_queue = arp_table[i].ctime; } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8034a00: 45d1 cmp r9, sl 8034a02: d30b bcc.n 8034a1c old_pending = i; 8034a04: fa5f fb83 uxtb.w fp, r3 8034a08: 46ca mov sl, r9 8034a0a: e007 b.n 8034a1c age_pending = arp_table[i].ctime; } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 8034a0c: d906 bls.n 8034a1c /* 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) { 8034a0e: f892 9013 ldrb.w r9, [r2, #19] 8034a12: 45c1 cmp r9, r8 old_stable = i; 8034a14: bf24 itt cs 8034a16: fa5f fc83 uxtbcs.w ip, r3 8034a1a: 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) { 8034a1c: 3301 adds r3, #1 8034a1e: b2db uxtb r3, r3 8034a20: 3214 adds r2, #20 8034a22: 2b0a cmp r3, #10 8034a24: d1cd bne.n 80349c2 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8034a26: 9a01 ldr r2, [sp, #4] 8034a28: f002 0302 and.w r3, r2, #2 8034a2c: b2db uxtb r3, r3 8034a2e: bb33 cbnz r3, 8034a7e 8034a30: 2f0a cmp r7, #10 8034a32: d102 bne.n 8034a3a /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 8034a34: 07d3 lsls r3, r2, #31 8034a36: d402 bmi.n 8034a3e 8034a38: e021 b.n 8034a7e * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; 8034a3a: b2fc uxtb r4, r7 8034a3c: e011 b.n 8034a62 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) { 8034a3e: f1bc 0f0a cmp.w ip, #10 8034a42: d002 beq.n 8034a4a /* recycle oldest stable*/ i = old_stable; 8034a44: fa5f f48c uxtb.w r4, ip 8034a48: e008 b.n 8034a5c 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) { 8034a4a: f1bb 0f0a cmp.w fp, #10 8034a4e: d002 beq.n 8034a56 /* recycle oldest pending */ i = old_pending; 8034a50: fa5f f48b uxtb.w r4, fp 8034a54: e002 b.n 8034a5c 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) { 8034a56: 2c0a cmp r4, #10 8034a58: d011 beq.n 8034a7e /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8034a5a: 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); 8034a5c: 4620 mov r0, r4 8034a5e: f7ff ff89 bl 8034974 8034a62: 4b09 ldr r3, [pc, #36] ; (8034a88 ) 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) { 8034a64: b126 cbz r6, 8034a70 /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); 8034a66: 2214 movs r2, #20 8034a68: 6831 ldr r1, [r6, #0] 8034a6a: fb02 3204 mla r2, r2, r4, r3 8034a6e: 6051 str r1, [r2, #4] } arp_table[i].ctime = 0; 8034a70: 2214 movs r2, #20 8034a72: fb02 3304 mla r3, r2, r4, r3 8034a76: 2200 movs r2, #0 8034a78: 74da strb r2, [r3, #19] return (err_t)i; 8034a7a: 4620 mov r0, r4 8034a7c: e000 b.n 8034a80 /* 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; 8034a7e: 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; } 8034a80: b240 sxtb r0, r0 8034a82: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8034a86: bf00 nop 8034a88: 2000e4b0 .word 0x2000e4b0 08034a8c : * 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) { 8034a8c: b570 push {r4, r5, r6, lr} 8034a8e: 4c0d ldr r4, [pc, #52] ; (8034ac4 ) 8034a90: 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; 8034a92: 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 8034a94: 7ca3 ldrb r3, [r4, #18] 8034a96: b183 cbz r3, 8034aba #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 8034a98: 7ce2 ldrb r2, [r4, #19] 8034a9a: 3201 adds r2, #1 8034a9c: b2d2 uxtb r2, r2 if ((arp_table[i].ctime >= ARP_MAXAGE) || 8034a9e: 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++; 8034aa0: 74e2 strb r2, [r4, #19] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8034aa2: d803 bhi.n 8034aac 8034aa4: 2b01 cmp r3, #1 8034aa6: d105 bne.n 8034ab4 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8034aa8: 2a01 cmp r2, #1 8034aaa: d906 bls.n 8034aba (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); 8034aac: 4628 mov r0, r5 8034aae: f7ff ff61 bl 8034974 8034ab2: e002 b.n 8034aba } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { 8034ab4: 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; 8034ab6: bf08 it eq 8034ab8: 74a6 strbeq r6, [r4, #18] 8034aba: 3501 adds r5, #1 8034abc: 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) { 8034abe: 2d0a cmp r5, #10 8034ac0: d1e8 bne.n 8034a94 /* resend an ARP query here? */ } #endif /* ARP_QUEUEING */ } } } 8034ac2: bd70 pop {r4, r5, r6, pc} 8034ac4: 2000e4b0 .word 0x2000e4b0 08034ac8 : * Remove all ARP table entries of the specified netif. * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8034ac8: b570 push {r4, r5, r6, lr} 8034aca: 4d08 ldr r5, [pc, #32] ; (8034aec ) 8034acc: 4606 mov r6, r0 8034ace: 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)) { 8034ad0: 7cab ldrb r3, [r5, #18] 8034ad2: b12b cbz r3, 8034ae0 8034ad4: 68ab ldr r3, [r5, #8] 8034ad6: 42b3 cmp r3, r6 8034ad8: d102 bne.n 8034ae0 etharp_free_entry(i); 8034ada: 4620 mov r0, r4 8034adc: f7ff ff4a bl 8034974 8034ae0: 3401 adds r4, #1 8034ae2: 3514 adds r5, #20 */ void etharp_cleanup_netif(struct netif *netif) { u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8034ae4: 2c0a cmp r4, #10 8034ae6: d1f3 bne.n 8034ad0 u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { etharp_free_entry(i); } } } 8034ae8: bd70 pop {r4, r5, r6, pc} 8034aea: bf00 nop 8034aec: 2000e4b0 .word 0x2000e4b0 08034af0 : * @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) { 8034af0: 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); 8034af2: 4608 mov r0, r1 8034af4: 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) { 8034af6: 4616 mov r6, r2 8034af8: 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); 8034afa: f7ff ff55 bl 80349a8 if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { 8034afe: 2800 cmp r0, #0 8034b00: db0c blt.n 8034b1c 8034b02: 2414 movs r4, #20 8034b04: 4d07 ldr r5, [pc, #28] ; (8034b24 ) 8034b06: 4344 muls r4, r0 8034b08: 1929 adds r1, r5, r4 8034b0a: 7c8b ldrb r3, [r1, #18] 8034b0c: 2b01 cmp r3, #1 8034b0e: d905 bls.n 8034b1c *eth_ret = &arp_table[i].ethaddr; 8034b10: 460c mov r4, r1 8034b12: 340c adds r4, #12 *ip_ret = &arp_table[i].ipaddr; 8034b14: 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; 8034b16: 6034 str r4, [r6, #0] *ip_ret = &arp_table[i].ipaddr; 8034b18: 6039 str r1, [r7, #0] return i; 8034b1a: e000 b.n 8034b1e } return -1; 8034b1c: 20ff movs r0, #255 ; 0xff } 8034b1e: b240 sxtb r0, r0 8034b20: bdf8 pop {r3, r4, r5, r6, r7, pc} 8034b22: bf00 nop 8034b24: 2000e4b0 .word 0x2000e4b0 08034b28 : * 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) { 8034b28: 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); 8034b2c: 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) { 8034b2e: 4606 mov r6, r0 8034b30: 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, 8034b32: f100 0727 add.w r7, r0, #39 ; 0x27 8034b36: 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); 8034b3a: 212a movs r1, #42 ; 0x2a 8034b3c: 2003 movs r0, #3 8034b3e: f7f8 ffe6 bl 802db0e /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 8034b42: 4605 mov r5, r0 8034b44: 2800 cmp r0, #0 8034b46: d03c beq.n 8034bc2 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; 8034b48: 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); 8034b4a: 2001 movs r0, #1 8034b4c: f7f7 fe54 bl 802c7f8 * '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); 8034b50: 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); 8034b52: 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); 8034b54: 2206 movs r2, #6 8034b56: f104 0016 add.w r0, r4, #22 8034b5a: f7ec fef7 bl 802194c ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); 8034b5e: 2206 movs r2, #6 8034b60: f104 0020 add.w r0, r4, #32 8034b64: 4919 ldr r1, [pc, #100] ; (8034bcc ) 8034b66: f7ec fef1 bl 802194c /* Write the Ethernet MAC-Addresses */ #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, ethdst_addr); 8034b6a: 2206 movs r2, #6 8034b6c: 4620 mov r0, r4 8034b6e: 4918 ldr r1, [pc, #96] ; (8034bd0 ) 8034b70: f7ec feec bl 802194c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->src, ethsrc_addr); 8034b74: 1da0 adds r0, r4, #6 8034b76: 4639 mov r1, r7 8034b78: 2206 movs r2, #6 8034b7a: f7ec fee7 bl 802194c /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); 8034b7e: 4649 mov r1, r9 8034b80: 2204 movs r2, #4 8034b82: f104 001c add.w r0, r4, #28 8034b86: f7ec fee1 bl 802194c IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); 8034b8a: 4641 mov r1, r8 8034b8c: 2204 movs r2, #4 8034b8e: f104 0026 add.w r0, r4, #38 ; 0x26 8034b92: f7ec fedb bl 802194c hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); 8034b96: 2300 movs r3, #0 8034b98: 2201 movs r2, #1 8034b9a: 73a3 strb r3, [r4, #14] 8034b9c: 73e2 strb r2, [r4, #15] hdr->proto = PP_HTONS(ETHTYPE_IP); 8034b9e: 7463 strb r3, [r4, #17] 8034ba0: 2208 movs r2, #8 /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 8034ba2: 2306 movs r3, #6 hdr->protolen = sizeof(ip_addr_t); 8034ba4: 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); 8034ba6: 7422 strb r2, [r4, #16] /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; hdr->protolen = sizeof(ip_addr_t); 8034ba8: 74e1 strb r1, [r4, #19] ethhdr->type = PP_HTONS(ETHTYPE_ARP); 8034baa: 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; 8034bac: 74a3 strb r3, [r4, #18] hdr->protolen = sizeof(ip_addr_t); ethhdr->type = PP_HTONS(ETHTYPE_ARP); 8034bae: 7363 strb r3, [r4, #13] /* send ARP query */ result = netif->linkoutput(netif, p); 8034bb0: 69b3 ldr r3, [r6, #24] 8034bb2: 4630 mov r0, r6 8034bb4: 4629 mov r1, r5 8034bb6: 4798 blx r3 8034bb8: 4604 mov r4, r0 ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 8034bba: 4628 mov r0, r5 8034bbc: f7f8 ff5a bl 802da74 8034bc0: e000 b.n 8034bc4 /* 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; 8034bc2: 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); } 8034bc4: b260 sxtb r0, r4 8034bc6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8034bca: bf00 nop 8034bcc: 08041ce9 .word 0x08041ce9 8034bd0: 08041ce3 .word 0x08041ce3 08034bd4 : * - 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) { 8034bd4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8034bd8: 4607 mov r7, r0 8034bda: 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) || 8034bdc: 6808 ldr r0, [r1, #0] 8034bde: 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) { 8034be0: 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) || 8034be2: f7fb fde1 bl 80307a8 8034be6: 2800 cmp r0, #0 8034be8: d157 bne.n 8034c9a ip_addr_ismulticast(ipaddr) || 8034bea: 6833 ldr r3, [r6, #0] 8034bec: 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) || 8034bf0: 2ae0 cmp r2, #224 ; 0xe0 8034bf2: d052 beq.n 8034c9a ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { 8034bf4: 2b00 cmp r3, #0 8034bf6: d050 beq.n 8034c9a 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); 8034bf8: 2101 movs r1, #1 8034bfa: 4630 mov r0, r6 8034bfc: f7ff fed4 bl 80349a8 /* could not find or create entry? */ if (i < 0) { 8034c00: 1e04 subs r4, r0, #0 8034c02: db4f blt.n 8034ca4 } return (err_t)i; } /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 8034c04: 4931 ldr r1, [pc, #196] ; (8034ccc ) 8034c06: 2214 movs r2, #20 8034c08: fb02 1304 mla r3, r2, r4, r1 8034c0c: 3310 adds r3, #16 8034c0e: 7898 ldrb r0, [r3, #2] 8034c10: b908 cbnz r0, 8034c16 arp_table[i].state = ETHARP_STATE_PENDING; 8034c12: 2001 movs r0, #1 8034c14: 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)) { 8034c16: fb02 1204 mla r2, r2, r4, r1 8034c1a: 7c93 ldrb r3, [r2, #18] 8034c1c: 2b01 cmp r3, #1 8034c1e: d000 beq.n 8034c22 8034c20: b935 cbnz r5, 8034c30 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 8034c22: 4638 mov r0, r7 8034c24: 4631 mov r1, r6 8034c26: f7ff ff7f bl 8034b28 8034c2a: 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) { 8034c2c: b90d cbnz r5, 8034c32 8034c2e: e036 b.n 8034c9e */ 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; 8034c30: 22ff movs r2, #255 ; 0xff } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 8034c32: 2314 movs r3, #20 8034c34: 4925 ldr r1, [pc, #148] ; (8034ccc ) 8034c36: 4363 muls r3, r4 8034c38: 18c8 adds r0, r1, r3 8034c3a: 7c80 ldrb r0, [r0, #18] 8034c3c: 2801 cmp r0, #1 8034c3e: d90b bls.n 8034c58 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 8034c40: 4a23 ldr r2, [pc, #140] ; (8034cd0 ) /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8034c42: 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); 8034c44: 7014 strb r4, [r2, #0] /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 8034c46: 4638 mov r0, r7 8034c48: 4629 mov r1, r5 8034c4a: f107 0227 add.w r2, r7, #39 ; 0x27 8034c4e: 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; } 8034c50: 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)); 8034c54: f7ff be76 b.w 8034944 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8034c58: d123 bne.n 8034ca2 8034c5a: 462b mov r3, r5 8034c5c: e003 b.n 8034c66 * 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) { 8034c5e: 7b1a ldrb r2, [r3, #12] 8034c60: 2a01 cmp r2, #1 8034c62: d128 bne.n 8034cb6 copy_needed = 1; break; } p = p->next; 8034c64: 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) { 8034c66: 2b00 cmp r3, #0 8034c68: d1f9 bne.n 8034c5e 8034c6a: e01e b.n 8034caa } 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) { 8034c6c: 4629 mov r1, r5 8034c6e: f7f9 f805 bl 802dc7c 8034c72: b120 cbz r0, 8034c7e pbuf_free(p); 8034c74: 4630 mov r0, r6 8034c76: f7f8 fefd bl 802da74 8034c7a: e024 b.n 8034cc6 /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); } /* packet could be taken over? */ if (p != NULL) { 8034c7c: 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) { 8034c7e: 2314 movs r3, #20 8034c80: 4a12 ldr r2, [pc, #72] ; (8034ccc ) 8034c82: fb03 f104 mul.w r1, r3, r4 8034c86: 4615 mov r5, r2 8034c88: 5850 ldr r0, [r2, r1] 8034c8a: 461f mov r7, r3 8034c8c: b108 cbz r0, 8034c92 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); 8034c8e: f7f8 fef1 bl 802da74 } arp_table[i].q = p; 8034c92: 437c muls r4, r7 8034c94: 512e str r6, [r5, r4] result = ERR_OK; 8034c96: 2400 movs r4, #0 8034c98: e004 b.n 8034ca4 /* 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; 8034c9a: 24f2 movs r4, #242 ; 0xf2 8034c9c: e002 b.n 8034ca4 /* 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; 8034c9e: 4604 mov r4, r0 8034ca0: e000 b.n 8034ca4 /* 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) { 8034ca2: 4614 mov r4, r2 8034ca4: b260 sxtb r0, r4 8034ca6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } } else { /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); 8034caa: 4628 mov r0, r5 8034cac: f7f8 ffbf bl 802dc2e } /* packet could be taken over? */ if (p != NULL) { 8034cb0: 2d00 cmp r5, #0 8034cb2: d1e3 bne.n 8034c7c 8034cb4: e007 b.n 8034cc6 } p = p->next; } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 8034cb6: 2003 movs r0, #3 8034cb8: 8919 ldrh r1, [r3, #8] 8034cba: 2200 movs r2, #0 8034cbc: f7f8 ff27 bl 802db0e if(p != NULL) { 8034cc0: 4606 mov r6, r0 8034cc2: 2800 cmp r0, #0 8034cc4: d1d2 bne.n 8034c6c 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; 8034cc6: 24ff movs r4, #255 ; 0xff 8034cc8: e7ec b.n 8034ca4 8034cca: bf00 nop 8034ccc: 2000e4b0 .word 0x2000e4b0 8034cd0: 2000e4ac .word 0x2000e4ac 08034cd4 : /** 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) { 8034cd4: 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) && 8034cd8: 4b10 ldr r3, [pc, #64] ; (8034d1c ) /** 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) { 8034cda: 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) && 8034cdc: 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) { 8034cde: 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) && 8034ce0: 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) { 8034ce4: 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) && 8034ce6: 7c8a ldrb r2, [r1, #18] 8034ce8: 2a02 cmp r2, #2 8034cea: f101 0410 add.w r4, r1, #16 8034cee: d108 bne.n 8034d02 8034cf0: 7cca ldrb r2, [r1, #19] 8034cf2: 2ae3 cmp r2, #227 ; 0xe3 8034cf4: d905 bls.n 8034d02 (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED)) { if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 8034cf6: 3104 adds r1, #4 8034cf8: f7ff ff16 bl 8034b28 8034cfc: b908 cbnz r0, 8034d02 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; 8034cfe: 2303 movs r3, #3 8034d00: 70a3 strb r3, [r4, #2] } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 8034d02: 4b06 ldr r3, [pc, #24] ; (8034d1c ) 8034d04: 2214 movs r2, #20 8034d06: fb02 3305 mla r3, r2, r5, r3 8034d0a: 4638 mov r0, r7 8034d0c: 4631 mov r1, r6 8034d0e: f107 0227 add.w r2, r7, #39 ; 0x27 8034d12: 330c adds r3, #12 &arp_table[arp_idx].ethaddr); } 8034d14: 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), 8034d18: f7ff be14 b.w 8034944 8034d1c: 2000e4b0 .word 0x2000e4b0 08034d20 : * - 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) { 8034d20: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8034d22: 4604 mov r4, r0 8034d24: 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) { 8034d26: 4608 mov r0, r1 8034d28: 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) { 8034d2a: 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) { 8034d2c: f7f8 fe77 bl 802da1e 8034d30: 2800 cmp r0, #0 8034d32: d163 bne.n 8034dfc /* 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)) { 8034d34: 6828 ldr r0, [r5, #0] 8034d36: 4621 mov r1, r4 8034d38: f7fb fd36 bl 80307a8 8034d3c: 2800 cmp r0, #0 8034d3e: d155 bne.n 8034dec /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { 8034d40: 682b ldr r3, [r5, #0] 8034d42: f003 02f0 and.w r2, r3, #240 ; 0xf0 8034d46: 2ae0 cmp r2, #224 ; 0xe0 8034d48: d114 bne.n 8034d74 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; 8034d4a: 2301 movs r3, #1 8034d4c: f88d 3000 strb.w r3, [sp] mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; 8034d50: 235e movs r3, #94 ; 0x5e 8034d52: f88d 3002 strb.w r3, [sp, #2] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8034d56: 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; 8034d58: f88d 0001 strb.w r0, [sp, #1] mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8034d5c: f003 037f and.w r3, r3, #127 ; 0x7f 8034d60: f88d 3003 strb.w r3, [sp, #3] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8034d64: 78ab ldrb r3, [r5, #2] 8034d66: f88d 3004 strb.w r3, [sp, #4] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8034d6a: 78eb ldrb r3, [r5, #3] 8034d6c: f88d 3005 strb.w r3, [sp, #5] /* destination Ethernet address is multicast */ dest = &mcastaddr; 8034d70: 466b mov r3, sp 8034d72: e03c b.n 8034dee /* 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)) && 8034d74: 6862 ldr r2, [r4, #4] 8034d76: ea83 0102 eor.w r1, r3, r2 8034d7a: 68a2 ldr r2, [r4, #8] 8034d7c: 4211 tst r1, r2 8034d7e: d009 beq.n 8034d94 !ip_addr_islinklocal(ipaddr)) { 8034d80: 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)) && 8034d82: f64f 62a9 movw r2, #65193 ; 0xfea9 8034d86: 4293 cmp r3, r2 8034d88: d004 beq.n 8034d94 router for forwarding". */ if (!ip_addr_islinklocal(&iphdr->src)) #endif /* LWIP_AUTOIP */ { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { 8034d8a: 68e3 ldr r3, [r4, #12] 8034d8c: f104 010c add.w r1, r4, #12 8034d90: b90b cbnz r3, 8034d96 8034d92: e035 b.n 8034e00 /* 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)) && 8034d94: 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) && 8034d96: 4b1c ldr r3, [pc, #112] ; (8034e08 ) 8034d98: 781a ldrb r2, [r3, #0] 8034d9a: 4b1c ldr r3, [pc, #112] ; (8034e0c ) 8034d9c: 2014 movs r0, #20 8034d9e: fb00 3302 mla r3, r0, r2, r3 8034da2: 7c98 ldrb r0, [r3, #18] 8034da4: 2801 cmp r0, #1 8034da6: d904 bls.n 8034db2 8034da8: 6808 ldr r0, [r1, #0] 8034daa: 685b ldr r3, [r3, #4] 8034dac: 4298 cmp r0, r3 8034dae: d100 bne.n 8034db2 8034db0: e00d b.n 8034dce 8034db2: 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) 8034db4: 4f15 ldr r7, [pc, #84] ; (8034e0c ) 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) && 8034db6: 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) 8034db8: 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) && 8034dba: 7c85 ldrb r5, [r0, #18] 8034dbc: 2d01 cmp r5, #1 8034dbe: d90b bls.n 8034dd8 8034dc0: 680d ldr r5, [r1, #0] 8034dc2: 6840 ldr r0, [r0, #4] 8034dc4: 4285 cmp r5, r0 8034dc6: d107 bne.n 8034dd8 (ip_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ ETHARP_SET_HINT(netif, i); 8034dc8: 4b0f ldr r3, [pc, #60] ; (8034e08 ) 8034dca: b2d2 uxtb r2, r2 8034dcc: 701a strb r2, [r3, #0] return etharp_output_to_arp_index(netif, q, i); 8034dce: 4620 mov r0, r4 8034dd0: 4631 mov r1, r6 8034dd2: f7ff ff7f bl 8034cd4 8034dd6: e014 b.n 8034e02 8034dd8: 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++) { 8034dda: 3201 adds r2, #1 8034ddc: 2bc8 cmp r3, #200 ; 0xc8 8034dde: b2d2 uxtb r2, r2 8034de0: d1ea bne.n 8034db8 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); 8034de2: 4620 mov r0, r4 8034de4: 4632 mov r2, r6 8034de6: f7ff fef5 bl 8034bd4 8034dea: e00a b.n 8034e02 * 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; 8034dec: 4b08 ldr r3, [pc, #32] ; (8034e10 ) } /* 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); 8034dee: 4620 mov r0, r4 8034df0: 4631 mov r1, r6 8034df2: f104 0227 add.w r2, r4, #39 ; 0x27 8034df6: f7ff fda5 bl 8034944 8034dfa: e002 b.n 8034e02 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; 8034dfc: 20fe movs r0, #254 ; 0xfe 8034dfe: e000 b.n 8034e02 /* 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; 8034e00: 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); } 8034e02: b240 sxtb r0, r0 8034e04: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 8034e06: bf00 nop 8034e08: 2000e4ac .word 0x2000e4ac 8034e0c: 2000e4b0 .word 0x2000e4b0 8034e10: 08041ce3 .word 0x08041ce3 08034e14 : * @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) { 8034e14: 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) { 8034e18: 8943 ldrh r3, [r0, #10] 8034e1a: 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) { 8034e1c: b087 sub sp, #28 8034e1e: 4604 mov r4, r0 8034e20: 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) { 8034e22: f240 80ed bls.w 8035000 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; 8034e26: 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) { 8034e28: 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; 8034e2a: 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) { 8034e2c: 07da lsls r2, r3, #31 8034e2e: d513 bpl.n 8034e58 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_MULTICAST_ADDR_0) { 8034e30: 2b01 cmp r3, #1 8034e32: d108 bne.n 8034e46 if ((ethhdr->dest.addr[1] == LL_MULTICAST_ADDR_1) && 8034e34: 7843 ldrb r3, [r0, #1] 8034e36: b97b cbnz r3, 8034e58 8034e38: 7883 ldrb r3, [r0, #2] 8034e3a: 2b5e cmp r3, #94 ; 0x5e 8034e3c: d10c bne.n 8034e58 (ethhdr->dest.addr[2] == LL_MULTICAST_ADDR_2)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 8034e3e: 7b63 ldrb r3, [r4, #13] 8034e40: f043 0310 orr.w r3, r3, #16 8034e44: e007 b.n 8034e56 } } else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 8034e46: 4972 ldr r1, [pc, #456] ; (8035010 ) 8034e48: 2206 movs r2, #6 8034e4a: f7ec fd4d bl 80218e8 8034e4e: b918 cbnz r0, 8034e58 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8034e50: 7b63 ldrb r3, [r4, #13] 8034e52: f043 0308 orr.w r3, r3, #8 8034e56: 7363 strb r3, [r4, #13] } } switch (type) { 8034e58: 2e08 cmp r6, #8 8034e5a: d004 beq.n 8034e66 8034e5c: f5b6 6fc1 cmp.w r6, #1544 ; 0x608 8034e60: f040 80ce bne.w 8035000 8034e64: e014 b.n 8034e90 #if LWIP_ARP /* IP packet? */ case PP_HTONS(ETHTYPE_IP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8034e66: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8034e6a: f003 0320 and.w r3, r3, #32 8034e6e: b2db uxtb r3, r3 8034e70: 2b00 cmp r3, #0 8034e72: f000 80c5 beq.w 8035000 #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)) { 8034e76: 4620 mov r0, r4 8034e78: f06f 010d mvn.w r1, #13 8034e7c: f7f8 fdcf bl 802da1e 8034e80: 2800 cmp r0, #0 8034e82: f040 80bd bne.w 8035000 LWIP_ASSERT("Can't move over header in packet", 0); goto free_and_return; } else { /* pass to IP layer */ ip_input(p, netif); 8034e86: 4620 mov r0, r4 8034e88: 4629 mov r1, r5 8034e8a: f7fb fda1 bl 80309d0 } break; 8034e8e: e0ba b.n 8035006 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8034e90: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 8034e94: f003 0320 and.w r3, r3, #32 8034e98: b2db uxtb r3, r3 8034e9a: 2b00 cmp r3, #0 8034e9c: f000 80b0 beq.w 8035000 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) { 8034ea0: 8963 ldrh r3, [r4, #10] 8034ea2: 2b29 cmp r3, #41 ; 0x29 8034ea4: d800 bhi.n 8034ea8 8034ea6: e0ab b.n 8035000 ETHARP_STATS_INC(etharp.drop); pbuf_free(p); return; } ethhdr = (struct eth_hdr *)p->payload; 8034ea8: 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)) || 8034eaa: 89f3 ldrh r3, [r6, #14] 8034eac: f5b3 7f80 cmp.w r3, #256 ; 0x100 8034eb0: f040 80a6 bne.w 8035000 8034eb4: 7cb3 ldrb r3, [r6, #18] 8034eb6: 2b06 cmp r3, #6 8034eb8: f040 80a2 bne.w 8035000 (hdr->hwlen != ETHARP_HWADDR_LEN) || 8034ebc: 7cf7 ldrb r7, [r6, #19] 8034ebe: 2f04 cmp r7, #4 8034ec0: f040 809e bne.w 8035000 (hdr->protolen != sizeof(ip_addr_t)) || 8034ec4: 8a33 ldrh r3, [r6, #16] 8034ec6: 2b08 cmp r3, #8 8034ec8: f040 809a bne.w 8035000 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); 8034ecc: f106 0a1c add.w sl, r6, #28 8034ed0: 4651 mov r1, sl 8034ed2: 463a mov r2, r7 8034ed4: a804 add r0, sp, #16 8034ed6: f7ec fd39 bl 802194c IPADDR2_COPY(&dipaddr, &hdr->dipaddr); 8034eda: f106 0226 add.w r2, r6, #38 ; 0x26 8034ede: 9203 str r2, [sp, #12] 8034ee0: 4611 mov r1, r2 8034ee2: a805 add r0, sp, #20 8034ee4: 463a mov r2, r7 8034ee6: f7ec fd31 bl 802194c /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { 8034eea: 686b ldr r3, [r5, #4] 8034eec: b12b cbz r3, 8034efa for_us = 0; } else { /* ARP packet directed to us? */ for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr)); 8034eee: 9a05 ldr r2, [sp, #20] 8034ef0: 1ad1 subs r1, r2, r3 8034ef2: 424a negs r2, r1 8034ef4: 414a adcs r2, r1 8034ef6: 9201 str r2, [sp, #4] 8034ef8: e000 b.n 8034efc 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; 8034efa: 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), 8034efc: 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) || 8034efe: 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), 8034f00: f106 0716 add.w r7, r6, #22 8034f04: 2b00 cmp r3, #0 8034f06: bf0c ite eq 8034f08: f04f 0802 moveq.w r8, #2 8034f0c: 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); 8034f10: 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) || 8034f14: 2800 cmp r0, #0 8034f16: d03d beq.n 8034f94 ip_addr_isbroadcast(ipaddr, netif) || 8034f18: 4629 mov r1, r5 8034f1a: f7fb fc45 bl 80307a8 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) || 8034f1e: 9002 str r0, [sp, #8] 8034f20: 2800 cmp r0, #0 8034f22: d137 bne.n 8034f94 ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { 8034f24: 9a04 ldr r2, [sp, #16] 8034f26: 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) || 8034f2a: 2ae0 cmp r2, #224 ; 0xe0 8034f2c: d032 beq.n 8034f94 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); 8034f2e: a804 add r0, sp, #16 8034f30: 4641 mov r1, r8 8034f32: f7ff fd39 bl 80349a8 /* bail out if no entry could be found */ if (i < 0) { 8034f36: 2800 cmp r0, #0 8034f38: db2c blt.n 8034f94 arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 8034f3a: 4b36 ldr r3, [pc, #216] ; (8035014 ) 8034f3c: f04f 0814 mov.w r8, #20 8034f40: fb08 f800 mul.w r8, r8, r0 8034f44: eb03 0108 add.w r1, r3, r8 8034f48: 2202 movs r2, #2 8034f4a: 748a strb r2, [r1, #18] } /* record network interface */ arp_table[i].netif = netif; 8034f4c: 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; 8034f4e: 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); 8034f52: 4628 mov r0, r5 8034f54: 3104 adds r1, #4 8034f56: 9300 str r3, [sp, #0] 8034f58: f7fd f908 bl 803216c 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); 8034f5c: 9b00 ldr r3, [sp, #0] 8034f5e: eb03 0008 add.w r0, r3, r8 8034f62: 2206 movs r2, #6 8034f64: 300c adds r0, #12 8034f66: 4639 mov r1, r7 8034f68: f7ec fcf0 bl 802194c /* reset time stamp */ arp_table[i].ctime = 0; 8034f6c: 9a02 ldr r2, [sp, #8] 8034f6e: 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) { 8034f72: 9b00 ldr r3, [sp, #0] 8034f74: f853 b008 ldr.w fp, [r3, r8] 8034f78: f1bb 0f00 cmp.w fp, #0 8034f7c: d00a beq.n 8034f94 struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 8034f7e: 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); 8034f82: 4628 mov r0, r5 8034f84: 4659 mov r1, fp 8034f86: 464a mov r2, r9 8034f88: 463b mov r3, r7 8034f8a: f7ff fcdb bl 8034944 /* free the queued IP packet */ pbuf_free(p); 8034f8e: 4658 mov r0, fp 8034f90: f7f8 fd70 bl 802da74 -> 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) { 8034f94: 8ab3 ldrh r3, [r6, #20] 8034f96: f5b3 7f80 cmp.w r3, #256 ; 0x100 8034f9a: d003 beq.n 8034fa4 8034f9c: f5b3 7f00 cmp.w r3, #512 ; 0x200 8034fa0: d12e bne.n 8035000 8034fa2: e029 b.n 8034ff8 * 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) { 8034fa4: 9b01 ldr r3, [sp, #4] 8034fa6: b35b cbz r3, 8035000 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); 8034fa8: 2002 movs r0, #2 8034faa: f7f7 fc25 bl 802c7f8 8034fae: 82b0 strh r0, [r6, #20] IPADDR2_COPY(&hdr->dipaddr, &hdr->sipaddr); 8034fb0: 4651 mov r1, sl 8034fb2: 2204 movs r2, #4 8034fb4: 9803 ldr r0, [sp, #12] 8034fb6: f7ec fcc9 bl 802194c IPADDR2_COPY(&hdr->sipaddr, &netif->ip_addr); 8034fba: 1d29 adds r1, r5, #4 8034fbc: 2204 movs r2, #4 8034fbe: 4650 mov r0, sl 8034fc0: f7ec fcc4 bl 802194c * '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); 8034fc4: 4639 mov r1, r7 8034fc6: 2206 movs r2, #6 8034fc8: f106 0020 add.w r0, r6, #32 8034fcc: f7ec fcbe bl 802194c #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, &hdr->shwaddr); 8034fd0: 4639 mov r1, r7 8034fd2: 2206 movs r2, #6 8034fd4: 4630 mov r0, r6 8034fd6: f7ec fcb9 bl 802194c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->shwaddr, ethaddr); 8034fda: 4649 mov r1, r9 8034fdc: 2206 movs r2, #6 8034fde: 4638 mov r0, r7 8034fe0: f7ec fcb4 bl 802194c ETHADDR16_COPY(ðhdr->src, ethaddr); 8034fe4: 4649 mov r1, r9 8034fe6: 1db0 adds r0, r6, #6 8034fe8: 2206 movs r2, #6 8034fea: f7ec fcaf bl 802194c /* 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); 8034fee: 69ab ldr r3, [r5, #24] 8034ff0: 4628 mov r0, r5 8034ff2: 4621 mov r1, r4 8034ff4: 4798 blx r3 8034ff6: e003 b.n 8035000 #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); 8034ff8: 4628 mov r0, r5 8034ffa: a904 add r1, sp, #16 8034ffc: f7f8 f8d2 bl 802d1a4 /* 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); 8035000: 4620 mov r0, r4 8035002: f7f8 fd37 bl 802da74 return ERR_OK; } 8035006: 2000 movs r0, #0 8035008: b007 add sp, #28 803500a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 803500e: bf00 nop 8035010: 08041ce3 .word 0x08041ce3 8035014: 2000e4b0 .word 0x2000e4b0 08035018 : return ERR_OK; } static void arp_timer(void *arg) { 8035018: b508 push {r3, lr} etharp_tmr(); 803501a: f7ff fd37 bl 8034a8c sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803501e: 4904 ldr r1, [pc, #16] ; (8035030 ) 8035020: f241 3088 movw r0, #5000 ; 0x1388 8035024: 2200 movs r2, #0 } 8035026: e8bd 4008 ldmia.w sp!, {r3, lr} static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 803502a: f7fa bfa9 b.w 802ff80 803502e: bf00 nop 8035030: 08035019 .word 0x08035019 08035034 : } } */ void ethernetif_input(void * pvParameters) { 8035034: 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) 8035038: f8df 80c4 ldr.w r8, [pc, #196] ; 8035100 } } */ void ethernetif_input(void * pvParameters) { 803503c: b085 sub sp, #20 struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 803503e: 2100 movs r1, #0 8035040: 2264 movs r2, #100 ; 0x64 8035042: f8d8 0000 ldr.w r0, [r8] 8035046: 460b mov r3, r1 8035048: f7f4 fb88 bl 802975c 803504c: 2801 cmp r0, #1 803504e: d1f6 bne.n 803503e } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 8035050: f8df a0b0 ldr.w sl, [pc, #176] ; 8035104 /* 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) 8035054: f8df 90b0 ldr.w r9, [pc, #176] ; 8035108 __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; /* Get received frame */ frame = ETH_Get_Received_Frame_interrupt(); 8035058: a801 add r0, sp, #4 803505a: f001 f95d bl 8036318 803505e: 9e03 ldr r6, [sp, #12] /* check that frame has no error */ if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) 8035060: 6837 ldr r7, [r6, #0] 8035062: f417 4700 ands.w r7, r7, #32768 ; 0x8000 8035066: d001 beq.n 803506c uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 8035068: 2400 movs r4, #0 803506a: e016 b.n 803509a /* 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); 803506c: 2003 movs r0, #3 803506e: 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; 8035072: 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); 8035076: 4602 mov r2, r0 8035078: f7f8 fd49 bl 802db0e /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) 803507c: 4604 mov r4, r0 803507e: 2800 cmp r0, #0 8035080: d0f2 beq.n 8035068 8035082: 4605 mov r5, r0 { for (q = p; q != NULL; q = q->next) { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); 8035084: 6868 ldr r0, [r5, #4] 8035086: 896a ldrh r2, [r5, #10] 8035088: eb0b 0107 add.w r1, fp, r7 803508c: f7ec fc5e bl 802194c l = l + q->len; 8035090: 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) 8035092: 682d ldr r5, [r5, #0] { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); l = l + q->len; 8035094: 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) 8035096: 2d00 cmp r5, #0 8035098: d1f4 bne.n 8035084 } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 803509a: f8da 3000 ldr.w r3, [sl] 803509e: 689a ldr r2, [r3, #8] 80350a0: 2a01 cmp r2, #1 { DMARxNextDesc = DMA_RX_FRAME_infos->FS_Rx_Desc; 80350a2: bf88 it hi 80350a4: 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; 80350a6: f04f 4000 mov.w r0, #2147483648 ; 0x80000000 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 80350aa: 2200 movs r2, #0 80350ac: e002 b.n 80350b4 } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 80350ae: 6030 str r0, [r6, #0] DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); 80350b0: 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++) 80350b2: 3201 adds r2, #1 80350b4: 6899 ldr r1, [r3, #8] 80350b6: 428a cmp r2, r1 80350b8: d3f9 bcc.n 80350ae DMARxNextDesc->Status = ETH_DMARxDesc_OWN; DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); } /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; 80350ba: 2200 movs r2, #0 80350bc: 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) 80350be: f8d9 3000 ldr.w r3, [r9] 80350c2: 061b lsls r3, r3, #24 80350c4: d504 bpl.n 80350d0 { /* Clear RBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_RBUS; 80350c6: 2380 movs r3, #128 ; 0x80 80350c8: f8c9 3000 str.w r3, [r9] /* Resume DMA reception */ ETH->DMARPDR = 0; 80350cc: 4b0a ldr r3, [pc, #40] ; (80350f8 ) 80350ce: 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) 80350d0: 2c00 cmp r4, #0 80350d2: d0b4 beq.n 803503e { if (ERR_OK != s_pxNetIf->input( p, s_pxNetIf)) 80350d4: 4b09 ldr r3, [pc, #36] ; (80350fc ) 80350d6: 6819 ldr r1, [r3, #0] 80350d8: 4620 mov r0, r4 80350da: 690b ldr r3, [r1, #16] 80350dc: 4798 blx r3 80350de: 4601 mov r1, r0 80350e0: b118 cbz r0, 80350ea { pbuf_free(p); 80350e2: 4620 mov r0, r4 80350e4: f7f8 fcc6 bl 802da74 80350e8: e7a9 b.n 803503e p=NULL; } else { xSemaphoreTake(s_xSemaphore, 0); 80350ea: f8d8 0000 ldr.w r0, [r8] 80350ee: 460a mov r2, r1 80350f0: 460b mov r3, r1 80350f2: f7f4 fb33 bl 802975c goto GET_NEXT_FRAGMENT; 80350f6: e7af b.n 8035058 80350f8: 40029008 .word 0x40029008 80350fc: 2000e578 .word 0x2000e578 8035100: 2000e57c .word 0x2000e57c 8035104: 200133a0 .word 0x200133a0 8035108: 40029014 .word 0x40029014 0803510c : * 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) { 803510c: b570 push {r4, r5, r6, lr} static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 803510e: 4e19 ldr r6, [pc, #100] ; (8035174 ) 8035110: 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) { 8035112: 460c mov r4, r1 static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 8035114: b95d cbnz r5, 803512e { vSemaphoreCreateBinary (xTxSemaphore); 8035116: 2001 movs r0, #1 8035118: 4629 mov r1, r5 803511a: 2203 movs r2, #3 803511c: f7f4 f9a1 bl 8029462 8035120: 6030 str r0, [r6, #0] 8035122: b120 cbz r0, 803512e 8035124: 4629 mov r1, r5 8035126: 462a mov r2, r5 8035128: 462b mov r3, r5 803512a: f7f4 f9d7 bl 80294dc } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) 803512e: 4b11 ldr r3, [pc, #68] ; (8035174 ) 8035130: 2100 movs r1, #0 8035132: 6818 ldr r0, [r3, #0] 8035134: 22fa movs r2, #250 ; 0xfa 8035136: 460b mov r3, r1 8035138: f7f4 fb10 bl 802975c 803513c: b1c0 cbz r0, 8035170 { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 803513e: 4b0e ldr r3, [pc, #56] ; (8035178 ) 8035140: 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; 8035142: 2500 movs r5, #0 vSemaphoreCreateBinary (xTxSemaphore); } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 8035144: 689e ldr r6, [r3, #8] 8035146: e007 b.n 8035158 for(q = p; q != NULL; q = q->next) { memcpy((u8_t*)&buffer[l], q->payload, q->len); 8035148: 1970 adds r0, r6, r5 803514a: 6861 ldr r1, [r4, #4] 803514c: 8962 ldrh r2, [r4, #10] 803514e: f7ec fbfd bl 802194c l = l + q->len; 8035152: 8963 ldrh r3, [r4, #10] } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8035154: 6824 ldr r4, [r4, #0] { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; 8035156: 18ed adds r5, r5, r3 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 8035158: 2c00 cmp r4, #0 803515a: d1f5 bne.n 8035148 { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; } ETH_Prepare_Transmit_Descriptors(l); 803515c: b2a8 uxth r0, r5 803515e: f001 f92b bl 80363b8 xSemaphoreGive(xTxSemaphore); 8035162: 4b04 ldr r3, [pc, #16] ; (8035174 ) 8035164: 4621 mov r1, r4 8035166: 6818 ldr r0, [r3, #0] 8035168: 4622 mov r2, r4 803516a: 4623 mov r3, r4 803516c: f7f4 f9b6 bl 80294dc } return ERR_OK; } 8035170: 2000 movs r0, #0 8035172: bd70 pop {r4, r5, r6, pc} 8035174: 2000e580 .word 0x2000e580 8035178: 20011534 .word 0x20011534 0803517c : #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 803517c: 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) { 803517e: b530 push {r4, r5, lr} #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 8035180: f880 302e strb.w r3, [r0, #46] ; 0x2e netif->name[1] = IFNAME1; 8035184: 2374 movs r3, #116 ; 0x74 8035186: f880 302f strb.w r3, [r0, #47] ; 0x2f netif->output = etharp_output; 803518a: 4b37 ldr r3, [pc, #220] ; (8035268 ) 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) 803518c: 4d37 ldr r5, [pc, #220] ; (803526c ) #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; 803518e: 6143 str r3, [r0, #20] netif->linkoutput = low_level_output; 8035190: 4b37 ldr r3, [pc, #220] ; (8035270 ) * @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) { 8035192: b087 sub sp, #28 netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; netif->linkoutput = low_level_output; 8035194: 6183 str r3, [r0, #24] { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 8035196: 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) { 8035198: 4604 mov r4, r0 { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 803519a: f880 3026 strb.w r3, [r0, #38] ; 0x26 /* set netif MAC hardware address */ SETTINGS_GetMac(mac); 803519e: a804 add r0, sp, #16 80351a0: f7f3 fb34 bl 802880c netif->hwaddr[0] = mac[0]; 80351a4: 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) 80351a8: 6829 ldr r1, [r5, #0] /* set netif MAC hardware address */ SETTINGS_GetMac(mac); netif->hwaddr[0] = mac[0]; 80351aa: f884 3027 strb.w r3, [r4, #39] ; 0x27 netif->hwaddr[1] = mac[1]; 80351ae: f89d 3011 ldrb.w r3, [sp, #17] 80351b2: f884 3028 strb.w r3, [r4, #40] ; 0x28 netif->hwaddr[2] = mac[2]; 80351b6: f89d 3012 ldrb.w r3, [sp, #18] 80351ba: f884 3029 strb.w r3, [r4, #41] ; 0x29 netif->hwaddr[3] = mac[3]; 80351be: f89d 3013 ldrb.w r3, [sp, #19] 80351c2: f884 302a strb.w r3, [r4, #42] ; 0x2a netif->hwaddr[4] = mac[4]; 80351c6: f89d 3014 ldrb.w r3, [sp, #20] 80351ca: f884 302b strb.w r3, [r4, #43] ; 0x2b netif->hwaddr[5] = mac[5]; 80351ce: f89d 3015 ldrb.w r3, [sp, #21] 80351d2: f884 302c strb.w r3, [r4, #44] ; 0x2c /* set netif maximum transfer unit */ netif->mtu = 1500; 80351d6: f240 53dc movw r3, #1500 ; 0x5dc 80351da: 84a3 strh r3, [r4, #36] ; 0x24 /* Accept broadcast address and ARP traffic */ netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 80351dc: 2322 movs r3, #34 ; 0x22 80351de: f884 302d strb.w r3, [r4, #45] ; 0x2d s_pxNetIf =netif; 80351e2: 4b24 ldr r3, [pc, #144] ; (8035274 ) 80351e4: 601c str r4, [r3, #0] /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 80351e6: b919 cbnz r1, 80351f0 { s_xSemaphore= xSemaphoreCreateCounting(20,0); 80351e8: 2014 movs r0, #20 80351ea: f7f4 f961 bl 80294b0 80351ee: 6028 str r0, [r5, #0] } /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); 80351f0: f104 0127 add.w r1, r4, #39 ; 0x27 80351f4: 2000 movs r0, #0 80351f6: f001 f877 bl 80362e8 /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 80351fa: 481f ldr r0, [pc, #124] ; (8035278 ) 80351fc: 491f ldr r1, [pc, #124] ; (803527c ) /* 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); 8035200: 2205 movs r2, #5 8035202: f001 f95f bl 80364c4 /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); 8035206: 481e ldr r0, [pc, #120] ; (8035280 ) 8035208: 491e ldr r1, [pc, #120] ; (8035284 ) 803520a: 2205 movs r2, #5 803520c: f001 f92e bl 803646c /* 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, 8035238: 2400 movs r4, #0 803523a: 2304 movs r3, #4 803523c: 2296 movs r2, #150 ; 0x96 803523e: e88d 0018 stmia.w sp, {r3, r4} 8035242: 4911 ldr r1, [pc, #68] ; (8035288 ) 8035244: 9402 str r4, [sp, #8] 8035246: 4623 mov r3, r4 8035248: 9403 str r4, [sp, #12] 803524a: 4810 ldr r0, [pc, #64] ; (803528c ) 803524c: f7f4 fb90 bl 8029970 netifINTERFACE_TASK_PRIORITY,NULL); /* Enable MAC and DMA transmission and reception */ ETH_Start(); 8035250: f001 f9b4 bl 80365bc /* initialize the hardware */ low_level_init(netif); etharp_init(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 8035254: f241 3088 movw r0, #5000 ; 0x1388 8035258: 490d ldr r1, [pc, #52] ; (8035290 ) 803525a: 4622 mov r2, r4 803525c: f7fa fe90 bl 802ff80 return ERR_OK; } 8035260: 4620 mov r0, r4 8035262: b007 add sp, #28 8035264: bd30 pop {r4, r5, pc} 8035266: bf00 nop 8035268: 08034d21 .word 0x08034d21 803526c: 2000e57c .word 0x2000e57c 8035270: 0803510d .word 0x0803510d 8035274: 2000e578 .word 0x2000e578 8035278: 20011538 .word 0x20011538 803527c: 20013444 .word 0x20013444 8035280: 200133a4 .word 0x200133a4 8035284: 200115d8 .word 0x200115d8 8035288: 08041cef .word 0x08041cef 803528c: 08035035 .word 0x08035035 8035290: 08035019 .word 0x08035019 08035294 : * 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 ) { 8035294: b510 push {r4, lr} err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 8035296: 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 ) { 8035298: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 803529a: 4608 mov r0, r1 803529c: 2104 movs r1, #4 803529e: f7f4 f8e0 bl 8029462 80352a2: 6020 str r0, [r4, #0] xReturn = ERR_OK; SYS_STATS_INC_USED( mbox ); } return xReturn; } 80352a4: 2800 cmp r0, #0 80352a6: bf14 ite ne 80352a8: 2000 movne r0, #0 80352aa: f06f 0000 mvneq.w r0, #0 80352ae: bd10 pop {r4, pc} 080352b0 : * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80352b0: b51f push {r0, r1, r2, r3, r4, lr} err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80352b2: 4a0b ldr r2, [pc, #44] ; (80352e0 ) * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 80352b4: 9101 str r1, [sp, #4] err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 80352b6: 6812 ldr r2, [r2, #0] { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80352b8: 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; 80352ba: 2300 movs r3, #0 80352bc: 9303 str r3, [sp, #12] if( xInsideISR != pdFALSE ) { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80352be: 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 ) 80352c0: b11a cbz r2, 80352ca { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 80352c2: aa03 add r2, sp, #12 80352c4: f7f4 f9ce bl 8029664 80352c8: e002 b.n 80352d0 } else { xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); 80352ca: 4613 mov r3, r2 80352cc: f7f4 f906 bl 80294dc 80352d0: b2c0 uxtb r0, r0 xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); } return xReturn; } 80352d2: 3801 subs r0, #1 80352d4: bf18 it ne 80352d6: f06f 0000 mvnne.w r0, #0 80352da: b005 add sp, #20 80352dc: bd00 pop {pc} 80352de: bf00 nop 80352e0: 2000e584 .word 0x2000e584 080352e4 : * 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 ) { 80352e4: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 80352e8: 4607 mov r7, r0 80352ea: 460c mov r4, r1 80352ec: 4690 mov r8, r2 void *pvDummy; TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 80352ee: f7f4 fca7 bl 8029c40 80352f2: 4605 mov r5, r0 if( NULL == ppvBuffer ) 80352f4: b904 cbnz r4, 80352f8 { ppvBuffer = &pvDummy; 80352f6: ac01 add r4, sp, #4 } if( ulTimeOut != 0UL ) 80352f8: f1b8 0f00 cmp.w r8, #0 80352fc: d015 beq.n 803532a { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); 80352fe: 4b13 ldr r3, [pc, #76] ; (803534c ) 8035300: 681e ldr r6, [r3, #0] 8035302: b116 cbz r6, 803530a 8035304: f7f5 f9dc bl 802a6c0 8035308: e7fe b.n 8035308 if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) 803530a: 6838 ldr r0, [r7, #0] 803530c: 4621 mov r1, r4 803530e: 4642 mov r2, r8 8035310: 4633 mov r3, r6 8035312: f7f4 fa23 bl 802975c 8035316: 2801 cmp r0, #1 8035318: d103 bne.n 8035322 { xEndTime = xTaskGetTickCount(); 803531a: f7f4 fc91 bl 8029c40 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; 803531e: 1b40 subs r0, r0, r5 8035320: e011 b.n 8035346 ulReturn = xElapsed; } else { /* Timed out. */ *ppvBuffer = NULL; 8035322: 6026 str r6, [r4, #0] ulReturn = SYS_ARCH_TIMEOUT; 8035324: f04f 30ff mov.w r0, #4294967295 8035328: e00d b.n 8035346 } } else { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); 803532a: 2300 movs r3, #0 803532c: 6838 ldr r0, [r7, #0] 803532e: 4621 mov r1, r4 8035330: f04f 32ff mov.w r2, #4294967295 8035334: f7f4 fa12 bl 802975c 8035338: 2801 cmp r0, #1 803533a: d1f6 bne.n 803532a xEndTime = xTaskGetTickCount(); 803533c: f7f4 fc80 bl 8029c40 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 8035340: 1b40 subs r0, r0, r5 8035342: bf08 it eq 8035344: 2001 moveq r0, #1 ulReturn = xElapsed; } return ulReturn; } 8035346: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 803534a: bf00 nop 803534c: 2000e584 .word 0x2000e584 08035350 : /** 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 ) { 8035350: b510 push {r4, lr} 8035352: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); 8035354: 2001 movs r0, #1 8035356: f7f4 f95b bl 8029610 803535a: 6020 str r0, [r4, #0] { SYS_STATS_INC( mutex.err ); } return xReturn; } 803535c: 2800 cmp r0, #0 803535e: bf14 ite ne 8035360: 2000 movne r0, #0 8035362: f06f 0000 mvneq.w r0, #0 8035366: bd10 pop {r4, pc} 08035368 : /** Lock a mutex * @param mutex the mutex to lock */ void sys_mutex_lock( sys_mutex_t *pxMutex ) { 8035368: b510 push {r4, lr} 803536a: 4604 mov r4, r0 while( xSemaphoreTake( *pxMutex, portMAX_DELAY ) != pdPASS ); 803536c: 2100 movs r1, #0 803536e: 6820 ldr r0, [r4, #0] 8035370: f04f 32ff mov.w r2, #4294967295 8035374: 460b mov r3, r1 8035376: f7f4 f9f1 bl 802975c 803537a: 2801 cmp r0, #1 803537c: d1f6 bne.n 803536c } 803537e: bd10 pop {r4, pc} 08035380 : /** Unlock a mutex * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *pxMutex ) { xSemaphoreGive( *pxMutex ); 8035380: 2100 movs r1, #0 8035382: 6800 ldr r0, [r0, #0] 8035384: 460a mov r2, r1 8035386: 460b mov r3, r1 8035388: f7f4 b8a8 b.w 80294dc 0803538c : *---------------------------------------------------------------------------* * Description: * Initialize sys arch *---------------------------------------------------------------------------*/ void sys_init(void) { 803538c: 4770 bx lr 0803538e : } u32_t sys_now(void) { return xTaskGetTickCount(); 803538e: f7f4 bc57 b.w 8029c40 08035392 : * 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 ) { 8035392: b570 push {r4, r5, r6, lr} 8035394: b086 sub sp, #24 8035396: 4606 mov r6, r0 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 8035398: 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 ) { 803539a: 4615 mov r5, r2 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 803539c: 9400 str r4, [sp, #0] 803539e: aa05 add r2, sp, #20 80353a0: 2400 movs r4, #0 80353a2: 9201 str r2, [sp, #4] 80353a4: 9402 str r4, [sp, #8] 80353a6: b29a uxth r2, r3 80353a8: 9403 str r4, [sp, #12] 80353aa: 4608 mov r0, r1 80353ac: 462b mov r3, r5 80353ae: 4631 mov r1, r6 80353b0: f7f4 fade bl 8029970 if( xResult == pdPASS ) 80353b4: 2801 cmp r0, #1 { xReturn = xCreatedTask; 80353b6: bf0c ite eq 80353b8: 9805 ldreq r0, [sp, #20] } else { xReturn = NULL; 80353ba: 4620 movne r0, r4 } return xReturn; } 80353bc: b006 add sp, #24 80353be: bd70 pop {r4, r5, r6, pc} 080353c0 : * operating system. * Outputs: * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ sys_prot_t sys_arch_protect( void ) { 80353c0: b508 push {r3, lr} if( xInsideISR == pdFALSE ) 80353c2: 4b03 ldr r3, [pc, #12] ; (80353d0 ) 80353c4: 681b ldr r3, [r3, #0] 80353c6: b90b cbnz r3, 80353cc { taskENTER_CRITICAL(); 80353c8: f7f5 f982 bl 802a6d0 } return ( sys_prot_t ) 1; } 80353cc: 2001 movs r0, #1 80353ce: bd08 pop {r3, pc} 80353d0: 2000e584 .word 0x2000e584 080353d4 : * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ void sys_arch_unprotect( sys_prot_t xValue ) { (void) xValue; if( xInsideISR == pdFALSE ) 80353d4: 4b02 ldr r3, [pc, #8] ; (80353e0 ) 80353d6: 681b ldr r3, [r3, #0] 80353d8: b90b cbnz r3, 80353de { taskEXIT_CRITICAL(); 80353da: f7f5 b9a5 b.w 802a728 80353de: 4770 bx lr 80353e0: 2000e584 .word 0x2000e584 080353e4 : * Если флаг не устанавливается в положенное время, то сбрасывается * флаг sSettings.sFlags.netsettingsChanged, сохраняется вся структура * настроек в памяти и контроллер перезагружается. */ void vTaskWebReinit(void * pvParameters) { 80353e4: b538 push {r3, r4, r5, lr} static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 80353e6: 4c20 ldr r4, [pc, #128] ; (8035468 ) if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 80353e8: 4d20 ldr r5, [pc, #128] ; (803546c ) static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 80353ea: 8823 ldrh r3, [r4, #0] 80353ec: 1c5a adds r2, r3, #1 80353ee: f5b3 7f16 cmp.w r3, #600 ; 0x258 80353f2: 8022 strh r2, [r4, #0] 80353f4: d914 bls.n 8035420 { SetWebReinitFlag(false); 80353f6: 2000 movs r0, #0 80353f8: f7f2 fe16 bl 8028028 HTTP_SaveSettings(); 80353fc: f7f7 f957 bl 802c6ae vTaskDelay(1010); 8035400: f240 30f2 movw r0, #1010 ; 0x3f2 8035404: f7f4 fd4e bl 8029ea4 8035408: f3bf 8f4f dsb sy (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 803540c: 4a18 ldr r2, [pc, #96] ; (8035470 ) 803540e: 4b19 ldr r3, [pc, #100] ; (8035474 ) 8035410: 68d1 ldr r1, [r2, #12] 8035412: f401 61e0 and.w r1, r1, #1792 ; 0x700 8035416: 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) | 8035418: 60d3 str r3, [r2, #12] 803541a: f3bf 8f4f dsb sy 803541e: e7fe b.n 803541e NVIC_SystemReset(); } if (fConfirmWebParams) 8035420: 4b15 ldr r3, [pc, #84] ; (8035478 ) 8035422: 781a ldrb r2, [r3, #0] 8035424: b1d2 cbz r2, 803545c { fConfirmWebParams = false; 8035426: 2200 movs r2, #0 /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8035428: 4814 ldr r0, [pc, #80] ; (803547c ) NVIC_SystemReset(); } if (fConfirmWebParams) { fConfirmWebParams = false; 803542a: 701a strb r2, [r3, #0] /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 803542c: f895 3063 ldrb.w r3, [r5, #99] ; 0x63 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8035430: f100 0131 add.w r1, r0, #49 ; 0x31 if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 8035434: f885 3032 strb.w r3, [r5, #50] ; 0x32 strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 8035438: f7ec fcbc bl 8021db4 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 803543c: 4810 ldr r0, [pc, #64] ; (8035480 ) 803543e: f100 0131 add.w r1, r0, #49 ; 0x31 8035442: f7ec fcb7 bl 8021db4 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 8035446: 480f ldr r0, [pc, #60] ; (8035484 ) 8035448: f100 0131 add.w r1, r0, #49 ; 0x31 803544c: f7ec fcb2 bl 8021db4 HTTP_SaveSettings(); 8035450: f7f7 f92d bl 802c6ae vTaskDelete(xHandleWebReinit); 8035454: 4b0c ldr r3, [pc, #48] ; (8035488 ) 8035456: 6818 ldr r0, [r3, #0] 8035458: f7f4 fb62 bl 8029b20 } vTaskDelay(1000); 803545c: f44f 707a mov.w r0, #1000 ; 0x3e8 8035460: f7f4 fd20 bl 8029ea4 } 8035464: e7c1 b.n 80353ea 8035466: bf00 nop 8035468: 2000e588 .word 0x2000e588 803546c: 2000e984 .word 0x2000e984 8035470: e000ed00 .word 0xe000ed00 8035474: 05fa0004 .word 0x05fa0004 8035478: 20002934 .word 0x20002934 803547c: 2000e986 .word 0x2000e986 8035480: 2000e996 .word 0x2000e996 8035484: 2000e9a6 .word 0x2000e9a6 8035488: 2000e58c .word 0x2000e58c 0803548c : * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 803548c: b530 push {r4, r5, lr} DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); if (sSettings.sFlags.netsettingsChanged == true) 803548e: 4d48 ldr r5, [pc, #288] ; (80355b0 ) * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 8035490: b085 sub sp, #20 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uint8_t DHCP_state; DHCP_state = DHCP_START; 8035492: 2400 movs r4, #0 for (;;) { switch (DHCP_state) 8035494: b11c cbz r4, 803549e 8035496: 2c01 cmp r4, #1 8035498: f040 8085 bne.w 80355a6 803549c: e004 b.n 80354a8 { case DHCP_START: { dhcp_start(&xnetif); 803549e: 4845 ldr r0, [pc, #276] ; (80355b4 ) 80354a0: f7f7 ffec bl 802d47c DHCP_state = DHCP_WAIT_ADDRESS; 80354a4: 2401 movs r4, #1 //PRINT_USART("\n\rLooking for DHCP server please wait...\n\r"); } break; 80354a6: e07e b.n 80355a6 case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 80354a8: 4842 ldr r0, [pc, #264] ; (80355b4 ) netmask = xnetif.netmask; 80354aa: 6882 ldr r2, [r0, #8] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 80354ac: 6843 ldr r3, [r0, #4] netmask = xnetif.netmask; 80354ae: 9202 str r2, [sp, #8] gw = xnetif.gw; 80354b0: 68c2 ldr r2, [r0, #12] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 80354b2: 9301 str r3, [sp, #4] netmask = xnetif.netmask; gw = xnetif.gw; 80354b4: 9203 str r2, [sp, #12] if (ipaddr.addr != 0) 80354b6: 2b00 cmp r3, #0 80354b8: d045 beq.n 8035546 { DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); 80354ba: f7f7 ffc7 bl 802d44c /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 80354be: f895 32fc ldrb.w r3, [r5, #764] ; 0x2fc { sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 80354c2: a801 add r0, sp, #4 DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 80354c4: b103 cbz r3, 80354c8 80354c6: e01b b.n 8035500 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)); 80354c8: f7fb fa58 bl 803097c 80354cc: 493a ldr r1, [pc, #232] ; (80355b8 ) 80354ce: 4602 mov r2, r0 80354d0: 483a ldr r0, [pc, #232] ; (80355bc ) 80354d2: f7f2 f965 bl 80277a0 sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); 80354d6: a802 add r0, sp, #8 80354d8: f7fb fa50 bl 803097c 80354dc: 4936 ldr r1, [pc, #216] ; (80355b8 ) 80354de: 4602 mov r2, r0 80354e0: 4837 ldr r0, [pc, #220] ; (80355c0 ) 80354e2: f7f2 f95d bl 80277a0 sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); 80354e6: a803 add r0, sp, #12 80354e8: f7fb fa48 bl 803097c 80354ec: 4932 ldr r1, [pc, #200] ; (80355b8 ) 80354ee: 4602 mov r2, r0 80354f0: 4834 ldr r0, [pc, #208] ; (80355c4 ) 80354f2: f7f2 f955 bl 80277a0 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 80354f6: f895 3032 ldrb.w r3, [r5, #50] ; 0x32 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 80354fa: 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; 80354fc: f885 3063 strb.w r3, [r5, #99] ; 0x63 sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 8035500: f7fb fa3c bl 803097c 8035504: 492c ldr r1, [pc, #176] ; (80355b8 ) 8035506: 4602 mov r2, r0 8035508: 482f ldr r0, [pc, #188] ; (80355c8 ) 803550a: f7f2 f949 bl 80277a0 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); 803550e: a802 add r0, sp, #8 8035510: f7fb fa34 bl 803097c 8035514: 4928 ldr r1, [pc, #160] ; (80355b8 ) 8035516: 4602 mov r2, r0 8035518: 482c ldr r0, [pc, #176] ; (80355cc ) 803551a: f7f2 f941 bl 80277a0 sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); 803551e: a803 add r0, sp, #12 8035520: f7fb fa2c bl 803097c 8035524: 4924 ldr r1, [pc, #144] ; (80355b8 ) 8035526: 4602 mov r2, r0 8035528: 4829 ldr r0, [pc, #164] ; (80355d0 ) 803552a: f7f2 f939 bl 80277a0 PRINT_USART("Gateway: "); PRINT_USART(ipaddr_ntoa(&gw)); PRINT_USART("\n\r"); vTaskDelay(50); 803552e: 2032 movs r0, #50 ; 0x32 8035530: f7f4 fcb8 bl 8029ea4 /* Установлен динамический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8035534: 2004 movs r0, #4 8035536: f000 fa1f bl 8035978 vTaskDelete(xHandleDHCP); 803553a: 4b26 ldr r3, [pc, #152] ; (80355d4 ) 803553c: 6818 ldr r0, [r3, #0] 803553e: f7f4 faef bl 8029b20 netmask = xnetif.netmask; gw = xnetif.gw; if (ipaddr.addr != 0) { DHCP_state = DHCP_ADDRESS_ASSIGNED; 8035542: 2402 movs r4, #2 8035544: e02f b.n 80355a6 vTaskDelete(xHandleDHCP); } else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) 8035546: 6a03 ldr r3, [r0, #32] 8035548: 7b5b ldrb r3, [r3, #13] 803554a: 2b03 cmp r3, #3 803554c: d92b bls.n 80355a6 { DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); 803554e: f7f7 ff7d bl 802d44c if (sSettings.sFlags.netsettingsChanged == true) 8035552: f895 32fc ldrb.w r3, [r5, #764] ; 0x2fc 8035556: b14b cbz r3, 803556c { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 8035558: 481b ldr r0, [pc, #108] ; (80355c8 ) 803555a: f7fb f9bc bl 80308d6 803555e: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 8035560: 481a ldr r0, [pc, #104] ; (80355cc ) 8035562: f7fb f9b8 bl 80308d6 8035566: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 8035568: 4819 ldr r0, [pc, #100] ; (80355d0 ) 803556a: e008 b.n 803557e } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 803556c: 4813 ldr r0, [pc, #76] ; (80355bc ) 803556e: f7fb f9b2 bl 80308d6 8035572: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8035574: 4812 ldr r0, [pc, #72] ; (80355c0 ) 8035576: f7fb f9ae bl 80308d6 803557a: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 803557c: 4811 ldr r0, [pc, #68] ; (80355c4 ) 803557e: f7fb f9aa bl 80308d6 } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 8035582: a901 add r1, sp, #4 8035584: aa02 add r2, sp, #8 8035586: 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); 8035588: 9003 str r0, [sp, #12] } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 803558a: 480a ldr r0, [pc, #40] ; (80355b4 ) 803558c: f7f8 f9ce bl 802d92c 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); 8035590: 2032 movs r0, #50 ; 0x32 8035592: f7f4 fc87 bl 8029ea4 /* Установлен статический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 8035596: 2004 movs r0, #4 8035598: f000 f9ee bl 8035978 vTaskDelete(xHandleDHCP); 803559c: 4b0d ldr r3, [pc, #52] ; (80355d4 ) 803559e: 6818 ldr r0, [r3, #0] 80355a0: f7f4 fabe bl 8029b20 else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) { DHCP_state = DHCP_TIMEOUT; 80355a4: 2403 movs r4, #3 break; default: break; } vTaskDelay(250); 80355a6: 20fa movs r0, #250 ; 0xfa 80355a8: f7f4 fc7c bl 8029ea4 } 80355ac: e772 b.n 8035494 80355ae: bf00 nop 80355b0: 2000e984 .word 0x2000e984 80355b4: 2001122c .word 0x2001122c 80355b8: 08036d46 .word 0x08036d46 80355bc: 2000e986 .word 0x2000e986 80355c0: 2000e9a6 .word 0x2000e9a6 80355c4: 2000e996 .word 0x2000e996 80355c8: 2000e9b7 .word 0x2000e9b7 80355cc: 2000e9d7 .word 0x2000e9d7 80355d0: 2000e9c7 .word 0x2000e9c7 80355d4: 2000e590 .word 0x2000e590 080355d8 : TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 80355d8: b530 push {r4, r5, lr} struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 80355da: 2000 movs r0, #0 sSettings.sFlags.netsettingsChanged = false; 80355dc: 4c36 ldr r4, [pc, #216] ; (80356b8 ) TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 80355de: b08d sub sp, #52 ; 0x34 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 80355e0: 4601 mov r1, r0 80355e2: f7f7 f8e7 bl 802c7b4 } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 80355e6: f894 5032 ldrb.w r5, [r4, #50] ; 0x32 struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); sSettings.sFlags.netsettingsChanged = false; 80355ea: 2300 movs r3, #0 80355ec: f884 32fc strb.w r3, [r4, #764] ; 0x2fc } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 80355f0: b125 cbz r5, 80355fc { ipaddr.addr = 0; 80355f2: 9304 str r3, [sp, #16] netmask.addr = 0; 80355f4: 9305 str r3, [sp, #20] gw.addr = 0; 80355f6: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 80355f8: 9300 str r3, [sp, #0] 80355fa: e028 b.n 803564e netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 80355fc: 1ca0 adds r0, r4, #2 80355fe: f7fb f96a bl 80308d6 8035602: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 8035604: f104 0022 add.w r0, r4, #34 ; 0x22 8035608: f7fb f965 bl 80308d6 803560c: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 803560e: f104 0012 add.w r0, r4, #18 8035612: f7fb f960 bl 80308d6 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 8035616: 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); 803561a: 9006 str r0, [sp, #24] /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 803561c: 1ca1 adds r1, r4, #2 803561e: 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; 8035622: f884 3063 strb.w r3, [r4, #99] ; 0x63 strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 8035626: f7ec fbc5 bl 8021db4 strcpy(sSettings.sWebTempParams.mask, sSettings.sWebParams.mask); 803562a: f104 0122 add.w r1, r4, #34 ; 0x22 803562e: f104 0053 add.w r0, r4, #83 ; 0x53 8035632: f7ec fbbf bl 8021db4 strcpy(sSettings.sWebTempParams.gate, sSettings.sWebParams.gate); 8035636: f104 0112 add.w r1, r4, #18 803563a: f104 0043 add.w r0, r4, #67 ; 0x43 803563e: f7ec fbb9 bl 8021db4 sprintf(str, " %s\n\r", sSettings.sWebParams.ip); 8035642: a807 add r0, sp, #28 8035644: 491d ldr r1, [pc, #116] ; (80356bc ) 8035646: 1ca2 adds r2, r4, #2 8035648: f7f2 f8aa bl 80277a0 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 803564c: 9500 str r5, [sp, #0] 803564e: 4b1c ldr r3, [pc, #112] ; (80356c0 ) 8035650: 481c ldr r0, [pc, #112] ; (80356c4 ) 8035652: 9301 str r3, [sp, #4] 8035654: 4b1c ldr r3, [pc, #112] ; (80356c8 ) 8035656: a904 add r1, sp, #16 8035658: aa05 add r2, sp, #20 803565a: 9302 str r3, [sp, #8] 803565c: ab06 add r3, sp, #24 803565e: f7f8 f973 bl 802d948 netif_set_default(&xnetif); 8035662: 4818 ldr r0, [pc, #96] ; (80356c4 ) 8035664: f7f8 f998 bl 802d998 netif_set_up(&xnetif); 8035668: 4816 ldr r0, [pc, #88] ; (80356c4 ) 803566a: f7f8 f9a5 bl 802d9b8 } if (sSettings.sWebParams.dhcpEnable) { 803566e: 4b12 ldr r3, [pc, #72] ; (80356b8 ) 8035670: f893 3032 ldrb.w r3, [r3, #50] ; 0x32 8035674: b17b cbz r3, 8035696 xTaskCreate(LwIP_DHCP_task, "DHCPClient", configMINIMAL_STACK_SIZE * 2, NULL, 8035676: 2302 movs r3, #2 8035678: 9300 str r3, [sp, #0] 803567a: 4b14 ldr r3, [pc, #80] ; (80356cc ) 803567c: 4814 ldr r0, [pc, #80] ; (80356d0 ) 803567e: 9301 str r3, [sp, #4] 8035680: 2300 movs r3, #0 8035682: 9302 str r3, [sp, #8] 8035684: 9303 str r3, [sp, #12] 8035686: f44f 7280 mov.w r2, #256 ; 0x100 803568a: 4912 ldr r1, [pc, #72] ; (80356d4 ) 803568c: f7f4 f970 bl 8029970 tskIDLE_PRIORITY + 2, &xHandleDHCP); dhcp = true; 8035690: 4b11 ldr r3, [pc, #68] ; (80356d8 ) 8035692: 2201 movs r2, #1 8035694: 701a strb r2, [r3, #0] } } /* Если настройки изменились, запускаем задачу по отсчету времени реакции пользователя*/ if (sSettings.sFlags.netsettingsChanged == true) 8035696: 4b08 ldr r3, [pc, #32] ; (80356b8 ) 8035698: f893 32fc ldrb.w r3, [r3, #764] ; 0x2fc 803569c: b153 cbz r3, 80356b4 xTaskCreate(vTaskWebReinit, "webReinit", configMINIMAL_STACK_SIZE, NULL, 803569e: 4a0f ldr r2, [pc, #60] ; (80356dc ) 80356a0: 480f ldr r0, [pc, #60] ; (80356e0 ) 80356a2: 9201 str r2, [sp, #4] 80356a4: 2300 movs r3, #0 80356a6: 9300 str r3, [sp, #0] 80356a8: 9302 str r3, [sp, #8] 80356aa: 9303 str r3, [sp, #12] 80356ac: 490d ldr r1, [pc, #52] ; (80356e4 ) 80356ae: 2280 movs r2, #128 ; 0x80 80356b0: f7f4 f95e bl 8029970 tskIDLE_PRIORITY, &xHandleWebReinit); } 80356b4: b00d add sp, #52 ; 0x34 80356b6: bd30 pop {r4, r5, pc} 80356b8: 2000e984 .word 0x2000e984 80356bc: 08041cf6 .word 0x08041cf6 80356c0: 0803517d .word 0x0803517d 80356c4: 2001122c .word 0x2001122c 80356c8: 0802c775 .word 0x0802c775 80356cc: 2000e590 .word 0x2000e590 80356d0: 0803548d .word 0x0803548d 80356d4: 08041cfc .word 0x08041cfc 80356d8: 2000e58a .word 0x2000e58a 80356dc: 2000e58c .word 0x2000e58c 80356e0: 080353e5 .word 0x080353e5 80356e4: 08041d07 .word 0x08041d07 080356e8 : /** * @brief Возвращает true если сетевые параметры изменились */ bool GetStateWebReinit(void) { 80356e8: b510 push {r4, lr} /* Статус dhcp изменился? */ if (sSettings.sWebParams.dhcpEnable != sSettings.sWebTempParams.dhcpEnable) 80356ea: 4c12 ldr r4, [pc, #72] ; (8035734 ) 80356ec: f894 2032 ldrb.w r2, [r4, #50] ; 0x32 80356f0: f894 3063 ldrb.w r3, [r4, #99] ; 0x63 80356f4: 429a cmp r2, r3 80356f6: d004 beq.n 8035702 { /* Включили dhcp */ if (sSettings.sWebTempParams.dhcpEnable == 1) { /* Устанавилваем флаг */ SetWebReinitFlag(true); 80356f8: 2001 movs r0, #1 80356fa: f7f2 fc95 bl 8028028 return true; 80356fe: 2001 movs r0, #1 8035700: bd10 pop {r4, pc} return true; } } /* Изменился IP? */ if (strstr(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip) == 0) 8035702: 1ca0 adds r0, r4, #2 8035704: f104 0133 add.w r1, r4, #51 ; 0x33 8035708: f7ec fe32 bl 8022370 803570c: 2800 cmp r0, #0 803570e: d0f3 beq.n 80356f8 SetWebReinitFlag(true); return true; } /* Изменился шлюз? */ if (strstr(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate) == 0) 8035710: f104 0012 add.w r0, r4, #18 8035714: f104 0143 add.w r1, r4, #67 ; 0x43 8035718: f7ec fe2a bl 8022370 803571c: 2800 cmp r0, #0 803571e: d0eb beq.n 80356f8 SetWebReinitFlag(true); return true; } /* Изменилась маска? */ if (strstr(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask) == 0) 8035720: f104 0022 add.w r0, r4, #34 ; 0x22 8035724: f104 0153 add.w r1, r4, #83 ; 0x53 8035728: f7ec fe22 bl 8022370 803572c: 2800 cmp r0, #0 803572e: d0e3 beq.n 80356f8 /* Устанавилваем флаг */ SetWebReinitFlag(true); return true; } return false; 8035730: 2000 movs r0, #0 } 8035732: bd10 pop {r4, pc} 8035734: 2000e984 .word 0x2000e984 08035738 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8035738: 4613 mov r3, r2 u8_t id; id = od->id_inst_ptr[0]; 803573a: 6882 ldr r2, [r0, #8] switch (id) 803573c: 7812 ldrb r2, [r2, #0] 803573e: 3a01 subs r2, #1 \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 8035740: b510 push {r4, lr} 8035742: 460c mov r4, r1 u8_t id; id = od->id_inst_ptr[0]; switch (id) 8035744: 2a11 cmp r2, #17 8035746: d814 bhi.n 8035772 8035748: e8df f002 tbb [pc, r2] 803574c: 0c09090c .word 0x0c09090c 8035750: 09090c0c .word 0x09090c0c 8035754: 0c0c0c0c .word 0x0c0c0c0c 8035758: 0c0c0c0c .word 0x0c0c0c0c 803575c: 0c0c .short 0x0c0c break; case 7: /* BatTest */ *((s32_t*)value) = 0; break; case 8: /* Shutdown UPS */ *((s32_t*)value) = 0; 803575e: 2200 movs r2, #0 8035760: 601a str r2, [r3, #0] break; 8035762: 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); 8035764: 4903 ldr r1, [pc, #12] ; (8035774 ) 8035766: 4618 mov r0, r3 8035768: 4622 mov r2, r4 break; default : break; }; } 803576a: 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); 803576e: f7fc bb5f b.w 8031e30 8035772: bd10 pop {r4, pc} 8035774: 20011378 .word 0x20011378 08035778 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 8035778: 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) { 803577a: b538 push {r3, r4, r5, lr} 803577c: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 803577e: f040 8081 bne.w 8035884 { od->id_inst_len = ident_len; 8035782: 2302 movs r3, #2 8035784: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 8035786: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 8035788: 60a2 str r2, [r4, #8] id = ident[0]; switch (id) 803578a: f811 2c04 ldrb.w r2, [r1, #-4] 803578e: 3a01 subs r2, #1 8035790: 2a11 cmp r2, #17 8035792: d877 bhi.n 8035884 8035794: e8df f002 tbb [pc, r2] 8035798: 0f242409 .word 0x0f242409 803579c: 2a241a15 .word 0x2a241a15 80357a0: 453f3932 .word 0x453f3932 80357a4: 5d57514b .word 0x5d57514b 80357a8: 6963 .short 0x6963 { case 1: /* FWVersion */ GetVersionStr(paramStr, ¶mLength); 80357aa: 4d38 ldr r5, [pc, #224] ; (803588c ) 80357ac: 4838 ldr r0, [pc, #224] ; (8035890 ) 80357ae: 4629 mov r1, r5 80357b0: f7f2 fa36 bl 8027c20 80357b4: e05e b.n 8035874 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); 80357b6: 4d35 ldr r5, [pc, #212] ; (803588c ) 80357b8: 4835 ldr r0, [pc, #212] ; (8035890 ) 80357ba: 4629 mov r1, r5 80357bc: f7f2 fa9c bl 8027cf8 80357c0: e058 b.n 8035874 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); 80357c2: 4d32 ldr r5, [pc, #200] ; (803588c ) 80357c4: 4832 ldr r0, [pc, #200] ; (8035890 ) 80357c6: 4629 mov r1, r5 80357c8: 2200 movs r2, #0 80357ca: e003 b.n 80357d4 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); 80357cc: 4d2f ldr r5, [pc, #188] ; (803588c ) 80357ce: 4830 ldr r0, [pc, #192] ; (8035890 ) 80357d0: 4629 mov r1, r5 80357d2: 2201 movs r2, #1 80357d4: f7f2 f9a2 bl 8027b1c od->instance = MIB_OBJECT_SCALAR; 80357d8: 2301 movs r3, #1 80357da: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 80357dc: 2303 movs r3, #3 80357de: e04b b.n 8035878 od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* BatTest*/ od->instance = MIB_OBJECT_SCALAR; 80357e0: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; 80357e2: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_INTEG; 80357e4: 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; 80357e6: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); 80357e8: 2304 movs r3, #4 80357ea: e049 b.n 8035880 break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_WRITE_ONLY; 80357ec: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 80357ee: 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; 80357f0: 2201 movs r2, #1 od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; 80357f2: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 80357f4: 4b25 ldr r3, [pc, #148] ; (803588c ) od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 8: /* Shutdown UPS*/ od->instance = MIB_OBJECT_SCALAR; 80357f6: 7022 strb r2, [r4, #0] od->access = MIB_OBJECT_WRITE_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; 80357f8: 781b ldrb r3, [r3, #0] 80357fa: e041 b.n 8035880 break; case 9: /* DIO*/ GetDINStatusStr(paramStr, ¶mLength, 0); 80357fc: 4d23 ldr r5, [pc, #140] ; (803588c ) 80357fe: 4824 ldr r0, [pc, #144] ; (8035890 ) 8035800: 4629 mov r1, r5 8035802: 2200 movs r2, #0 8035804: f7f2 f950 bl 8027aa8 8035808: e034 b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 10: /* IntTemp */ GetInternalTempStr(paramStr, ¶mLength); 803580a: 4d20 ldr r5, [pc, #128] ; (803588c ) 803580c: 4820 ldr r0, [pc, #128] ; (8035890 ) 803580e: 4629 mov r1, r5 8035810: f7f2 f86a bl 80278e8 8035814: e02e b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 11: /* InFreq */ GetInputFreqStr(paramStr, ¶mLength); 8035816: 4d1d ldr r5, [pc, #116] ; (803588c ) 8035818: 481d ldr r0, [pc, #116] ; (8035890 ) 803581a: 4629 mov r1, r5 803581c: f7f1 ffd6 bl 80277cc 8035820: e028 b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 12: /* InVoltVAC */ GetInputVoltageStr(paramStr, ¶mLength); 8035822: 4d1a ldr r5, [pc, #104] ; (803588c ) 8035824: 481a ldr r0, [pc, #104] ; (8035890 ) 8035826: 4629 mov r1, r5 8035828: f7f1 fffc bl 8027824 803582c: e022 b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 13: /* OutVoltVAC */ GetOutputVoltageStr(paramStr, ¶mLength); 803582e: 4d17 ldr r5, [pc, #92] ; (803588c ) 8035830: 4817 ldr r0, [pc, #92] ; (8035890 ) 8035832: 4629 mov r1, r5 8035834: f7f2 f80c bl 8027850 8035838: e01c b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 14: /* Power */ GetPowerStr(paramStr, ¶mLength); 803583a: 4d14 ldr r5, [pc, #80] ; (803588c ) 803583c: 4814 ldr r0, [pc, #80] ; (8035890 ) 803583e: 4629 mov r1, r5 8035840: f7f2 f81c bl 802787c 8035844: e016 b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 15: /* BatCap */ GetBatCapacityStr(paramStr, ¶mLength); 8035846: 4d11 ldr r5, [pc, #68] ; (803588c ) 8035848: 4811 ldr r0, [pc, #68] ; (8035890 ) 803584a: 4629 mov r1, r5 803584c: f7f2 f828 bl 80278a0 8035850: e010 b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 16: /* BatTime */ GetRuntimeStr(paramStr, ¶mLength); 8035852: 4d0e ldr r5, [pc, #56] ; (803588c ) 8035854: 480e ldr r0, [pc, #56] ; (8035890 ) 8035856: 4629 mov r1, r5 8035858: f7f2 f834 bl 80278c4 803585c: e00a b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 17: /* ConnectMonitor */ GetConnectMonitorStr(paramStr, ¶mLength); 803585e: 4d0b ldr r5, [pc, #44] ; (803588c ) 8035860: 480b ldr r0, [pc, #44] ; (8035890 ) 8035862: 4629 mov r1, r5 8035864: f7f2 f856 bl 8027914 8035868: e004 b.n 8035874 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 18: /* Alarms */ GetAlarmStr(paramStr, ¶mLength); 803586a: 4d08 ldr r5, [pc, #32] ; (803588c ) 803586c: 4808 ldr r0, [pc, #32] ; (8035890 ) 803586e: 4629 mov r1, r5 8035870: f7f2 f856 bl 8027920 od->instance = MIB_OBJECT_SCALAR; 8035874: 2301 movs r3, #1 8035876: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8035878: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 803587a: 2304 movs r3, #4 803587c: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 803587e: 782b ldrb r3, [r5, #0] 8035880: 80a3 strh r3, [r4, #4] break; 8035882: bd38 pop {r3, r4, r5, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("planar_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 8035884: 2300 movs r3, #0 8035886: 7023 strb r3, [r4, #0] 8035888: bd38 pop {r3, r4, r5, pc} 803588a: bf00 nop 803588c: 2000e594 .word 0x2000e594 8035890: 20011378 .word 0x20011378 08035894 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_set_value (struct obj_def *od, u16_t len, void *value) { 8035894: b508 push {r3, lr} u8_t id; uint32_t val; char *val_string; id = od->id_inst_ptr[0]; 8035896: 6883 ldr r3, [r0, #8] switch (id) 8035898: 781b ldrb r3, [r3, #0] 803589a: 3b02 subs r3, #2 803589c: 2b04 cmp r3, #4 803589e: d82f bhi.n 8035900 80358a0: e8df f003 tbb [pc, r3] 80358a4: 152e0d03 .word 0x152e0d03 80358a8: 20 .byte 0x20 80358a9: 00 .byte 0x00 { case 2: /* RestoreSignal */ val = *((s32_t*)value); if (val == 1) { 80358aa: 6813 ldr r3, [r2, #0] 80358ac: 2b01 cmp r3, #1 80358ae: d127 bne.n 8035900 SNMP_SendUserTrap(DEVICE_RESTORED); 80358b0: 2003 movs r0, #3 80358b2: f000 f861 bl 8035978 break; default : break; }; } 80358b6: e8bd 4008 ldmia.w sp!, {r3, lr} { case 2: /* RestoreSignal */ val = *((s32_t*)value); if (val == 1) { SNMP_SendUserTrap(DEVICE_RESTORED); HTTP_ResetSettings(); 80358ba: f7f6 bef1 b.w 802c6a0 } break; case 3: /* RebootSignal */ val = *((s32_t*)value); if (val == 1) 80358be: 6813 ldr r3, [r2, #0] 80358c0: 2b01 cmp r3, #1 80358c2: d11d bne.n 8035900 HTTP_StartResetTask(false); 80358c4: 2000 movs r0, #0 break; default : break; }; } 80358c6: e8bd 4008 ldmia.w sp!, {r3, lr} } break; case 3: /* RebootSignal */ val = *((s32_t*)value); if (val == 1) HTTP_StartResetTask(false); 80358ca: f7f6 bef9 b.w 802c6c0 break; case 5: /* DO1 */ if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET){ 80358ce: 4b0d ldr r3, [pc, #52] ; (8035904 ) 80358d0: f893 3378 ldrb.w r3, [r3, #888] ; 0x378 80358d4: 2b03 cmp r3, #3 80358d6: d113 bne.n 8035900 val_string = (char*)value; SetROStr(val_string, 0); 80358d8: 4610 mov r0, r2 80358da: 2100 movs r1, #0 80358dc: f7f2 fd6c bl 80283b8 SNMP_SendUserTrap(DO0_TOGGLED); 80358e0: 2007 movs r0, #7 80358e2: e009 b.n 80358f8 } break; case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ 80358e4: 4b07 ldr r3, [pc, #28] ; (8035904 ) 80358e6: f893 3379 ldrb.w r3, [r3, #889] ; 0x379 80358ea: 2b03 cmp r3, #3 80358ec: d108 bne.n 8035900 val_string = (char*)value; SetROStr(val_string, 1); 80358ee: 4610 mov r0, r2 80358f0: 2101 movs r1, #1 80358f2: f7f2 fd61 bl 80283b8 SNMP_SendUserTrap(DO1_TOGGLED); 80358f6: 2008 movs r0, #8 break; default : break; }; } 80358f8: e8bd 4008 ldmia.w sp!, {r3, lr} break; case 6: /* DO2 */ if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET){ val_string = (char*)value; SetROStr(val_string, 1); SNMP_SendUserTrap(DO1_TOGGLED); 80358fc: f000 b83c b.w 8035978 8035900: bd08 pop {r3, pc} 8035902: bf00 nop 8035904: 2000e984 .word 0x2000e984 08035908 : \param value - указатель на значение переменной \return 0 - некорректное значение 1 - корректное значение ------------------------------------------------------------------------------*/ static u8_t signals_set_test (struct obj_def *od, u16_t len, void *value) { 8035908: b508 push {r3, lr} u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; 803590a: 6883 ldr r3, [r0, #8] switch (id) 803590c: 781b ldrb r3, [r3, #0] 803590e: 3b02 subs r3, #2 8035910: 2b04 cmp r3, #4 8035912: d81f bhi.n 8035954 8035914: e8df f003 tbb [pc, r3] 8035918: 051e0303 .word 0x051e0303 803591c: 14 .byte 0x14 803591d: 00 .byte 0x00 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 803591e: 2904 cmp r1, #4 8035920: e00a b.n 8035938 { set_ok = 1; } break; case 5: /* DO1 */ if ( len >= 1 ) 8035922: b901 cbnz r1, 8035926 8035924: e016 b.n 8035954 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8035926: 4610 mov r0, r2 8035928: f7eb ffaa bl 8021880 803592c: 2801 cmp r0, #1 803592e: dc11 bgt.n 8035954 if(sSettings.sInOuts.ro_type_source[0] == SNMP_SET) 8035930: 4b09 ldr r3, [pc, #36] ; (8035958 ) 8035932: f893 0378 ldrb.w r0, [r3, #888] ; 0x378 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 8035936: 2803 cmp r0, #3 8035938: bf14 ite ne 803593a: 2000 movne r0, #0 803593c: 2001 moveq r0, #1 803593e: bd08 pop {r3, pc} set_ok = 1; } } break; case 6: /* DO2 */ if ( len >= 1 ) 8035940: b141 cbz r1, 8035954 { val_string = (char*)value; if(atoi(val_string) <= 1){ 8035942: 4610 mov r0, r2 8035944: f7eb ff9c bl 8021880 8035948: 2801 cmp r0, #1 803594a: dc03 bgt.n 8035954 if(sSettings.sInOuts.ro_type_source[1] == SNMP_SET) 803594c: 4b02 ldr r3, [pc, #8] ; (8035958 ) 803594e: f893 0379 ldrb.w r0, [r3, #889] ; 0x379 8035952: e7f0 b.n 8035936 { u8_t id, set_ok; char *val_string; LWIP_UNUSED_ARG(value); set_ok = 0; 8035954: 2000 movs r0, #0 break; }; return set_ok; } 8035956: bd08 pop {r3, pc} 8035958: 2000e984 .word 0x2000e984 0803595c : /** * @brief Системный тик SNMP. Таск должен вызываться с частотой 100Гц. * @retval */ void SNMP_SysUpTimeTask(void *arg) { 803595c: b513 push {r0, r1, r4, lr} TickType_t xLastWakeTime; const TickType_t xFrequency = 10; xLastWakeTime = xTaskGetTickCount(); 803595e: f7f4 f96f bl 8029c40 8035962: ac02 add r4, sp, #8 8035964: f844 0d04 str.w r0, [r4, #-4]! while(1) { vTaskDelayUntil( &xLastWakeTime, xFrequency ); 8035968: 4620 mov r0, r4 803596a: 210a movs r1, #10 803596c: f7f4 facc bl 8029f08 snmp_inc_sysuptime(); 8035970: f7fc fb7c bl 803206c 8035974: e7f8 b.n 8035968 8035976: 0000 movs r0, r0 08035978 : * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 8035978: b51f push {r0, r1, r2, r3, r4, lr} uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 803597a: 4b0d ldr r3, [pc, #52] ; (80359b0 ) * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 803597c: f88d 0007 strb.w r0, [sp, #7] uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 8035980: eb03 00c0 add.w r0, r3, r0, lsl #3 8035984: 78c3 ldrb r3, [r0, #3] 8035986: b193 cbz r3, 80359ae { availableSpace = uxQueueSpacesAvailable(SNMP_TrapQueue); 8035988: 4c0a ldr r4, [pc, #40] ; (80359b4 ) 803598a: 6820 ldr r0, [r4, #0] 803598c: f7f3 ff89 bl 80298a2 if (availableSpace == 0) 8035990: b282 uxth r2, r0 8035992: b92a cbnz r2, 80359a0 xQueueReceive(SNMP_TrapQueue, &dummyTrap, 0); 8035994: 6820 ldr r0, [r4, #0] 8035996: f10d 010f add.w r1, sp, #15 803599a: 4613 mov r3, r2 803599c: f7f3 fede bl 802975c xQueueSend(SNMP_TrapQueue, &trapName, 0); 80359a0: 2200 movs r2, #0 80359a2: 6820 ldr r0, [r4, #0] 80359a4: f10d 0107 add.w r1, sp, #7 80359a8: 4613 mov r3, r2 80359aa: f7f3 fd97 bl 80294dc } } 80359ae: bd1f pop {r0, r1, r2, r3, r4, pc} 80359b0: 2001147c .word 0x2001147c 80359b4: 20011478 .word 0x20011478 080359b8 : * @brief Установить SNMP Descriptor * @retval */ // TODO void SNMP_SetObjDescr(void) { 80359b8: b538 push {r3, r4, r5, lr} static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 80359ba: 4c15 ldr r4, [pc, #84] ; (8035a10 ) strcat(sSettings.sSnmp.sysDescr, " "); 80359bc: 4d15 ldr r5, [pc, #84] ; (8035a14 ) // TODO void SNMP_SetObjDescr(void) { static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 80359be: f104 01fa add.w r1, r4, #250 ; 0xfa 80359c2: 4620 mov r0, r4 80359c4: f7ec f9f6 bl 8021db4 strcat(sSettings.sSnmp.sysDescr, " "); 80359c8: 4629 mov r1, r5 80359ca: 4620 mov r0, r4 80359cc: f7ec f8de bl 8021b8c strcat(sSettings.sSnmp.sysDescr, VERSION); 80359d0: 4620 mov r0, r4 80359d2: 4911 ldr r1, [pc, #68] ; (8035a18 ) 80359d4: f7ec f8da bl 8021b8c strcat(sSettings.sSnmp.sysDescr, " "); 80359d8: 4629 mov r1, r5 80359da: 4620 mov r0, r4 80359dc: f7ec f8d6 bl 8021b8c strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); 80359e0: f104 01c8 add.w r1, r4, #200 ; 0xc8 80359e4: 4620 mov r0, r4 80359e6: f7ec f8d1 bl 8021b8c strcat(sSettings.sSnmp.sysDescr, " "); 80359ea: 4629 mov r1, r5 80359ec: 4620 mov r0, r4 80359ee: f7ec f8cd bl 8021b8c strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); 80359f2: 490a ldr r1, [pc, #40] ; (8035a1c ) 80359f4: 4620 mov r0, r4 80359f6: f7ec f8c9 bl 8021b8c len = strlen(sSettings.sSnmp.sysDescr); 80359fa: 4620 mov r0, r4 80359fc: f7ec fa38 bl 8021e70 8035a00: 4907 ldr r1, [pc, #28] ; (8035a20 ) 8035a02: 7008 strb r0, [r1, #0] snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 8035a04: 4620 mov r0, r4 } 8035a06: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); strcat(sSettings.sSnmp.sysDescr, " "); strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); len = strlen(sSettings.sSnmp.sysDescr); snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 8035a0a: f7fc bb1b b.w 8032044 8035a0e: bf00 nop 8035a10: 2000e9e8 .word 0x2000e9e8 8035a14: 08036e41 .word 0x08036e41 8035a18: 08036d64 .word 0x08036d64 8035a1c: 2000ec02 .word 0x2000ec02 8035a20: 2000e595 .word 0x2000e595 08035a24 : /** * @brief Установить SNMP Community для чтения */ void SNMP_SetReadCommunity(char *comm) { 8035a24: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, comm); 8035a26: 4801 ldr r0, [pc, #4] ; (8035a2c ) 8035a28: f7ec b9c4 b.w 8021db4 8035a2c: 2000ea88 .word 0x2000ea88 08035a30 : /** * @brief Установить SNMP Community для записи */ void SNMP_SetWriteCommunity(char *comm) { 8035a30: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, comm); 8035a32: 4801 ldr r0, [pc, #4] ; (8035a38 ) 8035a34: f7ec b9be b.w 8021db4 8035a38: 2000ea9c .word 0x2000ea9c 08035a3c : /** * @brief Установить SNMP SysContact * @retval */ void SNMP_SetSysContact(char *con) { 8035a3c: b510 push {r4, lr} 8035a3e: 4604 mov r4, r0 static uint8_t len; len = strlen(con); 8035a40: f7ec fa16 bl 8021e70 8035a44: 4903 ldr r1, [pc, #12] ; (8035a54 ) 8035a46: 7008 strb r0, [r1, #0] snmp_set_syscontact((u8_t*)con, &len); 8035a48: 4620 mov r0, r4 } 8035a4a: 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); 8035a4e: f7fc bb5d b.w 803210c 8035a52: bf00 nop 8035a54: 2000e596 .word 0x2000e596 08035a58 : /** * @brief Установить SNMP SysName * @retval */ void SNMP_SetSysName(char *name) { 8035a58: b510 push {r4, lr} 8035a5a: 4604 mov r4, r0 static uint8_t len; len = strlen(name); 8035a5c: f7ec fa08 bl 8021e70 8035a60: 4903 ldr r1, [pc, #12] ; (8035a70 ) 8035a62: 7008 strb r0, [r1, #0] snmp_set_sysname((u8_t*)name, &len); 8035a64: 4620 mov r0, r4 } 8035a66: 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); 8035a6a: f7fc bb59 b.w 8032120 8035a6e: bf00 nop 8035a70: 2000e598 .word 0x2000e598 08035a74 : /** * @brief Установить SNMP SysLocation * @retval */ void SNMP_SetSysLocation(char *loc) { 8035a74: b510 push {r4, lr} 8035a76: 4604 mov r4, r0 static uint8_t len; len = strlen(loc); 8035a78: f7ec f9fa bl 8021e70 8035a7c: 4903 ldr r1, [pc, #12] ; (8035a8c ) 8035a7e: 7008 strb r0, [r1, #0] snmp_set_syslocation((u8_t*)loc, &len); 8035a80: 4620 mov r0, r4 } 8035a82: 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); 8035a86: f7fc bb55 b.w 8032134 8035a8a: bf00 nop 8035a8c: 2000e597 .word 0x2000e597 08035a90 : /** * @brief Установить SNMP SysManagerIP * @retval */ void SNMP_SetManagerIP(char *ip) { 8035a90: b510 push {r4, lr} static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); 8035a92: 4c05 ldr r4, [pc, #20] ; (8035aa8 ) 8035a94: 4621 mov r1, r4 8035a96: f7fa fea0 bl 80307da snmp_trap_dst_ip_set(0, &trap_addr); 8035a9a: 2000 movs r0, #0 8035a9c: 4621 mov r1, r4 } 8035a9e: 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); 8035aa2: f7fe bc59 b.w 8034358 8035aa6: bf00 nop 8035aa8: 2000e59c .word 0x2000e59c 08035aac : /** * @brief Тестовый таск для проверки отправки трапов * @retval */ void snmp_trap_tread(void *arg) { 8035aac: b537 push {r0, r1, r2, r4, r5, lr} uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8035aae: 4d13 ldr r5, [pc, #76] ; (8035afc ) { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); SNMP_SendVarbindTrap(&traps[trapName]); 8035ab0: 4c13 ldr r4, [pc, #76] ; (8035b00 ) { uint8_t trapName; while(1) { if (xQueueReceive(SNMP_TrapQueue, &trapName, 0) == pdTRUE) 8035ab2: 2200 movs r2, #0 8035ab4: 6828 ldr r0, [r5, #0] 8035ab6: f10d 0107 add.w r1, sp, #7 8035aba: 4613 mov r3, r2 8035abc: f7f3 fe4e bl 802975c 8035ac0: 2801 cmp r0, #1 8035ac2: d1f6 bne.n 8035ab2 { SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8035ac4: 480f ldr r0, [pc, #60] ; (8035b04 ) 8035ac6: f7ff ffe3 bl 8035a90 SNMP_SendVarbindTrap(&traps[trapName]); 8035aca: f89d 0007 ldrb.w r0, [sp, #7] 8035ace: eb04 00c0 add.w r0, r4, r0, lsl #3 8035ad2: f000 fa2d bl 8035f30 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8035ad6: 480c ldr r0, [pc, #48] ; (8035b08 ) 8035ad8: f7ff ffda bl 8035a90 SNMP_SendVarbindTrap(&traps[trapName]); 8035adc: f89d 0007 ldrb.w r0, [sp, #7] 8035ae0: eb04 00c0 add.w r0, r4, r0, lsl #3 8035ae4: f000 fa24 bl 8035f30 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 8035ae8: 4808 ldr r0, [pc, #32] ; (8035b0c ) 8035aea: f7ff ffd1 bl 8035a90 SNMP_SendVarbindTrap(&traps[trapName]); 8035aee: f89d 0007 ldrb.w r0, [sp, #7] 8035af2: eb04 00c0 add.w r0, r4, r0, lsl #3 8035af6: f000 fa1b bl 8035f30 8035afa: e7da b.n 8035ab2 8035afc: 20011478 .word 0x20011478 8035b00: 2001147c .word 0x2001147c 8035b04: 2000eb64 .word 0x2000eb64 8035b08: 2000eb78 .word 0x2000eb78 8035b0c: 2000eb8c .word 0x2000eb8c 08035b10 : */ 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); 8035b10: 4801 ldr r0, [pc, #4] ; (8035b18 ) 8035b12: f7fc baa1 b.w 8032058 8035b16: bf00 nop 8035b18: 20001904 .word 0x20001904 08035b1c : /** * @brief Вкл/выкл трапы * @retval */ void SNMP_SetTrapOnOff(uint8_t state) { 8035b1c: 4601 mov r1, r0 snmp_trap_dst_enable(0, (u8_t)state); 8035b1e: 2000 movs r0, #0 8035b20: f7fe bc14 b.w 803434c 08035b24 : /** * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { 8035b24: b510 push {r4, lr} SNMP_SetObjDescr(); SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 8035b26: 4c16 ldr r4, [pc, #88] ; (8035b80 ) * @brief Инициализация SNMP агента * @retval */ void SNMP_AgentInit(void) { SNMP_SetObjDescr(); 8035b28: f7ff ff46 bl 80359b8 SNMP_SetReadCommunity(sSettings.sSnmp.readCommunity); 8035b2c: 4620 mov r0, r4 8035b2e: f7ff ff79 bl 8035a24 SNMP_SetWriteCommunity(sSettings.sSnmp.writeCommunity); 8035b32: f104 0014 add.w r0, r4, #20 8035b36: f7ff ff7b bl 8035a30 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 8035b3a: f104 0028 add.w r0, r4, #40 ; 0x28 8035b3e: f7ff ff7d bl 8035a3c SNMP_SetSysName(sSettings.sSnmp.sysName); 8035b42: f104 005a add.w r0, r4, #90 ; 0x5a 8035b46: f7ff ff87 bl 8035a58 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 8035b4a: f104 006e add.w r0, r4, #110 ; 0x6e 8035b4e: f7ff ff91 bl 8035a74 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8035b52: f104 00dc add.w r0, r4, #220 ; 0xdc 8035b56: f7ff ff9b bl 8035a90 SNMP_SetObjID(); 8035b5a: f7ff ffd9 bl 8035b10 SNMP_SetTrapOnOff(1); 8035b5e: 2001 movs r0, #1 8035b60: f7ff ffdc bl 8035b1c SNMP_InitTrapsBase(); 8035b64: f000 f928 bl 8035db8 snmp_init(); 8035b68: f7fd facc bl 8033104 udp_init(); 8035b6c: f7fa fb0c bl 8030188 SNMP_TrapQueue = xQueueCreate(SNMP_TRAP_QUEUE_SIZE, sizeof(uint8_t)); 8035b70: 2064 movs r0, #100 ; 0x64 8035b72: 2101 movs r1, #1 8035b74: 2200 movs r2, #0 8035b76: f7f3 fc74 bl 8029462 8035b7a: 4b02 ldr r3, [pc, #8] ; (8035b84 ) 8035b7c: 6018 str r0, [r3, #0] 8035b7e: bd10 pop {r4, pc} 8035b80: 2000ea88 .word 0x2000ea88 8035b84: 20011478 .word 0x20011478 08035b88 : * @retval */ void SNMP_Init(void) { //SETTINGS_SetSnmpDef(); SNMP_AgentInit(); 8035b88: f7ff bfcc b.w 8035b24 8035b8c: 0000 movs r0, r0 8035b8e: 0000 movs r0, r0 08035b90 : SNTP_Enable(sSettings.sSNTP.sntpEnable); } static void recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, struct ip_addr *addr, u16_t port) { 8035b90: b570 push {r4, r5, r6, lr} 8035b92: 4616 mov r6, r2 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 8035b94: 8952 ldrh r2, [r2, #10] 8035b96: 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) { 8035b98: b094 sub sp, #80 ; 0x50 time_t t; int utcSec = 0; TM_RTC_t data; if (p->len == sizeof(struct sntp_packet)) 8035b9a: d149 bne.n 8035c30 { int i; struct sntp_packet aligned; //myassert(p->len == p->tot_len); /* don't accept chained pbuf */ memcpy(&aligned, p->payload, sizeof(aligned)); 8035b9c: a808 add r0, sp, #32 8035b9e: 6871 ldr r1, [r6, #4] 8035ba0: f7eb fed4 bl 802194c i = (aligned.status >> 3) & 7; 8035ba4: f89d 3020 ldrb.w r3, [sp, #32] if ((i < 1) || (i > 4)) /* SNTP version 1..4 */ 8035ba8: f3c3 02c2 ubfx r2, r3, #3, #3 8035bac: 3a01 subs r2, #1 8035bae: 2a03 cmp r2, #3 8035bb0: d83e bhi.n 8035c30 goto out; i = aligned.status & 7; if ((i != 4) && (i != 5)) /* mode 4 or 5: server or broadcast */ 8035bb2: f003 0307 and.w r3, r3, #7 8035bb6: 3b04 subs r3, #4 8035bb8: 2b01 cmp r3, #1 8035bba: d839 bhi.n 8035c30 goto out; if (aligned.xmt == 0) 8035bbc: e9dd 4512 ldrd r4, r5, [sp, #72] ; 0x48 8035bc0: ea54 0305 orrs.w r3, r4, r5 8035bc4: d034 beq.n 8035c30 goto out; utcSec = (int)(3600.0*sSettings.sSNTP.timeZone); 8035bc6: 4b20 ldr r3, [pc, #128] ; (8035c48 ) 8035bc8: f8d3 0374 ldr.w r0, [r3, #884] ; 0x374 8035bcc: f7ea fca4 bl 8020518 <__aeabi_f2d> 8035bd0: a31b add r3, pc, #108 ; (adr r3, 8035c40 ) 8035bd2: e9d3 2300 ldrd r2, r3, [r3] 8035bd6: f7ea fcf3 bl 80205c0 <__aeabi_dmul> 8035bda: f7ea ff8b bl 8020af4 <__aeabi_d2iz> 8035bde: 4605 mov r5, r0 t = (ntohl(aligned.xmt) - 2208988800 + utcSec ); 8035be0: 4620 mov r0, r4 8035be2: f7f6 fe15 bl 802c810 8035be6: 4b19 ldr r3, [pc, #100] ; (8035c4c ) 8035be8: 18eb adds r3, r5, r3 TM_RTC_SetDataTimeUnix((uint32_t)t); 8035bea: 1818 adds r0, r3, r0 8035bec: f7f0 fd68 bl 80266c0 /* Сохраним время последней синхронизации */ TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8035bf0: a804 add r0, sp, #16 8035bf2: 2100 movs r1, #0 8035bf4: f7f0 fc48 bl 8026488 memset(sSettings.sSNTP.data, 0, sizeof(sSettings.sSNTP.data)); 8035bf8: 2100 movs r1, #0 8035bfa: 221e movs r2, #30 8035bfc: 4814 ldr r0, [pc, #80] ; (8035c50 ) 8035bfe: f7eb ff5f bl 8021ac0 sprintf(sSettings.sSNTP.data, "%02d.%02d.%02d %02d:%02d:%02d", 8035c02: f89d 1019 ldrb.w r1, [sp, #25] 8035c06: f89d 2017 ldrb.w r2, [sp, #23] 8035c0a: 9100 str r1, [sp, #0] 8035c0c: f89d 1015 ldrb.w r1, [sp, #21] 8035c10: f89d 3018 ldrb.w r3, [sp, #24] 8035c14: 9101 str r1, [sp, #4] 8035c16: f89d 1014 ldrb.w r1, [sp, #20] 8035c1a: 480d ldr r0, [pc, #52] ; (8035c50 ) 8035c1c: 9102 str r1, [sp, #8] 8035c1e: f89d 1010 ldrb.w r1, [sp, #16] 8035c22: 9103 str r1, [sp, #12] 8035c24: 490b ldr r1, [pc, #44] ; (8035c54 ) 8035c26: f7f1 fdbb bl 80277a0 data.date, data.month, data.year, data.hours, data.minutes, data.seconds); timeout = VALID_TIMEOUT; 8035c2a: 4a0b ldr r2, [pc, #44] ; (8035c58 ) 8035c2c: 4b0b ldr r3, [pc, #44] ; (8035c5c ) 8035c2e: 601a str r2, [r3, #0] } out: pbuf_free(p); 8035c30: 4630 mov r0, r6 8035c32: f7f7 ff1f bl 802da74 } 8035c36: b014 add sp, #80 ; 0x50 8035c38: bd70 pop {r4, r5, r6, pc} 8035c3a: bf00 nop 8035c3c: f3af 8000 nop.w 8035c40: 00000000 .word 0x00000000 8035c44: 40ac2000 .word 0x40ac2000 8035c48: 2000e984 .word 0x2000e984 8035c4c: 7c558180 .word 0x7c558180 8035c50: 2000ecd9 .word 0x2000ecd9 8035c54: 08041e90 .word 0x08041e90 8035c58: 01b77400 .word 0x01b77400 8035c5c: 2000e5a8 .word 0x2000e5a8 08035c60 : void SNTP_Enable(bool enable) { 8035c60: b538 push {r3, r4, r5, lr} if (enable) 8035c62: 4605 mov r5, r0 8035c64: 4c0f ldr r4, [pc, #60] ; (8035ca4 ) 8035c66: b1b8 cbz r0, 8035c98 { if (upcb == 0) 8035c68: 6825 ldr r5, [r4, #0] 8035c6a: b9d5 cbnz r5, 8035ca2 { err_t ret; upcb = udp_new(); 8035c6c: f7fa fc6a bl 8030544 8035c70: 6020 str r0, [r4, #0] if (upcb != 0) 8035c72: b1b0 cbz r0, 8035ca2 { ret = udp_bind(upcb, IP_ADDR_ANY, port); 8035c74: 227b movs r2, #123 ; 0x7b 8035c76: 490c ldr r1, [pc, #48] ; (8035ca8 ) 8035c78: f7fa fb4c bl 8030314 if (ret != ERR_OK) 8035c7c: 4602 mov r2, r0 { udp_remove(upcb); 8035c7e: 6820 ldr r0, [r4, #0] upcb = udp_new(); if (upcb != 0) { ret = udp_bind(upcb, IP_ADDR_ANY, port); if (ret != ERR_OK) 8035c80: b11a cbz r2, 8035c8a { udp_remove(upcb); 8035c82: f7fa fc43 bl 803050c upcb = 0; 8035c86: 6025 str r5, [r4, #0] 8035c88: e002 b.n 8035c90 } else { udp_recv(upcb, recv, 0); 8035c8a: 4908 ldr r1, [pc, #32] ; (8035cac ) 8035c8c: f7fa fc3a bl 8030504 } timeout = 0; 8035c90: 4b07 ldr r3, [pc, #28] ; (8035cb0 ) 8035c92: 2200 movs r2, #0 8035c94: 601a str r2, [r3, #0] 8035c96: bd38 pop {r3, r4, r5, pc} } } } else if (upcb != 0) 8035c98: 6820 ldr r0, [r4, #0] 8035c9a: b110 cbz r0, 8035ca2 { udp_remove(upcb); 8035c9c: f7fa fc36 bl 803050c upcb = 0; 8035ca0: 6025 str r5, [r4, #0] 8035ca2: bd38 pop {r3, r4, r5, pc} 8035ca4: 2000e5a4 .word 0x2000e5a4 8035ca8: 080413b4 .word 0x080413b4 8035cac: 08035b91 .word 0x08035b91 8035cb0: 2000e5a8 .word 0x2000e5a8 08035cb4 : { return upcb != 0; } void SNTP_SetServerAddr(char *addr) { 8035cb4: b508 push {r3, lr} server.addr = ipaddr_addr(addr); 8035cb6: f7fa fe0e bl 80308d6 8035cba: 4b01 ldr r3, [pc, #4] ; (8035cc0 ) 8035cbc: 6018 str r0, [r3, #0] 8035cbe: bd08 pop {r3, pc} 8035cc0: 2000e5a0 .word 0x2000e5a0 08035cc4 : /** * @brief Инициализация SNTP. * @retval */ void SNTP_Init(void) { 8035cc4: b508 push {r3, lr} SNTP_SetServerAddr(sSettings.sSNTP.ip); 8035cc6: 4805 ldr r0, [pc, #20] ; (8035cdc ) 8035cc8: f7ff fff4 bl 8035cb4 SNTP_Enable(sSettings.sSNTP.sntpEnable); 8035ccc: 4b04 ldr r3, [pc, #16] ; (8035ce0 ) 8035cce: f893 0344 ldrb.w r0, [r3, #836] ; 0x344 } 8035cd2: e8bd 4008 ldmia.w sp!, {r3, lr} void SNTP_Init(void) { SNTP_SetServerAddr(sSettings.sSNTP.ip); SNTP_Enable(sSettings.sSNTP.sntpEnable); 8035cd6: f7ff bfc3 b.w 8035c60 8035cda: bf00 nop 8035cdc: 2000ecc9 .word 0x2000ecc9 8035ce0: 2000e984 .word 0x2000e984 08035ce4 : pbuf_free(psend); } } void SNTP_Poll(void) { 8035ce4: b530 push {r4, r5, lr} if (upcb) 8035ce6: 4d15 ldr r5, [pc, #84] ; (8035d3c ) 8035ce8: 682b ldr r3, [r5, #0] pbuf_free(psend); } } void SNTP_Poll(void) { 8035cea: b08d sub sp, #52 ; 0x34 if (upcb) 8035cec: b31b cbz r3, 8035d36 static void send_request(void) { struct sntp_packet packet; struct pbuf* psend; memset(&packet, 0, sizeof(packet)); 8035cee: 2100 movs r1, #0 8035cf0: 2230 movs r2, #48 ; 0x30 8035cf2: 4668 mov r0, sp 8035cf4: f7eb fee4 bl 8021ac0 packet.status = (3 << 3) /* SNTP vesion 3 */ | (3 << 0); /* Mode: client */ 8035cf8: 231b movs r3, #27 psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 8035cfa: 2003 movs r0, #3 8035cfc: 2130 movs r1, #48 ; 0x30 8035cfe: 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 */ 8035d00: f88d 3000 strb.w r3, [sp] psend = pbuf_alloc(PBUF_RAW, sizeof(packet), PBUF_REF); 8035d04: f7f7 ff03 bl 802db0e if (psend != 0) 8035d08: 4604 mov r4, r0 8035d0a: b1a0 cbz r0, 8035d36 { psend->payload = &packet; 8035d0c: ab00 add r3, sp, #0 8035d0e: 6043 str r3, [r0, #4] timeout = (udp_sendto(upcb, psend, &server, port) == ERR_OK) ? SENT_TIMEOUT : SENDFAIL_TIMEOUT; 8035d10: 4621 mov r1, r4 8035d12: 4a0b ldr r2, [pc, #44] ; (8035d40 ) 8035d14: 6828 ldr r0, [r5, #0] 8035d16: 237b movs r3, #123 ; 0x7b 8035d18: f7fa fbad bl 8030476 8035d1c: f64e 2360 movw r3, #60000 ; 0xea60 8035d20: f241 3288 movw r2, #5000 ; 0x1388 8035d24: 4907 ldr r1, [pc, #28] ; (8035d44 ) 8035d26: 2800 cmp r0, #0 8035d28: bf14 ite ne 8035d2a: 4610 movne r0, r2 8035d2c: 4618 moveq r0, r3 8035d2e: 6008 str r0, [r1, #0] pbuf_free(psend); 8035d30: 4620 mov r0, r4 8035d32: f7f7 fe9f bl 802da74 void SNTP_Poll(void) { if (upcb) send_request(); } 8035d36: b00d add sp, #52 ; 0x34 8035d38: bd30 pop {r4, r5, pc} 8035d3a: bf00 nop 8035d3c: 2000e5a4 .word 0x2000e5a4 8035d40: 2000e5a0 .word 0x2000e5a0 8035d44: 2000e5a8 .word 0x2000e5a8 08035d48 : * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 8035d48: b530 push {r4, r5, lr} static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); if (sSettings.sSNTP.sntpEnable) 8035d4a: 4d0f ldr r5, [pc, #60] ; (8035d88 ) fSinhro = 1; //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) fSinhro = 0; 8035d4c: 4c0f ldr r4, [pc, #60] ; (8035d8c ) * @brief Периодическая синхронизация времени. * Выполняется раз в сутки с 0 часов. * @retval */ void vTaskPeriodicSynchro(void *arg) { 8035d4e: b085 sub sp, #20 static uint8_t fSinhro = 0; for (;;) { vTaskDelay(10000); 8035d50: f242 7010 movw r0, #10000 ; 0x2710 8035d54: f7f4 f8a6 bl 8029ea4 if (sSettings.sSNTP.sntpEnable) 8035d58: f895 3344 ldrb.w r3, [r5, #836] ; 0x344 8035d5c: 2b00 cmp r3, #0 8035d5e: d0f7 beq.n 8035d50 { TM_RTC_GetDateTime(&data, TM_RTC_Format_BIN); 8035d60: 4668 mov r0, sp 8035d62: 2100 movs r1, #0 8035d64: f7f0 fb90 bl 8026488 /* Если пришло время синхронизации */ if ((data.hours == 0) && (fSinhro == 0)) 8035d68: f89d 3005 ldrb.w r3, [sp, #5] 8035d6c: b92b cbnz r3, 8035d7a 8035d6e: 7823 ldrb r3, [r4, #0] 8035d70: b91b cbnz r3, 8035d7a { SNTP_Poll(); 8035d72: f7ff ffb7 bl 8035ce4 fSinhro = 1; 8035d76: 2301 movs r3, #1 8035d78: 7023 strb r3, [r4, #0] //printf("Periodic time sinhro\n\r"); } if (data.hours > 1) 8035d7a: f89d 3005 ldrb.w r3, [sp, #5] 8035d7e: 2b01 cmp r3, #1 8035d80: d9e6 bls.n 8035d50 fSinhro = 0; 8035d82: 2300 movs r3, #0 8035d84: 7023 strb r3, [r4, #0] 8035d86: e7e3 b.n 8035d50 8035d88: 2000e984 .word 0x2000e984 8035d8c: 2000e5ac .word 0x2000e5ac 08035d90 : /** * @brief Синхронизация времени единоразово при включении контроллера * @retval */ void vTaskOnceSynchro(void *arg) { 8035d90: b538 push {r3, r4, r5, lr} for (;;) { if (sSettings.sSNTP.sntpEnable) 8035d92: 4d07 ldr r5, [pc, #28] ; (8035db0 ) 8035d94: 4c07 ldr r4, [pc, #28] ; (8035db4 ) 8035d96: f895 3344 ldrb.w r3, [r5, #836] ; 0x344 8035d9a: b12b cbz r3, 8035da8 { vTaskDelay(7000); 8035d9c: f641 3058 movw r0, #7000 ; 0x1b58 8035da0: f7f4 f880 bl 8029ea4 SNTP_Poll(); 8035da4: f7ff ff9e bl 8035ce4 //printf("Once time sinhro\n\r"); vTaskDelete(xHandleSntpOnceSinhro); } else vTaskDelete(xHandleSntpOnceSinhro); 8035da8: 6820 ldr r0, [r4, #0] 8035daa: f7f3 feb9 bl 8029b20 8035dae: e7f2 b.n 8035d96 8035db0: 2000e984 .word 0x2000e984 8035db4: 20002928 .word 0x20002928 08035db8 : * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8035db8: 4b53 ldr r3, [pc, #332] ; (8035f08 ) traps[FW_VERSION_UPDATE].varbindId = 1; traps[FW_VERSION_UPDATE].trapEnable = true; traps[FW_VERSION_UPDATE].handle = GetVersionStr; /* FWVersion */ 8035dba: 4954 ldr r1, [pc, #336] ; (8035f0c ) /** * @brief Инициализация базы трапов * @retval */ void SNMP_InitTrapsBase(void) { 8035dbc: 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; 8035dbe: 2402 movs r4, #2 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; 8035dc0: 2003 movs r0, #3 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; 8035dc2: 745c strb r4, [r3, #17] traps[FW_VERSION_UPDATED].trapEnable = true; traps[FW_VERSION_UPDATED].handle = GetVersionStr; /* FWVersion */ /* 3. DeviceRestored */ // + traps[DEVICE_RESTORED].trapId = DEVICE_RESTORED; traps[DEVICE_RESTORED].varbindId = 2; 8035dc4: 769c strb r4, [r3, #26] traps[DEVICE_RESTORED].trapEnable = true; traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; 8035dc6: 2404 movs r4, #4 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; 8035dc8: 7658 strb r0, [r3, #25] traps[DEVICE_RESTORED].varbindId = 2; traps[DEVICE_RESTORED].trapEnable = true; traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; 8035dca: f883 4021 strb.w r4, [r3, #33] ; 0x21 traps[DEVICE_REBOOTED].varbindId = 3; 8035dce: f883 0022 strb.w r0, [r3, #34] ; 0x22 traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; 8035dd2: 2405 movs r4, #5 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; 8035dd4: 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 */ 8035dd6: 4d4e ldr r5, [pc, #312] ; (8035f10 ) traps[DEVICE_REBOOTED].varbindId = 3; traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ /* 5. DI0Norm */ // + traps[DI0_NORM].trapId = DI0_NORM; 8035dd8: 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; 8035ddc: 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; 8035de0: 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; 8035de4: 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 */ 8035de8: 4c4a ldr r4, [pc, #296] ; (8035f14 ) /* 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 */ 8035dea: 484b ldr r0, [pc, #300] ; (8035f18 ) { /* 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 */ 8035dec: 60d9 str r1, [r3, #12] * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8035dee: 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 */ 8035df0: 6159 str r1, [r3, #20] /* 3. DeviceRestored */ // + traps[DEVICE_RESTORED].trapId = DEVICE_RESTORED; traps[DEVICE_RESTORED].varbindId = 2; traps[DEVICE_RESTORED].trapEnable = true; traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ 8035df2: 61d9 str r1, [r3, #28] /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; traps[DEVICE_REBOOTED].varbindId = 3; traps[DEVICE_REBOOTED].trapEnable = true; traps[DEVICE_REBOOTED].handle = GetVersionStr;//GetReboot; /* RebootSignal */ 8035df4: 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 */ 8035df6: 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; 8035df8: 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 */ 8035dfa: 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 */ 8035dfc: 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; 8035dfe: 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; 8035e00: 2408 movs r4, #8 traps[DO1_TOGGLED].varbindId = 6; traps[DO1_TOGGLED].trapEnable = true; traps[DO1_TOGGLED].handle = GetDOUT1StatusStr; /* State DO1 */ 8035e02: 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 */ 8035e04: 4845 ldr r0, [pc, #276] ; (8035f1c ) 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; 8035e06: 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; 8035e0a: 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; 8035e0e: 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; 8035e12: f883 4041 strb.w r4, [r3, #65] ; 0x41 * @retval */ void SNMP_InitTrapsBase(void) { /* 1. FWVersionUpdate */ // + traps[FW_VERSION_UPDATE].trapId = FW_VERSION_UPDATE; 8035e16: 725a strb r2, [r3, #9] traps[FW_VERSION_UPDATE].varbindId = 1; 8035e18: 729a strb r2, [r3, #10] traps[FW_VERSION_UPDATE].trapEnable = true; 8035e1a: 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; 8035e1c: 749a strb r2, [r3, #18] traps[FW_VERSION_UPDATED].trapEnable = true; 8035e1e: 74da strb r2, [r3, #19] traps[FW_VERSION_UPDATED].handle = GetVersionStr; /* FWVersion */ /* 3. DeviceRestored */ // + traps[DEVICE_RESTORED].trapId = DEVICE_RESTORED; traps[DEVICE_RESTORED].varbindId = 2; traps[DEVICE_RESTORED].trapEnable = true; 8035e20: 76da strb r2, [r3, #27] traps[DEVICE_RESTORED].handle = GetVersionStr;//GetRestore; /* RestoreSignal */ /* 4. DeviceRebooted */ // + traps[DEVICE_REBOOTED].trapId = DEVICE_REBOOTED; traps[DEVICE_REBOOTED].varbindId = 3; traps[DEVICE_REBOOTED].trapEnable = true; 8035e22: 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; 8035e26: 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; 8035e2a: 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; 8035e2e: 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; 8035e32: 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; 8035e36: f883 1049 strb.w r1, [r3, #73] ; 0x49 traps[BATTERY_TEMPERATURE_NORM].varbindId = 10; 8035e3a: 210a movs r1, #10 8035e3c: f883 104a strb.w r1, [r3, #74] ; 0x4a traps[BATTERY_TEMPERATURE_NORM].trapEnable = true; traps[BATTERY_TEMPERATURE_NORM].handle = GetInternalTempStr; /* BatteryTemperature */ 8035e40: 64d8 str r0, [r3, #76] ; 0x4c /* 10. BatteryTemperatureAlarm */ // + traps[BATTERY_TEMPERATURE_ALARM].trapId = BATTERY_TEMPERATURE_ALARM; 8035e42: f883 1051 strb.w r1, [r3, #81] ; 0x51 traps[BATTERY_TEMPERATURE_ALARM].varbindId = 10; 8035e46: f883 1052 strb.w r1, [r3, #82] ; 0x52 traps[BATTERY_TEMPERATURE_ALARM].trapEnable = true; traps[BATTERY_TEMPERATURE_ALARM].handle = GetInternalTempStr; /* BatteryTemperature */ 8035e4a: 6558 str r0, [r3, #84] ; 0x54 /* 11. LineAlarm */ // + traps[LINE_ALARM].trapId = LINE_ALARM; 8035e4c: 210b movs r1, #11 traps[LINE_ALARM].varbindId = 12; traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 8035e4e: 4834 ldr r0, [pc, #208] ; (8035f20 ) 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; 8035e50: f883 1059 strb.w r1, [r3, #89] ; 0x59 traps[LINE_ALARM].varbindId = 12; 8035e54: 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; 8035e56: 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 */ 8035e58: 4d32 ldr r5, [pc, #200] ; (8035f24 ) 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; 8035e5a: f883 105a strb.w r1, [r3, #90] ; 0x5a traps[LINE_ALARM].trapEnable = true; traps[LINE_ALARM].handle = GetInputVoltageStr; /* LineAlarm */ 8035e5e: 65d8 str r0, [r3, #92] ; 0x5c /* 12. LineNorm */ // + traps[LINE_NORM].trapId = LINE_NORM; 8035e60: f883 1061 strb.w r1, [r3, #97] ; 0x61 traps[LINE_NORM].varbindId = 12; 8035e64: f883 1062 strb.w r1, [r3, #98] ; 0x62 traps[LINE_NORM].trapEnable = true; traps[LINE_NORM].handle = GetInputVoltageStr; /* LineNorm */ 8035e68: 6658 str r0, [r3, #100] ; 0x64 /* 13. LowBatAlarm */ // + traps[LOW_BAT_ALARM].trapId = LOW_BAT_ALARM; 8035e6a: 210d movs r1, #13 traps[LOW_BAT_ALARM].varbindId = 15; traps[LOW_BAT_ALARM].trapEnable = true; traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8035e6c: 482e ldr r0, [pc, #184] ; (8035f28 ) 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; 8035e6e: 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; 8035e72: 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; 8035e76: 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; 8035e78: 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; 8035e7c: 2610 movs r6, #16 traps[POWER_NORM].varbindId = 14; 8035e7e: 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; 8035e82: 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 */ 8035e84: 67dd str r5, [r3, #124] ; 0x7c /* 16. PowerNorm */ // + traps[POWER_NORM].trapId = POWER_NORM; 8035e86: f883 6081 strb.w r6, [r3, #129] ; 0x81 traps[POWER_NORM].varbindId = 14; traps[POWER_NORM].trapEnable = true; traps[POWER_NORM].handle = GetPowerStr; /* PowerNorm */ 8035e8a: f8c3 5084 str.w r5, [r3, #132] ; 0x84 /* 17. ConnectMonitorAlarm */ // traps[CONNECT_MONITOR_ALARM].trapId = CONNECT_MONITOR_ALARM; 8035e8e: f883 4089 strb.w r4, [r3, #137] ; 0x89 traps[CONNECT_MONITOR_ALARM].varbindId = 17; 8035e92: f883 408a strb.w r4, [r3, #138] ; 0x8a traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr; /* ConnectMonitor */ 8035e96: 4d25 ldr r5, [pc, #148] ; (8035f2c ) 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; 8035e98: 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; 8035e9c: 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; 8035ea0: 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; 8035ea4: 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; 8035ea8: f883 106a strb.w r1, [r3, #106] ; 0x6a traps[LOW_BAT_ALARM].trapEnable = true; 8035eac: f883 206b strb.w r2, [r3, #107] ; 0x6b traps[LOW_BAT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8035eb0: 66d8 str r0, [r3, #108] ; 0x6c /* 14. LowBatNorm */ // + traps[LOW_BAT_NORM].trapId = LOW_BAT_NORM; traps[LOW_BAT_NORM].varbindId = 15; 8035eb2: f883 1072 strb.w r1, [r3, #114] ; 0x72 traps[LOW_BAT_NORM].trapEnable = true; 8035eb6: f883 2073 strb.w r2, [r3, #115] ; 0x73 traps[LOW_BAT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 8035eba: 6758 str r0, [r3, #116] ; 0x74 /* 15. PowerAlarm */ // + traps[POWER_ALARM].trapId = POWER_ALARM; 8035ebc: f883 1079 strb.w r1, [r3, #121] ; 0x79 traps[POWER_ALARM].varbindId = 14; traps[POWER_ALARM].trapEnable = true; 8035ec0: 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; 8035ec4: 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; 8035ec8: f883 208b strb.w r2, [r3, #139] ; 0x8b traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr; /* ConnectMonitor */ /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; traps[CONNECT_MONITOR_NORM].varbindId = 17; 8035ecc: f883 4092 strb.w r4, [r3, #146] ; 0x92 traps[CONNECT_MONITOR_NORM].trapEnable = true; traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr; /* ConnectMonitor */ /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; 8035ed0: 2413 movs r4, #19 traps[CONNECT_MONITOR_ALARM].varbindId = 17; traps[CONNECT_MONITOR_ALARM].trapEnable = true; traps[CONNECT_MONITOR_ALARM].handle = GetConnectMonitorStr; /* ConnectMonitor */ /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 8035ed2: 2612 movs r6, #18 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr; /* ConnectMonitor */ /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; 8035ed4: 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; 8035ed8: 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; /* ConnectMonitor */ 8035eda: f8c3 508c str.w r5, [r3, #140] ; 0x8c /* 18. ConnectMonitorNorm */ // traps[CONNECT_MONITOR_NORM].trapId = CONNECT_MONITOR_NORM; 8035ede: f883 6091 strb.w r6, [r3, #145] ; 0x91 traps[CONNECT_MONITOR_NORM].varbindId = 17; traps[CONNECT_MONITOR_NORM].trapEnable = true; 8035ee2: f883 2093 strb.w r2, [r3, #147] ; 0x93 traps[CONNECT_MONITOR_NORM].handle = GetConnectMonitorStr; /* ConnectMonitor */ 8035ee6: f8c3 5094 str.w r5, [r3, #148] ; 0x94 /* 19. BatteryConnectAlarm */ // + traps[BATTERY_CONNECT_ALARM].trapId = BATTERY_CONNECT_ALARM; traps[BATTERY_CONNECT_ALARM].varbindId = 15; 8035eea: f883 109a strb.w r1, [r3, #154] ; 0x9a traps[BATTERY_CONNECT_ALARM].trapEnable = true; 8035eee: f883 209b strb.w r2, [r3, #155] ; 0x9b traps[BATTERY_CONNECT_ALARM].handle = GetBatCapacityStr; /* LowBatAlarm */ 8035ef2: f8c3 009c str.w r0, [r3, #156] ; 0x9c /* 20. BatteryConnectNorm */ // + traps[BATTERY_CONNECT_NORM].trapId = BATTERY_CONNECT_NORM; 8035ef6: f883 40a1 strb.w r4, [r3, #161] ; 0xa1 traps[BATTERY_CONNECT_NORM].varbindId = 15; 8035efa: f883 10a2 strb.w r1, [r3, #162] ; 0xa2 traps[BATTERY_CONNECT_NORM].trapEnable = true; 8035efe: f883 20a3 strb.w r2, [r3, #163] ; 0xa3 traps[BATTERY_CONNECT_NORM].handle = GetBatCapacityStr; /* LowBatNorm */ 8035f02: f8c3 00a4 str.w r0, [r3, #164] ; 0xa4 8035f06: bd70 pop {r4, r5, r6, pc} 8035f08: 2001147c .word 0x2001147c 8035f0c: 08027c21 .word 0x08027c21 8035f10: 08027ad1 .word 0x08027ad1 8035f14: 08027b45 .word 0x08027b45 8035f18: 08027b69 .word 0x08027b69 8035f1c: 080278e9 .word 0x080278e9 8035f20: 08027825 .word 0x08027825 8035f24: 0802787d .word 0x0802787d 8035f28: 080278a1 .word 0x080278a1 8035f2c: 08027915 .word 0x08027915 08035f30 : /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 8035f30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} char msg[255]; uint8_t len = 0; 8035f34: 2500 movs r5, #0 /** * @brief Отправка трапа с переменной, зарегистрированного в базе. * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { 8035f36: f5ad 7d07 sub.w sp, sp, #540 ; 0x21c 8035f3a: 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}}; 8035f3c: 4629 mov r1, r5 8035f3e: 2284 movs r2, #132 ; 0x84 8035f40: a804 add r0, sp, #16 * @retval */ bool SNMP_SendVarbindTrap(TRAP_t *trap) { char msg[255]; uint8_t len = 0; 8035f42: 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}}; 8035f46: f7eb fdbb bl 8021ac0 8035f4a: 2202 movs r2, #2 8035f4c: 2401 movs r4, #1 8035f4e: 2603 movs r6, #3 8035f50: 230b movs r3, #11 8035f52: f04f 0804 mov.w r8, #4 8035f56: 2706 movs r7, #6 8035f58: f24a 3b18 movw fp, #41752 ; 0xa318 8035f5c: f240 3a8f movw sl, #911 ; 0x38f 8035f60: 920e str r2, [sp, #56] ; 0x38 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8035f62: 4629 mov r1, r5 8035f64: 2284 movs r2, #132 ; 0x84 8035f66: 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}}; 8035f68: f88d 3010 strb.w r3, [sp, #16] 8035f6c: 9606 str r6, [sp, #24] 8035f6e: 960d str r6, [sp, #52] ; 0x34 struct snmp_obj_id varObjId = {11, {1, 3, 6, 1, 4, 1, 41752, 911, 3, 1, 1}}; 8035f70: 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}}; 8035f72: 9405 str r4, [sp, #20] 8035f74: 9707 str r7, [sp, #28] 8035f76: 9408 str r4, [sp, #32] 8035f78: f8cd 8024 str.w r8, [sp, #36] ; 0x24 8035f7c: 940a str r4, [sp, #40] ; 0x28 8035f7e: f8cd b02c str.w fp, [sp, #44] ; 0x2c 8035f82: 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}}; 8035f86: f7eb fd9b bl 8021ac0 8035f8a: 9b01 ldr r3, [sp, #4] 8035f8c: 9627 str r6, [sp, #156] ; 0x9c 8035f8e: f88d 3094 strb.w r3, [sp, #148] ; 0x94 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8035f92: 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}}; 8035f96: 962e str r6, [sp, #184] ; 0xb8 trapObjId.id[trapObjId.len - 1] = trap->trapId; 8035f98: 930f str r3, [sp, #60] ; 0x3c varObjId.id[varObjId.len - 1] = trap->varbindId; 8035f9a: 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}}; 8035f9e: 9426 str r4, [sp, #152] ; 0x98 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; 8035fa0: 9330 str r3, [sp, #192] ; 0xc0 trap->handle(msg, &len); 8035fa2: a846 add r0, sp, #280 ; 0x118 8035fa4: 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}}; 8035fa8: 9728 str r7, [sp, #160] ; 0xa0 trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 8035faa: 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}}; 8035fae: 9429 str r4, [sp, #164] ; 0xa4 8035fb0: f8cd 80a8 str.w r8, [sp, #168] ; 0xa8 8035fb4: 942b str r4, [sp, #172] ; 0xac 8035fb6: f8cd b0b0 str.w fp, [sp, #176] ; 0xb0 8035fba: f8cd a0b4 str.w sl, [sp, #180] ; 0xb4 8035fbe: 942f str r4, [sp, #188] ; 0xbc trapObjId.id[trapObjId.len - 1] = trap->trapId; varObjId.id[varObjId.len - 1] = trap->varbindId; trap->handle(msg, &len); 8035fc0: 4798 blx r3 vb = snmp_varbind_alloc(&varObjId, SNMP_ASN1_OC_STR, len); 8035fc2: a825 add r0, sp, #148 ; 0x94 8035fc4: 4641 mov r1, r8 8035fc6: f89d 200f ldrb.w r2, [sp, #15] 8035fca: f7fd f8bf bl 803314c if(vb != NULL ) { 8035fce: 4606 mov r6, r0 8035fd0: b198 cbz r0, 8035ffa memcpy(vb->value, msg, len); 8035fd2: f89d 200f ldrb.w r2, [sp, #15] 8035fd6: 6940 ldr r0, [r0, #20] 8035fd8: a946 add r1, sp, #280 ; 0x118 8035fda: f7eb fcb7 bl 802194c snmp_varbind_tail_add(&trap_msg.outvb, vb); 8035fde: 4809 ldr r0, [pc, #36] ; (8036004 ) 8035fe0: 4631 mov r1, r6 8035fe2: f7fd f95f bl 80332a4 snmp_send_trap(SNMP_GENTRAP_ENTERPRISESPC, &trapObjId, 0); 8035fe6: a904 add r1, sp, #16 8035fe8: 462a mov r2, r5 8035fea: 4638 mov r0, r7 8035fec: f7fe faca bl 8034584 snmp_varbind_list_free(&trap_msg.outvb); 8035ff0: 4804 ldr r0, [pc, #16] ; (8036004 ) 8035ff2: f7fd f8fe bl 80331f2 return true; 8035ff6: 4620 mov r0, r4 8035ff8: e7ff b.n 8035ffa } else { return false; } } 8035ffa: f50d 7d07 add.w sp, sp, #540 ; 0x21c 8035ffe: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8036002: bf00 nop 8036004: 20011204 .word 0x20011204 08036008 : * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 8036008: 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 803600a: 2007 movs r0, #7 * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 803600c: b0b4 sub sp, #208 ; 0xd0 { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 803600e: 2101 movs r1, #1 8036010: f7ef fb9c bl 802574c | RCC_AHB1Periph_GPIOC, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); 8036014: 2101 movs r1, #1 8036016: f44f 4080 mov.w r0, #16384 ; 0x4000 803601a: f7ef fbbb bl 8025794 /* MII/RMII Media interface selection --------------------------------------*/ SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_RMII); 803601e: 2001 movs r0, #1 8036020: f7ef fdac bl 8025b7c ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 8036024: 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; 8036026: 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; 8036028: 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; 803602a: 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); 803602c: 4864 ldr r0, [pc, #400] ; (80361c0 ) */ /* 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; 803602e: 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; 8036032: 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); 8036034: 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; 8036036: f88d 3011 strb.w r3, [sp, #17] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 803603a: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; 803603e: f88d 4013 strb.w r4, [sp, #19] GPIO_Init(GPIOA, &GPIO_InitStructure); 8036042: f7ef faa3 bl 802558c GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); 8036046: 2101 movs r1, #1 8036048: 220b movs r2, #11 803604a: 485d ldr r0, [pc, #372] ; (80361c0 ) 803604c: f7ef fae7 bl 802561e GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); 8036050: 220b movs r2, #11 8036052: 485b ldr r0, [pc, #364] ; (80361c0 ) 8036054: 4629 mov r1, r5 8036056: f7ef fae2 bl 802561e GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); 803605a: 220b movs r2, #11 803605c: 2107 movs r1, #7 803605e: 4858 ldr r0, [pc, #352] ; (80361c0 ) 8036060: f7ef fadd bl 802561e /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 8036064: f44f 5360 mov.w r3, #14336 ; 0x3800 GPIO_Init(GPIOB, &GPIO_InitStructure); 8036068: 4856 ldr r0, [pc, #344] ; (80361c4 ) 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; 803606a: 9303 str r3, [sp, #12] GPIO_Init(GPIOB, &GPIO_InitStructure); 803606c: a903 add r1, sp, #12 803606e: f7ef fa8d bl 802558c //GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); 8036072: 210b movs r1, #11 8036074: 460a mov r2, r1 8036076: 4853 ldr r0, [pc, #332] ; (80361c4 ) 8036078: f7ef fad1 bl 802561e GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); 803607c: 210c movs r1, #12 803607e: 220b movs r2, #11 8036080: 4850 ldr r0, [pc, #320] ; (80361c4 ) 8036082: f7ef facc bl 802561e GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); 8036086: 220b movs r2, #11 8036088: 210d movs r1, #13 803608a: 484e ldr r0, [pc, #312] ; (80361c4 ) 803608c: f7ef fac7 bl 802561e /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8036090: 2332 movs r3, #50 ; 0x32 GPIO_Init(GPIOC, &GPIO_InitStructure); 8036092: 484d ldr r0, [pc, #308] ; (80361c8 ) 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; 8036094: 9303 str r3, [sp, #12] GPIO_Init(GPIOC, &GPIO_InitStructure); 8036096: a903 add r1, sp, #12 8036098: f7ef fa78 bl 802558c GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); 803609c: 484a ldr r0, [pc, #296] ; (80361c8 ) 803609e: 2101 movs r1, #1 80360a0: 220b movs r2, #11 80360a2: f7ef fabc bl 802561e GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); 80360a6: 4848 ldr r0, [pc, #288] ; (80361c8 ) 80360a8: 2104 movs r1, #4 80360aa: 220b movs r2, #11 80360ac: f7ef fab7 bl 802561e GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); 80360b0: 220b movs r2, #11 80360b2: 4845 ldr r0, [pc, #276] ; (80361c8 ) 80360b4: 2105 movs r1, #5 80360b6: f7ef fab2 bl 802561e /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 80360ba: f44f 5600 mov.w r6, #8192 ; 0x2000 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 80360be: 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); 80360c0: 4842 ldr r0, [pc, #264] ; (80361cc ) 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; 80360c2: 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); 80360c6: 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; 80360c8: 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; 80360cc: 9603 str r6, [sp, #12] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 80360ce: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 80360d2: f88d 5011 strb.w r5, [sp, #17] GPIO_Init(GPIOE, &GPIO_InitStructure); 80360d6: f7ef fa59 bl 802558c GPIO_ResetBits(GPIOE, GPIO_Pin_13); 80360da: 483c ldr r0, [pc, #240] ; (80361cc ) 80360dc: 4631 mov r1, r6 80360de: f7ef fa9c bl 802561a for (i = 0; i < 20000; i++); 80360e2: 9401 str r4, [sp, #4] 80360e4: f644 631f movw r3, #19999 ; 0x4e1f 80360e8: e002 b.n 80360f0 80360ea: 9a01 ldr r2, [sp, #4] 80360ec: 3201 adds r2, #1 80360ee: 9201 str r2, [sp, #4] 80360f0: 9a01 ldr r2, [sp, #4] 80360f2: 429a cmp r2, r3 80360f4: d9f9 bls.n 80360ea GPIO_SetBits(GPIOE, GPIO_Pin_13); 80360f6: 4835 ldr r0, [pc, #212] ; (80361cc ) 80360f8: f44f 5100 mov.w r1, #8192 ; 0x2000 80360fc: f7ef fa8b bl 8025616 for (i = 0; i < 20000; i++); 8036100: 2300 movs r3, #0 8036102: 9301 str r3, [sp, #4] 8036104: f644 631f movw r3, #19999 ; 0x4e1f 8036108: e002 b.n 8036110 803610a: 9a01 ldr r2, [sp, #4] 803610c: 3201 adds r2, #1 803610e: 9201 str r2, [sp, #4] 8036110: 9a01 ldr r2, [sp, #4] 8036112: 429a cmp r2, r3 8036114: d9f9 bls.n 803610a static void ETH_MACDMA_Config(void) { ETH_InitTypeDef ETH_InitStructure; /* Enable ETHERNET clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx | 8036116: f04f 6060 mov.w r0, #234881024 ; 0xe000000 803611a: 2101 movs r1, #1 803611c: f7ef fb16 bl 802574c RCC_AHB1Periph_ETH_MAC_Rx, ENABLE); /* Reset ETHERNET on AHB Bus */ ETH_DeInit(); 8036120: f000 f868 bl 80361f4 /* Software reset */ ETH_SoftwareReset(); 8036124: f000 f9fe bl 8036524 /* Wait for software reset */ while (ETH_GetSoftwareResetStatus() == SET); 8036128: f000 fa04 bl 8036534 803612c: 2801 cmp r0, #1 803612e: d0fb beq.n 8036128 /* ETHERNET Configuration --------------------------------------------------*/ /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); 8036130: a805 add r0, sp, #20 8036132: f000 f86c bl 803620e //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; 8036136: f44f 7300 mov.w r3, #512 ; 0x200 803613a: 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; 803613c: f04f 7300 mov.w r3, #33554432 ; 0x2000000 8036140: 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; 8036142: 932e str r3, [sp, #184] ; 0xb8 ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; 8036144: f44f 3380 mov.w r3, #65536 ; 0x10000 8036148: 932f str r3, [sp, #188] ; 0xbc ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 803614a: 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; 803614e: 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; 8036150: 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; 8036154: 9330 str r3, [sp, #192] ; 0xc0 ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8036156: 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; 803615a: 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; 803615c: 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; 803615e: 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; 8036160: 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; 8036162: f44f 4380 mov.w r3, #16384 ; 0x4000 /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8036166: 4629 mov r1, r5 8036168: 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; 803616a: 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; 803616c: 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; 803616e: 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; 8036170: 940c str r4, [sp, #48] ; 0x30 ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; ETH_InitStructure.ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8036172: 9410 str r4, [sp, #64] ; 0x40 ETH_InitStructure.ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8036174: 9413 str r4, [sp, #76] ; 0x4c ETH_InitStructure.ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Enable; 8036176: 9416 str r4, [sp, #88] ; 0x58 ETH_InitStructure.ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8036178: 9418 str r4, [sp, #96] ; 0x60 ETH_InitStructure.ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 803617a: 9419 str r4, [sp, #100] ; 0x64 ETH_InitStructure.ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 803617c: 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; 803617e: 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; 8036180: 942a str r4, [sp, #168] ; 0xa8 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8036182: 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); 8036184: f000 fa80 bl 8036688 8036188: 4e11 ldr r6, [pc, #68] ; (80361d0 ) /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 803618a: 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); 803618c: 6030 str r0, [r6, #0] /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 803618e: 4811 ldr r0, [pc, #68] ; (80361d4 ) 8036190: f000 f9e2 bl 8036558 void ETH_NVIC_Config(void) { NVIC_InitTypeDef NVIC_InitStructure; /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); 8036194: f44f 7040 mov.w r0, #768 ; 0x300 8036198: f7ef f878 bl 802528c /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; 803619c: 233d movs r3, #61 ; 0x3d 803619e: 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); 80361a2: 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; 80361a4: 2305 movs r3, #5 80361a6: f88d 3009 strb.w r3, [sp, #9] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 80361aa: f88d 400a strb.w r4, [sp, #10] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 80361ae: f88d 500b strb.w r5, [sp, #11] NVIC_Init(&NVIC_InitStructure); 80361b2: f7ef f875 bl 80252a0 ETH_MACDMA_Config(); /* Config NVIC for Ethernet */ ETH_NVIC_Config(); if (EthInitStatus == 0) { 80361b6: 6833 ldr r3, [r6, #0] 80361b8: b903 cbnz r3, 80361bc 80361ba: e7fe b.n 80361ba // LCD_DisplayStringLine(Line5, (uint8_t*)" Ethernet Init "); // LCD_DisplayStringLine(Line6, (uint8_t*)" failed "); // STM_EVAL_LEDOn(LED5); while(1); } } 80361bc: b034 add sp, #208 ; 0xd0 80361be: bd70 pop {r4, r5, r6, pc} 80361c0: 40020000 .word 0x40020000 80361c4: 40020400 .word 0x40020400 80361c8: 40020800 .word 0x40020800 80361cc: 40021000 .word 0x40021000 80361d0: 2000e5b0 .word 0x2000e5b0 80361d4: 00010040 .word 0x00010040 080361d8 : * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 80361d8: b084 sub sp, #16 __IO uint32_t index = 0; 80361da: 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) { 80361dc: 9001 str r0, [sp, #4] __IO uint32_t index = 0; 80361de: 9303 str r3, [sp, #12] for(index = nCount; index != 0; index--) 80361e0: 9b01 ldr r3, [sp, #4] 80361e2: e001 b.n 80361e8 80361e4: 9b03 ldr r3, [sp, #12] 80361e6: 3b01 subs r3, #1 80361e8: 9303 str r3, [sp, #12] 80361ea: 9b03 ldr r3, [sp, #12] 80361ec: 2b00 cmp r3, #0 80361ee: d1f9 bne.n 80361e4 { } } 80361f0: b004 add sp, #16 80361f2: 4770 bx lr 080361f4 : * @brief Deinitializes the ETHERNET peripheral registers to their default reset values. * @param None * @retval None */ void ETH_DeInit(void) { 80361f4: b508 push {r3, lr} RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); 80361f6: 2101 movs r1, #1 80361f8: f04f 7000 mov.w r0, #33554432 ; 0x2000000 80361fc: f7ef fad6 bl 80257ac RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 8036200: f04f 7000 mov.w r0, #33554432 ; 0x2000000 8036204: 2100 movs r1, #0 } 8036206: 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); 803620a: f7ef bacf b.w 80257ac 0803620e : /* 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; 803620e: f44f 4280 mov.w r2, #16384 ; 0x4000 8036212: 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; 8036214: f44f 6200 mov.w r2, #2048 ; 0x800 8036218: 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; 803621a: 2240 movs r2, #64 ; 0x40 803621c: 6402 str r2, [r0, #64] ; 0x40 /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; 803621e: 2220 movs r2, #32 8036220: 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; 8036222: 2280 movs r2, #128 ; 0x80 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 8036224: 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; 8036226: 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; 8036228: 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; 803622c: 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; 803622e: 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; 8036232: 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; 8036234: 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; 8036238: 6043 str r3, [r0, #4] /* MAC Jabber enabled in Half-duplex mode */ ETH_InitStruct->ETH_Jabber = ETH_Jabber_Enable; 803623a: 6083 str r3, [r0, #8] /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; 803623c: 60c3 str r3, [r0, #12] /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; 803623e: 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; 8036240: 6183 str r3, [r0, #24] /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8036242: 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; 8036244: 6243 str r3, [r0, #36] ; 0x24 /* Retry Transmission enabled for half-duplex mode */ ETH_InitStruct->ETH_RetryTransmission = ETH_RetryTransmission_Enable; 8036246: 6283 str r3, [r0, #40] ; 0x28 /* Automatic PAD/CRC strip disabled*/ ETH_InitStruct->ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8036248: 62c3 str r3, [r0, #44] ; 0x2c /* half-duplex mode retransmission Backoff time_limit = 10 slot times*/ ETH_InitStruct->ETH_BackOffLimit = ETH_BackOffLimit_10; 803624a: 6303 str r3, [r0, #48] ; 0x30 /* half-duplex mode Deferral check disabled */ ETH_InitStruct->ETH_DeferralCheck = ETH_DeferralCheck_Disable; 803624c: 6343 str r3, [r0, #52] ; 0x34 /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; 803624e: 6383 str r3, [r0, #56] ; 0x38 /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; 8036250: 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; 8036252: 6483 str r3, [r0, #72] ; 0x48 /* Promiscuous address filtering mode disabled */ ETH_InitStruct->ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8036254: 64c3 str r3, [r0, #76] ; 0x4c /* Perfect address filtering for multicast addresses */ ETH_InitStruct->ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 8036256: 6503 str r3, [r0, #80] ; 0x50 /* Perfect address filtering for unicast addresses */ ETH_InitStruct->ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8036258: 6543 str r3, [r0, #84] ; 0x54 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; 803625a: 6583 str r3, [r0, #88] ; 0x58 ETH_InitStruct->ETH_HashTableLow = 0x0; 803625c: 65c3 str r3, [r0, #92] ; 0x5c /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; 803625e: 6603 str r3, [r0, #96] ; 0x60 ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; ETH_InitStruct->ETH_PauseLowThreshold = ETH_PauseLowThreshold_Minus4; 8036260: 6683 str r3, [r0, #104] ; 0x68 ETH_InitStruct->ETH_UnicastPauseFrameDetect = ETH_UnicastPauseFrameDetect_Disable; 8036262: 66c3 str r3, [r0, #108] ; 0x6c ETH_InitStruct->ETH_ReceiveFlowControl = ETH_ReceiveFlowControl_Disable; 8036264: 6703 str r3, [r0, #112] ; 0x70 ETH_InitStruct->ETH_TransmitFlowControl = ETH_TransmitFlowControl_Disable; 8036266: 6743 str r3, [r0, #116] ; 0x74 /* VLANtag config (VLAN field not checked) */ ETH_InitStruct->ETH_VLANTagComparison = ETH_VLANTagComparison_16Bit; 8036268: 6783 str r3, [r0, #120] ; 0x78 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; 803626a: 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; 803626c: 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; 8036270: 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; 8036274: f44f 3280 mov.w r2, #65536 ; 0x10000 8036278: 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; 803627c: 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; 8036280: 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; 8036284: f8c0 20ac str.w r2, [r0, #172] ; 0xac ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8036288: 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; 803628c: f8c0 3088 str.w r3, [r0, #136] ; 0x88 /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8036290: 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; 8036294: f8c0 3090 str.w r3, [r0, #144] ; 0x90 /* Disable forwarding frames with errors (short frames, CRC,...)*/ ETH_InitStruct->ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8036298: f8c0 3094 str.w r3, [r0, #148] ; 0x94 /* Disable undersized good frames */ ETH_InitStruct->ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 803629c: 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; 80362a0: 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; 80362a4: 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; 80362a8: f8c0 20b0 str.w r2, [r0, #176] ; 0xb0 /* DMA Ring mode skip length = 0 */ ETH_InitStruct->ETH_DescriptorSkipLength = 0x0; 80362ac: 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; 80362b0: f8c0 30b8 str.w r3, [r0, #184] ; 0xb8 80362b4: 4770 bx lr 80362b6: 0000 movs r0, r0 080362b8 : * @param NewState: new state of the MAC transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACTransmissionCmd(FunctionalState NewState) { 80362b8: 4b04 ldr r3, [pc, #16] ; (80362cc ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 80362ba: 681a ldr r2, [r3, #0] void ETH_MACTransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80362bc: b110 cbz r0, 80362c4 { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 80362be: f042 0208 orr.w r2, r2, #8 80362c2: e001 b.n 80362c8 } else { /* Disable the MAC transmission */ ETH->MACCR &= ~ETH_MACCR_TE; 80362c4: f022 0208 bic.w r2, r2, #8 80362c8: 601a str r2, [r3, #0] 80362ca: 4770 bx lr 80362cc: 40028000 .word 0x40028000 080362d0 : * @param NewState: new state of the MAC reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACReceptionCmd(FunctionalState NewState) { 80362d0: 4b04 ldr r3, [pc, #16] ; (80362e4 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 80362d2: 681a ldr r2, [r3, #0] void ETH_MACReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80362d4: b110 cbz r0, 80362dc { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 80362d6: f042 0204 orr.w r2, r2, #4 80362da: e001 b.n 80362e0 } else { /* Disable the MAC reception */ ETH->MACCR &= ~ETH_MACCR_RE; 80362dc: f022 0204 bic.w r2, r2, #4 80362e0: 601a str r2, [r3, #0] 80362e2: 4770 bx lr 80362e4: 40028000 .word 0x40028000 080362e8 : 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]; 80362e8: 790b ldrb r3, [r1, #4] 80362ea: 794a ldrb r2, [r1, #5] 80362ec: 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; 80362f0: 4b07 ldr r3, [pc, #28] ; (8036310 ) 80362f2: 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]; 80362f4: 788a ldrb r2, [r1, #2] 80362f6: 78cb ldrb r3, [r1, #3] 80362f8: 0412 lsls r2, r2, #16 80362fa: ea42 6203 orr.w r2, r2, r3, lsl #24 80362fe: 780b ldrb r3, [r1, #0] 8036300: 431a orrs r2, r3 8036302: 784b ldrb r3, [r1, #1] 8036304: 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; 8036308: 4b02 ldr r3, [pc, #8] ; (8036314 ) 803630a: 50c2 str r2, [r0, r3] 803630c: 4770 bx lr 803630e: bf00 nop 8036310: 40028040 .word 0x40028040 8036314: 40028044 .word 0x40028044 08036318 : * the receive frame (should be used with interrupt mode only) * @param None * @retval Structure of type FrameTypeDef */ FrameTypeDef ETH_Get_Received_Frame_interrupt(void) { 8036318: b537 push {r0, r1, r2, r4, r5, lr} FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; 803631a: 2300 movs r3, #0 803631c: 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; 803631e: 4b24 ldr r3, [pc, #144] ; (80363b0 ) 8036320: 681a ldr r2, [r3, #0] 8036322: 4b24 ldr r3, [pc, #144] ; (80363b4 ) DMA_RX_FRAME_infos->Seg_Count = 1; 8036324: 2401 movs r4, #1 8036326: 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)&& 8036328: e033 b.n 8036392 (descriptor_scan_counterStatus & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 8036330: 6819 ldr r1, [r3, #0] 8036332: 0589 lsls r1, r1, #22 8036334: d505 bpl.n 8036342 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) 8036336: 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)&& 8036338: 05c9 lsls r1, r1, #23 803633a: d402 bmi.n 8036342 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 803633c: 6013 str r3, [r2, #0] DMA_RX_FRAME_infos->Seg_Count = 1; 803633e: 6094 str r4, [r2, #8] 8036340: e009 b.n 8036356 DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 8036342: 6819 ldr r1, [r3, #0] 8036344: 05c9 lsls r1, r1, #23 8036346: d408 bmi.n 803635a ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) 8036348: 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)&& 803634a: 0589 lsls r1, r1, #22 803634c: d500 bpl.n 8036350 803634e: e004 b.n 803635a ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) { (DMA_RX_FRAME_infos->Seg_Count) ++; 8036350: 6891 ldr r1, [r2, #8] 8036352: 3101 adds r1, #1 8036354: 6091 str r1, [r2, #8] DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8036356: 68db ldr r3, [r3, #12] 8036358: e01b b.n 8036392 803635a: 4a16 ldr r2, [pc, #88] ; (80363b4 ) 803635c: 6013 str r3, [r2, #0] /* should be last segment */ else { /* last segment */ DMA_RX_FRAME_infos->LS_Rx_Desc = DMARxDescToGet; 803635e: 4a14 ldr r2, [pc, #80] ; (80363b0 ) 8036360: 6812 ldr r2, [r2, #0] 8036362: 6053 str r3, [r2, #4] (DMA_RX_FRAME_infos->Seg_Count)++; 8036364: 6891 ldr r1, [r2, #8] 8036366: 3101 adds r1, #1 8036368: 6091 str r1, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) 803636a: 6891 ldr r1, [r2, #8] 803636c: 2901 cmp r1, #1 DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 803636e: bf08 it eq 8036370: 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; 8036372: 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) 8036374: 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; 8036376: f3c1 410d ubfx r1, r1, #16, #14 803637a: 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) 803637c: 2c01 cmp r4, #1 { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 803637e: bf8a itet hi 8036380: 6812 ldrhi r2, [r2, #0] } else { frame.buffer = DMARxDescToGet->Buffer1Addr; 8036382: 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; 8036384: 6892 ldrhi r2, [r2, #8] } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8036386: 4c0b ldr r4, [pc, #44] ; (80363b4 ) 8036388: 68dd ldr r5, [r3, #12] /* Return Frame */ return (frame); 803638a: 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); 803638e: 6025 str r5, [r4, #0] 8036390: e007 b.n 80363a2 { 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)&& 8036392: 6819 ldr r1, [r3, #0] 8036394: 2900 cmp r1, #0 8036396: da06 bge.n 80363a6 8036398: 4a06 ldr r2, [pc, #24] ; (80363b4 ) 803639a: 6013 str r3, [r2, #0] /* Return Frame */ return (frame); } } return (frame); 803639c: 2300 movs r3, #0 803639e: 6003 str r3, [r0, #0] 80363a0: 6043 str r3, [r0, #4] 80363a2: 6083 str r3, [r0, #8] 80363a4: e003 b.n 80363ae 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)&& 80363a8: 2904 cmp r1, #4 80363aa: d9be bls.n 803632a 80363ac: e7f4 b.n 8036398 /* Return Frame */ return (frame); } } return (frame); } 80363ae: bd3e pop {r1, r2, r3, r4, r5, pc} 80363b0: 200133a0 .word 0x200133a0 80363b4: 20011530 .word 0x20011530 080363b8 : { 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) 80363b8: 4b29 ldr r3, [pc, #164] ; (8036460 ) 80363ba: 681b ldr r3, [r3, #0] 80363bc: 681a ldr r2, [r3, #0] 80363be: 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) { 80363c0: 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) 80363c2: db48 blt.n 8036456 return ETH_ERROR; } DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) 80363c4: f240 52f4 movw r2, #1524 ; 0x5f4 80363c8: 4290 cmp r0, r2 80363ca: d917 bls.n 80363fc { buf_count = FrameLength/ETH_TX_BUF_SIZE; 80363cc: fbb0 f4f2 udiv r4, r0, r2 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 80363d0: fb02 0214 mls r2, r2, r4, r0 80363d4: b292 uxth r2, r2 DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) { buf_count = FrameLength/ETH_TX_BUF_SIZE; 80363d6: b2a1 uxth r1, r4 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 80363d8: b10a cbz r2, 80363de 80363da: 3101 adds r1, #1 80363dc: e001 b.n 80363e2 } else buf_count =1; if (buf_count ==1) 80363de: 2901 cmp r1, #1 80363e0: d00c beq.n 80363fc if (i== (buf_count-1)) { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; 80363e2: 4d20 ldr r5, [pc, #128] ; (8036464 ) 80363e4: f200 50f4 addw r0, r0, #1524 ; 0x5f4 80363e8: fb05 0501 mla r5, r5, r1, r0 DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 80363ec: 04ed lsls r5, r5, #19 80363ee: 0ced lsrs r5, r5, #19 80363f0: 461a mov r2, r3 80363f2: 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); 80363f4: f240 56f4 movw r6, #1524 ; 0x5f4 if (i== (buf_count-1)) 80363f8: 1e4f subs r7, r1, #1 80363fa: e00c b.n 8036416 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 80363fc: 681a ldr r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 80363fe: 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; 8036400: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8036404: 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; 8036406: 601a str r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 8036408: 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; 803640a: 681a ldr r2, [r3, #0] 803640c: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 8036410: 601a str r2, [r3, #0] DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); 8036412: 68da ldr r2, [r3, #12] 8036414: e014 b.n 8036440 } else { for (i=0; i< buf_count; i++) { if (i==0) 8036416: b918 cbnz r0, 8036420 { /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; 8036418: 681c ldr r4, [r3, #0] 803641a: f044 5480 orr.w r4, r4, #268435456 ; 0x10000000 803641e: 601c str r4, [r3, #0] } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); if (i== (buf_count-1)) 8036420: 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); 8036422: 6056 str r6, [r2, #4] if (i== (buf_count-1)) 8036424: d104 bne.n 8036430 { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; 8036426: 6814 ldr r4, [r2, #0] 8036428: f044 5400 orr.w r4, r4, #536870912 ; 0x20000000 803642c: 6014 str r4, [r2, #0] size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 803642e: 6055 str r5, [r2, #4] } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 8036430: 6814 ldr r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 8036432: 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; 8036434: f044 4400 orr.w r4, r4, #2147483648 ; 0x80000000 8036438: 6014 str r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 803643a: 4288 cmp r0, r1 } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); 803643c: 68d2 ldr r2, [r2, #12] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 803643e: d3ea bcc.n 8036416 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 ; 8036440: 4b07 ldr r3, [pc, #28] ; (8036460 ) 8036442: 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) 8036444: 4b08 ldr r3, [pc, #32] ; (8036468 ) 8036446: 695a ldr r2, [r3, #20] 8036448: 0750 lsls r0, r2, #29 803644a: d506 bpl.n 803645a { /* Clear TBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_TBUS; 803644c: 2204 movs r2, #4 803644e: 615a str r2, [r3, #20] /* Resume DMA transmission*/ ETH->DMATPDR = 0; 8036450: 2200 movs r2, #0 8036452: 605a str r2, [r3, #4] 8036454: e001 b.n 803645a /* 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; 8036456: 2000 movs r0, #0 8036458: bdf0 pop {r4, r5, r6, r7, pc} /* Resume DMA transmission*/ ETH->DMATPDR = 0; } /* Return SUCCESS */ return ETH_SUCCESS; 803645a: 2001 movs r0, #1 } 803645c: bdf0 pop {r4, r5, r6, r7, pc} 803645e: bf00 nop 8036460: 20011534 .word 0x20011534 8036464: fffffa0c .word 0xfffffa0c 8036468: 40029000 .word 0x40029000 0803646c : { uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 803646c: 4b11 ldr r3, [pc, #68] ; (80364b4 ) * @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) { 803646e: 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; 8036470: 6018 str r0, [r3, #0] /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8036472: 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) 8036474: 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; 8036478: 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; 803647c: 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)) 8036480: 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++) 8036482: e00f b.n 80364a4 /* 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); 8036484: 42bc cmp r4, r7 8036486: bf2c ite cs 8036488: 4684 movcs ip, r0 803648a: 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]); 803648c: 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; 8036490: 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; 8036494: 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); 8036498: 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++) 803649c: 3401 adds r4, #1 803649e: 3320 adds r3, #32 80364a0: f201 51f4 addw r1, r1, #1524 ; 0x5f4 80364a4: 4294 cmp r4, r2 80364a6: d1ed bne.n 8036484 DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 80364a8: 4b03 ldr r3, [pc, #12] ; (80364b8 ) DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 80364aa: 4a04 ldr r2, [pc, #16] ; (80364bc ) DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 80364ac: 60d8 str r0, [r3, #12] DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 80364ae: 4b04 ldr r3, [pc, #16] ; (80364c0 ) 80364b0: 601a str r2, [r3, #0] 80364b2: bdf0 pop {r4, r5, r6, r7, pc} 80364b4: 20011530 .word 0x20011530 80364b8: 40029000 .word 0x40029000 80364bc: 20011524 .word 0x20011524 80364c0: 200133a0 .word 0x200133a0 080364c4 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 80364c4: 4b0e ldr r3, [pc, #56] ; (8036500 ) * @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) { 80364c6: 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; 80364c8: 6018 str r0, [r3, #0] /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 80364ca: 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) 80364cc: 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; 80364d0: 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)) 80364d4: 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++) 80364d6: e00d b.n 80364f4 /* 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); 80364d8: 42b4 cmp r4, r6 80364da: bf2c ite cs 80364dc: 4607 movcs r7, r0 80364de: 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]); 80364e0: 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; 80364e4: 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); 80364e8: 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++) 80364ec: 3401 adds r4, #1 80364ee: 3320 adds r3, #32 80364f0: f201 51f4 addw r1, r1, #1524 ; 0x5f4 80364f4: 4294 cmp r4, r2 80364f6: d1ef bne.n 80364d8 DMATxDesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Desciptor List Address Register */ ETH->DMATDLAR = (uint32_t) DMATxDescTab; 80364f8: 4b02 ldr r3, [pc, #8] ; (8036504 ) 80364fa: 6118 str r0, [r3, #16] 80364fc: bdf0 pop {r4, r5, r6, r7, pc} 80364fe: bf00 nop 8036500: 20011534 .word 0x20011534 8036504: 40029000 .word 0x40029000 08036508 : { /* 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; 8036508: 6803 ldr r3, [r0, #0] 803650a: 4319 orrs r1, r3 803650c: 6001 str r1, [r0, #0] 803650e: 4770 bx lr 08036510 : * @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) { 8036510: 6843 ldr r3, [r0, #4] /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8036512: b111 cbz r1, 803651a { /* Enable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARxDesc_DIC); 8036514: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000 8036518: e001 b.n 803651e } else { /* Disable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize |= ETH_DMARxDesc_DIC; 803651a: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 803651e: 6043 str r3, [r0, #4] 8036520: 4770 bx lr 8036522: 0000 movs r0, r0 08036524 : */ 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; 8036524: 4b02 ldr r3, [pc, #8] ; (8036530 ) 8036526: 681a ldr r2, [r3, #0] 8036528: f042 0201 orr.w r2, r2, #1 803652c: 601a str r2, [r3, #0] 803652e: 4770 bx lr 8036530: 40029000 .word 0x40029000 08036534 : * @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) 8036534: 4b02 ldr r3, [pc, #8] ; (8036540 ) 8036536: 6818 ldr r0, [r3, #0] else { bitstatus = RESET; } return bitstatus; } 8036538: f000 0001 and.w r0, r0, #1 803653c: 4770 bx lr 803653e: bf00 nop 8036540: 40029000 .word 0x40029000 08036544 : 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) 8036544: 4b03 ldr r3, [pc, #12] ; (8036554 ) 8036546: 695b ldr r3, [r3, #20] 8036548: 4218 tst r0, r3 else { bitstatus = RESET; } return bitstatus; } 803654a: bf0c ite eq 803654c: 2000 moveq r0, #0 803654e: 2001 movne r0, #1 8036550: 4770 bx lr 8036552: bf00 nop 8036554: 40029000 .word 0x40029000 08036558 : * @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) { 8036558: 4b04 ldr r3, [pc, #16] ; (803656c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803655a: 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) 803655c: b109 cbz r1, 8036562 { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803655e: 4310 orrs r0, r2 8036560: e001 b.n 8036566 } else { /* Disable the selected ETHERNET DMA interrupts */ ETH->DMAIER &=(~(uint32_t)ETH_DMA_IT); 8036562: ea22 0000 bic.w r0, r2, r0 8036566: 61d8 str r0, [r3, #28] 8036568: 4770 bx lr 803656a: bf00 nop 803656c: 40029000 .word 0x40029000 08036570 : { /* 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; 8036570: 4b01 ldr r3, [pc, #4] ; (8036578 ) 8036572: 6158 str r0, [r3, #20] 8036574: 4770 bx lr 8036576: bf00 nop 8036578: 40029000 .word 0x40029000 0803657c : * @retval None */ void ETH_FlushTransmitFIFO(void) { /* Set the Flush Transmit FIFO bit */ ETH->DMAOMR |= ETH_DMAOMR_FTF; 803657c: 4b02 ldr r3, [pc, #8] ; (8036588 ) 803657e: 699a ldr r2, [r3, #24] 8036580: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 8036584: 619a str r2, [r3, #24] 8036586: 4770 bx lr 8036588: 40029000 .word 0x40029000 0803658c : * @param NewState: new state of the DMA transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMATransmissionCmd(FunctionalState NewState) { 803658c: 4b04 ldr r3, [pc, #16] ; (80365a0 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 803658e: 699a ldr r2, [r3, #24] void ETH_DMATransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8036590: b110 cbz r0, 8036598 { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 8036592: f442 5200 orr.w r2, r2, #8192 ; 0x2000 8036596: e001 b.n 803659c } else { /* Disable the DMA transmission */ ETH->DMAOMR &= ~ETH_DMAOMR_ST; 8036598: f422 5200 bic.w r2, r2, #8192 ; 0x2000 803659c: 619a str r2, [r3, #24] 803659e: 4770 bx lr 80365a0: 40029000 .word 0x40029000 080365a4 : * @param NewState: new state of the DMA reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAReceptionCmd(FunctionalState NewState) { 80365a4: 4b04 ldr r3, [pc, #16] ; (80365b8 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 80365a6: 699a ldr r2, [r3, #24] void ETH_DMAReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80365a8: b110 cbz r0, 80365b0 { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 80365aa: f042 0202 orr.w r2, r2, #2 80365ae: e001 b.n 80365b4 } else { /* Disable the DMA reception */ ETH->DMAOMR &= ~ETH_DMAOMR_SR; 80365b0: f022 0202 bic.w r2, r2, #2 80365b4: 619a str r2, [r3, #24] 80365b6: 4770 bx lr 80365b8: 40029000 .word 0x40029000 080365bc : * @brief Enables ENET MAC and DMA reception/transmission * @param None * @retval None */ void ETH_Start(void) { 80365bc: b508 push {r3, lr} /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionCmd(ENABLE); 80365be: 2001 movs r0, #1 80365c0: f7ff fe7a bl 80362b8 /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(); 80365c4: f7ff ffda bl 803657c /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionCmd(ENABLE); 80365c8: 2001 movs r0, #1 80365ca: f7ff fe81 bl 80362d0 /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); 80365ce: 2001 movs r0, #1 80365d0: f7ff ffdc bl 803658c /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 80365d4: 2001 movs r0, #1 } 80365d6: e8bd 4008 ldmia.w sp!, {r3, lr} ETH_MACReceptionCmd(ENABLE); /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 80365da: f7ff bfe3 b.w 80365a4 80365de: 0000 movs r0, r0 080365e0 : * @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) { 80365e0: b082 sub sp, #8 uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 80365e2: 2300 movs r3, #0 80365e4: 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; 80365e6: 4b11 ldr r3, [pc, #68] ; (803662c ) 80365e8: 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 */ 80365ea: 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; 80365ec: 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 */ 80365f0: 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 */ 80365f2: ea42 4210 orr.w r2, r2, r0, lsr #16 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 80365f6: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ 80365fa: 430a orrs r2, r1 tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 80365fc: f042 0201 orr.w r2, r2, #1 /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 8036600: 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)); 8036602: 4a0b ldr r2, [pc, #44] ; (8036630 ) /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; /* Check for the Busy flag */ do { timeout++; 8036604: 9901 ldr r1, [sp, #4] 8036606: 3101 adds r1, #1 8036608: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 803660a: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 803660c: 07c9 lsls r1, r1, #31 803660e: d502 bpl.n 8036616 8036610: 9901 ldr r1, [sp, #4] 8036612: 4291 cmp r1, r2 8036614: d9f6 bls.n 8036604 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8036616: 4b07 ldr r3, [pc, #28] ; (8036634 ) 8036618: 9a01 ldr r2, [sp, #4] 803661a: 429a cmp r2, r3 { return (uint16_t)ETH_ERROR; } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); 803661c: bf1d ittte ne 803661e: 4b03 ldrne r3, [pc, #12] ; (803662c ) 8036620: 6958 ldrne r0, [r3, #20] 8036622: 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; 8036624: 2000 moveq r0, #0 } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); } 8036626: b002 add sp, #8 8036628: 4770 bx lr 803662a: bf00 nop 803662c: 40028000 .word 0x40028000 8036630: 0004fffe .word 0x0004fffe 8036634: 0004ffff .word 0x0004ffff 08036638 : * @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) { 8036638: b513 push {r0, r1, r4, lr} uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 803663a: 2300 movs r3, #0 803663c: 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; 803663e: 4b0f ldr r3, [pc, #60] ; (803667c ) 8036640: 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; 8036642: 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; 8036644: 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 */ 8036648: f044 0403 orr.w r4, r4, #3 803664c: 06c0 lsls r0, r0, #27 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 803664e: 0189 lsls r1, r1, #6 8036650: ea44 4410 orr.w r4, r4, r0, lsr #16 8036654: 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 */ 8036658: 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)); 803665a: 4a09 ldr r2, [pc, #36] ; (8036680 ) 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; 803665c: 611c str r4, [r3, #16] /* Check for the Busy flag */ do { timeout++; 803665e: 9901 ldr r1, [sp, #4] 8036660: 3101 adds r1, #1 8036662: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 8036664: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 8036666: 07c8 lsls r0, r1, #31 8036668: d502 bpl.n 8036670 803666a: 9901 ldr r1, [sp, #4] 803666c: 4291 cmp r1, r2 803666e: d9f6 bls.n 803665e /* Return ERROR in case of timeout */ if(timeout == PHY_WRITE_TO) 8036670: 9801 ldr r0, [sp, #4] return ETH_ERROR; } /* Return SUCCESS */ return ETH_SUCCESS; } 8036672: 4b04 ldr r3, [pc, #16] ; (8036684 ) 8036674: 1ac0 subs r0, r0, r3 8036676: bf18 it ne 8036678: 2001 movne r0, #1 803667a: bd1c pop {r2, r3, r4, pc} 803667c: 40028000 .word 0x40028000 8036680: 0004fffe .word 0x0004fffe 8036684: 0004ffff .word 0x0004ffff 08036688 : * @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) { 8036688: b5f0 push {r4, r5, r6, r7, lr} 803668a: b087 sub sp, #28 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 803668c: 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; 803668e: 4f90 ldr r7, [pc, #576] ; (80368d0 ) * 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; 8036690: 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) { 8036692: 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; 8036694: 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); 8036696: 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) { 8036698: 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; 803669a: 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); 803669c: f7ee fff2 bl 8025684 hclk = rcc_clocks.HCLK_Frequency; 80366a0: 9b03 ldr r3, [sp, #12] /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 80366a2: 4a8c ldr r2, [pc, #560] ; (80368d4 ) 80366a4: 498c ldr r1, [pc, #560] ; (80368d8 ) 80366a6: 189a adds r2, r3, r2 80366a8: 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; 80366aa: 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)) 80366ae: d802 bhi.n 80366b6 { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; 80366b0: f045 0508 orr.w r5, r5, #8 80366b4: e015 b.n 80366e2 } else if((hclk >= 35000000)&&(hclk < 60000000)) 80366b6: 4a89 ldr r2, [pc, #548] ; (80368dc ) 80366b8: 4989 ldr r1, [pc, #548] ; (80368e0 ) 80366ba: 189a adds r2, r3, r2 80366bc: 428a cmp r2, r1 80366be: d802 bhi.n 80366c6 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; 80366c0: f045 050c orr.w r5, r5, #12 80366c4: e00d b.n 80366e2 } else if((hclk >= 60000000)&&(hclk < 100000000)) 80366c6: 4a87 ldr r2, [pc, #540] ; (80368e4 ) 80366c8: 4987 ldr r1, [pc, #540] ; (80368e8 ) 80366ca: 189a adds r2, r3, r2 80366cc: 428a cmp r2, r1 80366ce: d908 bls.n 80366e2 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) 80366d0: 4a86 ldr r2, [pc, #536] ; (80368ec ) 80366d2: 189a adds r2, r3, r2 80366d4: 4b86 ldr r3, [pc, #536] ; (80368f0 ) 80366d6: 429a cmp r2, r3 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; 80366d8: bf94 ite ls 80366da: 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; 80366de: f045 0510 orrhi.w r5, r5, #16 } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ ETH->MACMIIAR = (uint32_t)tmpreg; 80366e2: 613d str r5, [r7, #16] /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_Reset))) 80366e4: 4630 mov r0, r6 80366e6: 2100 movs r1, #0 80366e8: f44f 4200 mov.w r2, #32768 ; 0x8000 80366ec: f7ff ffa4 bl 8036638 80366f0: b908 cbnz r0, 80366f6 { /* Return ERROR in case of write timeout */ return ETH_ERROR; 80366f2: 2000 movs r0, #0 80366f4: e0e9 b.n 80368ca } /* Delay to assure PHY reset */ _eth_delay_(PHY_RESET_DELAY); 80366f6: 487f ldr r0, [pc, #508] ; (80368f4 ) 80366f8: f7ff fd6e bl 80361d8 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) 80366fc: 6821 ldr r1, [r4, #0] 80366fe: 2900 cmp r1, #0 8036700: d050 beq.n 80367a4 { /* We wait for linked status... */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8036702: 4d7d ldr r5, [pc, #500] ; (80368f8 ) if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8036704: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 8036706: 4630 mov r0, r6 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 8036708: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803670a: 2101 movs r1, #1 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 803670c: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 803670e: f7ff ff67 bl 80365e0 8036712: f000 0004 and.w r0, r0, #4 8036716: b280 uxth r0, r0 8036718: b910 cbnz r0, 8036720 803671a: 9b01 ldr r3, [sp, #4] 803671c: 42ab cmp r3, r5 803671e: d9f1 bls.n 8036704 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8036720: 9a01 ldr r2, [sp, #4] 8036722: 4b76 ldr r3, [pc, #472] ; (80368fc ) 8036724: 429a cmp r2, r3 8036726: d0e4 beq.n 80366f2 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8036728: 2100 movs r1, #0 /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 803672a: 4630 mov r0, r6 803672c: f44f 5280 mov.w r2, #4096 ; 0x1000 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8036730: 9101 str r1, [sp, #4] /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 8036732: f7ff ff81 bl 8036638 8036736: 2800 cmp r0, #0 8036738: d0db beq.n 80366f2 /* 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)); 803673a: 4d6f ldr r5, [pc, #444] ; (80368f8 ) } /* Wait until the auto-negotiation will be completed */ do { timeout++; 803673c: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 803673e: 4630 mov r0, r6 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8036740: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8036742: 2101 movs r1, #1 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8036744: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8036746: f7ff ff4b bl 80365e0 803674a: f000 0020 and.w r0, r0, #32 803674e: b280 uxth r0, r0 8036750: b910 cbnz r0, 8036758 8036752: 9b01 ldr r3, [sp, #4] 8036754: 42ab cmp r3, r5 8036756: d9f1 bls.n 803673c /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 8036758: 9a01 ldr r2, [sp, #4] 803675a: 4b68 ldr r3, [pc, #416] ; (80368fc ) 803675c: 429a cmp r2, r3 803675e: d0c8 beq.n 80366f2 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8036760: 2500 movs r5, #0 /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8036762: 211f movs r1, #31 8036764: 4630 mov r0, r6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8036766: 9501 str r5, [sp, #4] /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8036768: f7ff ff3a bl 80365e0 switch (RegValue & PHY_DUPLEX_SPEED_STATUS_MASK) 803676c: f000 001c and.w r0, r0, #28 8036770: 2808 cmp r0, #8 8036772: d00b beq.n 803678c 8036774: d802 bhi.n 803677c 8036776: 2804 cmp r0, #4 8036778: d123 bne.n 80367c2 803677a: e010 b.n 803679e 803677c: 280e cmp r0, #14 803677e: d00a beq.n 8036796 8036780: 2812 cmp r0, #18 8036782: d11e bne.n 80367c2 { case PHY_100BTX_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8036784: f44f 6300 mov.w r3, #2048 ; 0x800 8036788: 6223 str r3, [r4, #32] 803678a: e000 b.n 803678e ETH_InitStruct->ETH_Speed = ETH_Speed_100M; break; case PHY_100BTX_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 803678c: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 803678e: f44f 4380 mov.w r3, #16384 ; 0x4000 8036792: 6163 str r3, [r4, #20] break; 8036794: e015 b.n 80367c2 case PHY_10M_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8036796: f44f 6300 mov.w r3, #2048 ; 0x800 803679a: 6223 str r3, [r4, #32] 803679c: e000 b.n 80367a0 ETH_InitStruct->ETH_Speed = ETH_Speed_10M; break; case PHY_10M_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 803679e: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_10M; 80367a0: 6165 str r5, [r4, #20] break; 80367a2: e00e b.n 80367c2 break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 80367a4: 6a22 ldr r2, [r4, #32] (uint16_t)(ETH_InitStruct->ETH_Speed >> 1)))) 80367a6: 6963 ldr r3, [r4, #20] break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 80367a8: 08d2 lsrs r2, r2, #3 80367aa: ea42 0253 orr.w r2, r2, r3, lsr #1 80367ae: 4630 mov r0, r6 80367b0: b292 uxth r2, r2 80367b2: f7ff ff41 bl 8036638 80367b6: 2800 cmp r0, #0 80367b8: d09b beq.n 80366f2 { /* Return ERROR in case of write timeout */ return ETH_ERROR; } /* Delay to assure PHY configuration */ _eth_delay_(PHY_CONFIG_DELAY); 80367ba: f06f 407f mvn.w r0, #4278190080 ; 0xff000000 80367be: f7ff fd0b bl 80361d8 } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 80367c2: 4b43 ldr r3, [pc, #268] ; (80368d0 ) /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 80367c4: 4a4e ldr r2, [pc, #312] ; (8036900 ) _eth_delay_(PHY_CONFIG_DELAY); } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 80367c6: 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 | 80367c8: 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; 80367ca: 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 | 80367cc: 6861 ldr r1, [r4, #4] 80367ce: 4308 orrs r0, r1 ETH_InitStruct->ETH_Jabber | 80367d0: 68e1 ldr r1, [r4, #12] 80367d2: 4308 orrs r0, r1 ETH_InitStruct->ETH_InterFrameGap | 80367d4: 6921 ldr r1, [r4, #16] 80367d6: 4308 orrs r0, r1 ETH_InitStruct->ETH_CarrierSense | 80367d8: 6961 ldr r1, [r4, #20] 80367da: 4308 orrs r0, r1 ETH_InitStruct->ETH_Speed | 80367dc: 69a1 ldr r1, [r4, #24] 80367de: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveOwn | 80367e0: 69e1 ldr r1, [r4, #28] 80367e2: 4308 orrs r0, r1 ETH_InitStruct->ETH_LoopbackMode | 80367e4: 6a21 ldr r1, [r4, #32] 80367e6: 4308 orrs r0, r1 ETH_InitStruct->ETH_Mode | 80367e8: 6a61 ldr r1, [r4, #36] ; 0x24 80367ea: 4308 orrs r0, r1 ETH_InitStruct->ETH_ChecksumOffload | 80367ec: 6aa1 ldr r1, [r4, #40] ; 0x28 80367ee: 4308 orrs r0, r1 ETH_InitStruct->ETH_RetryTransmission | 80367f0: 6ae1 ldr r1, [r4, #44] ; 0x2c 80367f2: 4308 orrs r0, r1 ETH_InitStruct->ETH_AutomaticPadCRCStrip | 80367f4: 6b21 ldr r1, [r4, #48] ; 0x30 80367f6: 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 | 80367f8: 6b61 ldr r1, [r4, #52] ; 0x34 80367fa: 4301 orrs r1, r0 80367fc: 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; 80367fe: 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 | 8036800: 6ba2 ldr r2, [r4, #56] ; 0x38 8036802: 6be1 ldr r1, [r4, #60] ; 0x3c 8036804: 4311 orrs r1, r2 ETH_InitStruct->ETH_SourceAddrFilter | 8036806: 6c22 ldr r2, [r4, #64] ; 0x40 8036808: 4311 orrs r1, r2 ETH_InitStruct->ETH_PassControlFrames | 803680a: 6c62 ldr r2, [r4, #68] ; 0x44 803680c: 4311 orrs r1, r2 ETH_InitStruct->ETH_BroadcastFramesReception | 803680e: 6ca2 ldr r2, [r4, #72] ; 0x48 8036810: 4311 orrs r1, r2 ETH_InitStruct->ETH_DestinationAddrFilter | 8036812: 6ce2 ldr r2, [r4, #76] ; 0x4c 8036814: 4311 orrs r1, r2 ETH_InitStruct->ETH_PromiscuousMode | 8036816: 6d22 ldr r2, [r4, #80] ; 0x50 8036818: 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 | 803681a: 6d62 ldr r2, [r4, #84] ; 0x54 803681c: 430a orrs r2, r1 803681e: 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; 8036820: 6da2 ldr r2, [r4, #88] ; 0x58 8036822: 609a str r2, [r3, #8] /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; 8036824: 6de2 ldr r2, [r4, #92] ; 0x5c 8036826: 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) | 8036828: 6e62 ldr r2, [r4, #100] ; 0x64 803682a: 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; 803682c: 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) | 803682e: 4311 orrs r1, r2 ETH_InitStruct->ETH_ZeroQuantaPause | 8036830: 6ee2 ldr r2, [r4, #108] ; 0x6c 8036832: 4311 orrs r1, r2 ETH_InitStruct->ETH_PauseLowThreshold | 8036834: 6f22 ldr r2, [r4, #112] ; 0x70 8036836: 4311 orrs r1, r2 ETH_InitStruct->ETH_UnicastPauseFrameDetect | 8036838: 6f62 ldr r2, [r4, #116] ; 0x74 803683a: 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; 803683c: f64f 7241 movw r2, #65345 ; 0xff41 8036840: 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) | 8036842: 430a orrs r2, r1 8036844: 6e21 ldr r1, [r4, #96] ; 0x60 8036846: 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; 803684a: 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 | 803684c: 6fe1 ldr r1, [r4, #124] ; 0x7c 803684e: 6fa2 ldr r2, [r4, #120] ; 0x78 8036850: 430a orrs r2, r1 8036852: 61da str r2, [r3, #28] ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8036854: f503 5380 add.w r3, r3, #4096 ; 0x1000 /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8036858: 4a2a ldr r2, [pc, #168] ; (8036904 ) ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 803685a: 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 | 803685c: 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; 8036860: 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 | 8036862: f8d4 1080 ldr.w r1, [r4, #128] ; 0x80 8036866: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveStoreForward | 8036868: f8d4 1088 ldr.w r1, [r4, #136] ; 0x88 803686c: 4308 orrs r0, r1 ETH_InitStruct->ETH_FlushReceivedFrame | 803686e: f8d4 108c ldr.w r1, [r4, #140] ; 0x8c 8036872: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitStoreForward | 8036874: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 8036878: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitThresholdControl | 803687a: f8d4 1094 ldr.w r1, [r4, #148] ; 0x94 803687e: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardErrorFrames | 8036880: f8d4 1098 ldr.w r1, [r4, #152] ; 0x98 8036884: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | 8036886: f8d4 109c ldr.w r1, [r4, #156] ; 0x9c 803688a: 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 | 803688c: f8d4 10a0 ldr.w r1, [r4, #160] ; 0xa0 8036890: 4301 orrs r1, r0 8036892: 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; 8036894: 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 | 8036896: f8d4 20a8 ldr.w r2, [r4, #168] ; 0xa8 803689a: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 803689e: 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 */ 80368a0: 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 | 80368a4: 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 */ 80368a8: 4311 orrs r1, r2 ETH_InitStruct->ETH_TxDMABurstLength | 80368aa: f8d4 20b0 ldr.w r2, [r4, #176] ; 0xb0 80368ae: 4311 orrs r1, r2 (ETH_InitStruct->ETH_DescriptorSkipLength << 2) | 80368b0: f8d4 20b8 ldr.w r2, [r4, #184] ; 0xb8 80368b4: 430a orrs r2, r1 80368b6: 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 | 80368ba: ea42 0281 orr.w r2, r2, r1, lsl #2 80368be: 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; 80368c0: 681a ldr r2, [r3, #0] 80368c2: f042 0280 orr.w r2, r2, #128 ; 0x80 80368c6: 601a str r2, [r3, #0] #endif /* USE_ENHANCED_DMA_DESCRIPTORS */ /* Return Ethernet configuration success */ return ETH_SUCCESS; 80368c8: 2001 movs r0, #1 } 80368ca: b007 add sp, #28 80368cc: bdf0 pop {r4, r5, r6, r7, pc} 80368ce: bf00 nop 80368d0: 40028000 .word 0x40028000 80368d4: feced300 .word 0xfeced300 80368d8: 00e4e1bf .word 0x00e4e1bf 80368dc: fde9f140 .word 0xfde9f140 80368e0: 017d783f .word 0x017d783f 80368e4: fc6c7900 .word 0xfc6c7900 80368e8: 026259ff .word 0x026259ff 80368ec: fa0a1f00 .word 0xfa0a1f00 80368f0: 02faf07f .word 0x02faf07f 80368f4: 000fffff .word 0x000fffff 80368f8: 0004fffe .word 0x0004fffe 80368fc: 0004ffff .word 0x0004ffff 8036900: ff20810f .word 0xff20810f 8036904: f8de3f23 .word 0xf8de3f23 08036908 <_sbrk>: extern char _ebss; // Defined by the linker extern char __bss_end__; static char *heap_end; char *prev_heap_end; if (heap_end == 0) { 8036908: 4b0a ldr r3, [pc, #40] ; (8036934 <_sbrk+0x2c>) 803690a: 681a ldr r2, [r3, #0] 803690c: b90a cbnz r2, 8036912 <_sbrk+0xa> //heap_end = &_ebss; heap_end = &__bss_end__; 803690e: 4a0a ldr r2, [pc, #40] ; (8036938 <_sbrk+0x30>) 8036910: 601a str r2, [r3, #0] } prev_heap_end = heap_end; 8036912: 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) ); 8036914: f3ef 8208 mrs r2, MSP char * stack = (char*) __get_MSP(); if (heap_end + incr > stack) 8036918: 1818 adds r0, r3, r0 803691a: 4290 cmp r0, r2 803691c: d905 bls.n 803692a <_sbrk+0x22> { _write (STDERR_FILENO, "Heap and stack collision\n", 25); errno = ENOMEM; 803691e: 4b07 ldr r3, [pc, #28] ; (803693c <_sbrk+0x34>) 8036920: 220c movs r2, #12 8036922: 601a str r2, [r3, #0] return (caddr_t) -1; 8036924: f04f 33ff mov.w r3, #4294967295 8036928: e001 b.n 803692e <_sbrk+0x26> //abort (); } heap_end += incr; 803692a: 4a02 ldr r2, [pc, #8] ; (8036934 <_sbrk+0x2c>) 803692c: 6010 str r0, [r2, #0] return (caddr_t) prev_heap_end; } 803692e: 4618 mov r0, r3 8036930: 4770 bx lr 8036932: bf00 nop 8036934: 2000e5b4 .word 0x2000e5b4 8036938: 2001530c .word 0x2001530c 803693c: 20015208 .word 0x20015208 08036940 : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 8036940: 2100 movs r1, #0 b LoopCopyDataInit 8036942: f000 b804 b.w 803694e 08036946 : CopyDataInit: ldr r3, =_sidata 8036946: 4b0d ldr r3, [pc, #52] ; (803697c ) ldr r3, [r3, r1] 8036948: 585b ldr r3, [r3, r1] str r3, [r0, r1] 803694a: 5043 str r3, [r0, r1] adds r1, r1, #4 803694c: 3104 adds r1, #4 0803694e : LoopCopyDataInit: ldr r0, =_sdata 803694e: 480c ldr r0, [pc, #48] ; (8036980 ) ldr r3, =_edata 8036950: 4b0c ldr r3, [pc, #48] ; (8036984 ) adds r2, r0, r1 8036952: 1842 adds r2, r0, r1 cmp r2, r3 8036954: 429a cmp r2, r3 bcc CopyDataInit 8036956: f4ff aff6 bcc.w 8036946 ldr r2, =_sbss 803695a: 4a0b ldr r2, [pc, #44] ; (8036988 ) b LoopFillZerobss 803695c: f000 b803 b.w 8036966 08036960 : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 8036960: 2300 movs r3, #0 str r3, [r2], #4 8036962: f842 3b04 str.w r3, [r2], #4 08036966 : LoopFillZerobss: ldr r3, = _ebss 8036966: 4b09 ldr r3, [pc, #36] ; (803698c ) cmp r2, r3 8036968: 429a cmp r2, r3 bcc FillZerobss 803696a: f4ff aff9 bcc.w 8036960 /* Call the clock system intitialization function.*/ bl SystemInit 803696e: f7ef fa09 bl 8025d84 /* Call static constructors */ bl __libc_init_array 8036972: f7ea ff8d bl 8021890 <__libc_init_array> /* Call the application's entry point.*/ bl main 8036976: f7f0 faaf bl 8026ed8
bx lr 803697a: 4770 bx lr /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit CopyDataInit: ldr r3, =_sidata 803697c: 08041f2c .word 0x08041f2c ldr r3, [r3, r1] str r3, [r0, r1] adds r1, r1, #4 LoopCopyDataInit: ldr r0, =_sdata 8036980: 20000000 .word 0x20000000 ldr r3, =_edata 8036984: 20001988 .word 0x20001988 adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit ldr r2, =_sbss 8036988: 20001988 .word 0x20001988 FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, = _ebss 803698c: 2001530c .word 0x2001530c 08036990 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8036990: f7ff bffe b.w 8036990 08036994 <_ctype_>: 8036994: 2000 2020 2020 2020 2020 2828 2828 2028 . ((((( 80369a4: 2020 2020 2020 2020 2020 2020 2020 2020 80369b4: 8820 1010 1010 1010 1010 1010 1010 1010 ............... 80369c4: 0410 0404 0404 0404 0404 1004 1010 1010 ................ 80369d4: 1010 4141 4141 4141 0101 0101 0101 0101 ..AAAAAA........ 80369e4: 0101 0101 0101 0101 0101 0101 1010 1010 ................ 80369f4: 1010 4242 4242 4242 0202 0202 0202 0202 ..BBBBBB........ 8036a04: 0202 0202 0202 0202 0202 0202 1010 1010 ................ 8036a14: 0020 0000 0000 0000 0000 0000 0000 0000 ............... 8036a24: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a34: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a44: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a54: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a64: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a74: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a84: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8036a94: 0000 0000 .... 08036a98 : 8036a98: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 8036aa8: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 8036ab8: 6f43 64ac 0628 0e18 Co.d(... 08036ac0 : 8036ac0: 0005 0000 0019 0000 007d 0000 0000 0000 ........}....... 08036ad0 <__mprec_tens>: 8036ad0: 0000 0000 0000 3ff0 0000 0000 0000 4024 .......?......$@ 8036ae0: 0000 0000 0000 4059 0000 0000 4000 408f ......Y@.....@.@ 8036af0: 0000 0000 8800 40c3 0000 0000 6a00 40f8 .......@.....j.@ 8036b00: 0000 0000 8480 412e 0000 0000 12d0 4163 .......A......cA 8036b10: 0000 0000 d784 4197 0000 0000 cd65 41cd .......A....e..A 8036b20: 0000 2000 a05f 4202 0000 e800 4876 4237 ... _..B....vH7B 8036b30: 0000 a200 1a94 426d 0000 e540 309c 42a2 ......mB..@..0.B 8036b40: 0000 1e90 bcc4 42d6 0000 2634 6bf5 430c .......B..4&.k.C 8036b50: 8000 37e0 c379 4341 a000 85d8 3457 4376 ...7y.AC....W4vC 8036b60: c800 674e c16d 43ab 3d00 6091 58e4 43e1 ..Ngm..C.=.`.X.C 8036b70: 8c40 78b5 af1d 4415 ef50 d6e2 1ae4 444b @..x...DP.....KD 8036b80: d592 064d f0cf 4480 4af6 c7e1 2d02 44b5 ..M....D.J...-.D 8036b90: 9db4 79d9 7843 44ea ...yCx.D 08036b98 <__mprec_tinytens>: 8036b98: 89bc 97d8 d2b2 3c9c a733 d5a8 f623 3949 .......<3...#.I9 8036ba8: a73d 44f4 0ffd 32a5 979d cf8c ba08 255b =..D...2......[% 8036bb8: 6f43 64ac 0628 0ac8 Co.d(... 08036bc0 <__mprec_bigtens>: 8036bc0: 8000 37e0 c379 4341 6e17 b505 b8b5 4693 ...7y.AC.n.....F 8036bd0: f9f5 e93f 4f03 4d38 1d32 f930 7748 5a82 ..?..O8M2.0.Hw.Z 8036be0: bf3c 7f73 4fdd 7515 454c 5f44 6c42 6e69 <.s..O.uLED_Blin 8036bf0: 006b 7542 7474 6e6f 0073 5055 5f53 6f4d k.Buttons.UPS_Mo 8036c00: 696e 6f74 0072 6e73 706d 7953 5573 5470 nitor.snmpSysUpT 8036c10: 6d69 0065 6e73 706d 7254 7061 6554 7473 ime.snmpTrapTest 8036c20: 7300 746e 4f70 636e 5365 6e69 7268 006f .sntpOnceSinhro. 8036c30: 6e73 7074 6550 6972 646f 6369 6953 686e sntpPeriodicSinh 8036c40: 6f72 4900 696e 5474 7361 006b 6148 6472 ro.InitTask.Hard 8036c50: 6146 6c75 3a74 0d0a 0a00 520d 6765 7369 Fault:.....Regis 8036c60: 6574 7372 0a3a 000d 5053 2020 2020 2020 ters:...SP 8036c70: 2020 2020 7830 3025 6c38 0a78 000d 3052 0x%08lx...R0 8036c80: 2020 2020 2020 2020 2020 7830 3025 6c38 0x%08l 8036c90: 0a78 000d 3152 2020 2020 2020 2020 2020 x...R1 8036ca0: 7830 3025 6c38 0a78 000d 3252 2020 2020 0x%08lx...R2 8036cb0: 2020 2020 2020 7830 3025 6c38 0a78 000d 0x%08lx... 8036cc0: 3352 2020 2020 2020 2020 2020 7830 3025 R3 0x%0 8036cd0: 6c38 0a78 000d 3152 2032 2020 2020 2020 8lx...R12 8036ce0: 2020 7830 3025 6c38 0a78 000d 524c 2020 0x%08lx...LR 8036cf0: 2020 2020 2020 2020 7830 3025 6c38 0a78 0x%08lx. 8036d00: 000d 4350 2020 2020 2020 2020 2020 7830 ..PC 0x 8036d10: 3025 6c38 0a78 000d 5350 2052 2020 2020 %08lx...PSR 8036d20: 2020 2020 7830 3025 6c38 0a78 000d 3025 0x%08lx...%0 8036d30: 312e 0066 6425 2500 3430 2d69 3025 6932 .1f.%d.%04i-%02i 8036d40: 252d 3230 0069 7325 2500 2064 b4d0 bdd0 -%02i.%s.%d .... 8036d50: 202e 6425 d120 2e87 2520 2064 bcd0 b8d0 . %d ... %d .... 8036d60: bdd0 002e 2e31 0030 7274 6575 6600 6c61 ....1.0.true.fal 8036d70: 6573 6f00 006e 302d 2d31 3025 6932 253a se.on.-01-%02i:% 8036d80: 3230 0069 3025 6932 252d 3230 2d69 3025 02i.%02i-%02i-%0 8036d90: 6932 302d 2d31 3100 3239 312e 3836 312e 2i-01-.192.168.1 8036da0: 322e 3100 3239 312e 3836 312e 312e 3200 .2.192.168.1.1.2 8036db0: 3535 322e 3535 322e 3535 302e 7000 6275 55.255.255.0.pub 8036dc0: 696c 0063 5442 362d 3037 0031 2e30 2e30 lic.BT-6701.0.0. 8036dd0: 2e30 0030 3830 302e 2e37 3032 3631 4500 0.0.08.07.2016.E 8036de0: 2d43 4334 342d 2d44 3030 302d 2d30 4130 C-4C-4D-00-00-0A 8036df0: 4b00 2d4e 3330 302d 3030 3130 6100 6d64 .KN-03-00001.adm 8036e00: 6e69 3100 3332 3534 7500 6573 0072 3231 in.12345.user.12 8036e10: 3433 3800 2e38 3431 2e37 3532 2e34 3332 34.88.147.254.23 8036e20: 0035 6f6e 656e 3100 3732 302e 302e 312e 5.none.127.0.0.1 8036e30: 5400 4f32 004b 7325 252e 2564 2573 0d64 .T2OK.%s.%d%s%d. 8036e40: 2000 4100 4b43 4e00 4b43 7200 7165 6575 . .ACK.NCK.reque 8036e50: 7473 745f 7361 006b 3151 000d 4c54 000d st_task.Q1..TL.. 8036e60: 0054 0d51 5300 5200 4300 000d 5443 000d T.Q..S.R.C..CT.. 8036e70: 0d49 4600 000d 4449 454c 0900 6325 2509 I..F..IDLE..%c.% 8036e80: 0975 7525 2509 0d75 000a 6d54 2072 7653 u.%u.%u...Tmr Sv 8036e90: 0063 c. 08036e92 : 8036e92: 722f 746f 6b65 702e 676e 0000 5448 5054 /rotek.png..HTTP 8036ea2: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8036eb2: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8036ec2: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8036ed2: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8036ee2: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8036ef2: 6e65 2d74 654c 676e 6874 203a 3935 3935 ent-Length: 5959 8036f02: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8036f12: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8036f22: 3a65 6920 616d 6567 702f 676e 0a0d 6143 e: image/png..Ca 8036f32: 6863 2d65 6f43 746e 6f72 3a6c 7020 6972 che-Control: pri 8036f42: 6176 6574 202c 616d 2d78 6761 3d65 3638 vate, max-age=86 8036f52: 3034 0d30 0d0a 890a 4e50 0d47 1a0a 000a 400.....PNG..... 8036f62: 0000 490d 4448 0052 0100 0057 0000 08ae ...IHDR...W..... 8036f72: 0006 0000 db82 7d4e 0000 0e17 4449 5441 ......N}....IDAT 8036f82: da78 9ded ac7d 672c c059 a1cf 7a80 3285 x...}.,gY....z.2 8036f92: 4b45 1014 4db6 a62d ae0a b68a 52d8 45c7 EK...M-......R.E 8036fa2: 4131 1b2d 1045 0b7a 7a53 bc69 6060 634d 1A-.E.z.Szi.``Mc 8036fb2: d894 c326 6c55 d2ac c6c5 285e 2c91 951f ..&.Ul....^(.,.. 8036fc2: 4a92 885d 4ad5 dd02 6a3f 9352 1ba2 36ac .J]..J..?jR....6 8036fd2: a246 011b 6d69 e76b 72d2 71fb 7729 df7d F...imk..r.q)w}. 8036fe2: 7793 9c75 cece 9fbc b333 7e7b fc7f 6f72 .wu.....3.{~..ro 8036ff2: 39ce fb3b bf39 e67d 9e79 79f7 9677 e5cb .9;.9.}.y..yw... 8037002: 000e f800 1785 0001 b900 0002 5720 0000 ............ W.. 8037012: 0ae4 0000 15c8 0000 02b9 2000 0057 4000 ........... W..@ 8037022: 00ae c800 0015 b900 0002 7200 0005 ae40 ...........r..@. 8037032: 0000 15c8 0000 2b90 0000 0572 4000 00ae .......+..r..@.. 8037042: 8000 015c 9000 002b 7200 0005 e400 000a ..\...+..r...... 8037052: 5c80 0001 2b90 0000 5720 0000 0ae4 8000 .\...+.. W...... 8037062: 015c 0000 02b9 2000 0057 e400 000a c800 \...... W....... 8037072: 0015 b900 0002 5720 0000 eae4 c19f 5f6b ...... W......k_ 8037082: 96b7 8fdd bede 440d 3882 9a47 ff23 def3 .......D.8G.#... 8037092: 3c96 d6df ed38 377d 7e56 009e c824 3375 .<..8.}7V~..$.u3 80370a2: dae5 8c17 1304 5cc1 b4b0 de40 aa6e 138e .......\..@.n... 80370b2: 4d23 0ae4 75c8 ca3f 4655 89a5 6192 2966 #M...u?.UF...af) 80370c2: 3ad3 7532 44fc 1fdd 4522 80ae b75c ae56 .:2u.D.."E..\.V. 80370d2: 8ab1 974e 202d 3b45 a644 15c8 eb90 c936 ..N.- E;D.....6. 80370e2: 4655 8b8f a496 645a 3441 5c8b b901 ba6e UF....ZdA4.\..n. 80370f2: bb5c d524 b4b2 08c1 22b9 4057 9bae d724 \.$......"W@..$. 8037102: a1d8 5530 2cc5 2450 231b e457 c801 cbb5 ..0U.,P$.#W..... 8037112: 9572 da97 0763 cdd1 edd5 1557 48ff 5db3 r...c.....W..H.] 8037122: 512b 9bb7 e63b 2364 0ae4 5c80 26bb bed7 +Q..;.d#...\.&.. 8037132: 0a45 5320 ae05 47a1 45b1 78ea 8b13 844e E. S...G.E.x..N. 8037142: 3f6c bd16 2b90 d720 caee 6475 7971 54df l?...+ ...udqy.T 8037152: 2951 48b1 8c27 2b91 7200 5b6d 13ae a943 Q).H'..+.rm[..C. 8037162: 95b6 ecdf 3c59 08d6 02b9 d720 e5a6 191a ....Y<.... ..... 8037172: 38e4 1d67 1a2a 0cf5 d922 7ef9 2c10 0572 .8g.*..."..~.,r. 8037182: dae4 b91d 8aea b5d5 a9dd 9857 1023 9c7b ..........W.#.{. 8037192: 302b ccd4 cec9 7db7 017e 0572 dae4 b90d +0.....}~.r..... 80371a2: 8aea 6675 a521 caa1 ce77 722c 63b8 c28b ..uf!...w.,r.c.. 80371b2: a458 04ba 75f6 8b04 015c b6b9 572f b15d X....u..\.../W]. 80371c2: 86a6 9d42 faee ea5f 189a bd16 adf6 9160 ..B..._.......`. 80371d2: 202b 4d57 06b9 ec14 53d4 532b d2a4 a105 + WM.....S+S.... 80371e2: 6f57 4a65 3af4 ec52 a46b e609 15c8 2b90 WoeJ.:R.k......+ 80371f2: f572 58cd 6443 8efd 892e 34cd 69a3 c11d r..XCd.....4.i.. 8037202: 904e 202b e457 8bea 07a1 f6b1 2d03 f55f N.+ W........-_. 8037212: d4bd 4755 09b0 0572 8ae4 7d5c 59e4 4733 ..UG..r...\}.Y3G 8037222: 8eb1 bb76 b435 7525 6c14 4db6 041d 15c8 ..v.5.%u.l.M.... 8037232: ab90 5c81 0a3d 2eb6 1acf 88d7 6279 9059 ...\=.......ybY. 8037242: 6b4a 0be6 e6ac 8c0a 872c d76e 122d 13a8 Jk......,.n.-... 8037252: 0cec 02b9 4572 a1ae 01d2 4f23 0c8b 4bf2 ....rE....#O...K 8037262: 5d62 af1f e749 5d41 4007 f0e2 91fc 202b b]..I.A].@....+ 8037272: e457 56ba 8b8e e89a 87d2 2758 2e01 4db1 W..V......X'...M 8037282: ba96 09d6 5c76 1e93 9088 202b 7dd7 5726 ....v\....+ .}&W 8037292: c147 35a6 a185 51c8 f3ac 9606 eac4 752e G..5...Q.......u 80372a2: 13ad 7cec bb9b 9007 202b e6d7 5ae4 c457 ...|....+ ...ZW. 80372b2: 1d8a b472 8ba6 9a0c da9a af35 bfc9 dd56 ..r.......5...V. 80372c2: 87b6 015c eeb9 b933 0a5a b536 074c 01a4 ..\...3.Z.6.L... 80372d2: a5e6 9e46 0ae6 f6b8 8eb0 35b7 457a 80ae ..F........5zE.. 80372e2: 9b5c 6b91 d45d abda dad8 c7c5 8322 2155 \..k].......".U! 80372f2: 6749 b5d8 f6e9 3ad9 1d82 7e7a 905d 202b Ig.....:..z~].+ 8037302: 6dd7 ab95 60a1 8b13 f9cb e2ba 8e97 2358 .m...`........X# 8037312: fc75 376c 52ec 9d57 d61e 22c8 f732 ea91 u.l7.RW...."2... 8037322: 0d58 f1ad 58c5 ae3d 2ab4 afda 6b91 8824 X....X=..*...k$. 8037332: a905 2c60 8198 9277 6bc2 323e bdbc 07ae ..`,..w..k>2.... 8037342: de5c 1ebf 7572 ec17 22c2 ab3a 074b 1ac4 \...ru...":.K... 8037352: 542d 52b6 19b5 5873 d827 4589 baf4 20f0 -T.R..sX'..E... 8037362: a6d7 a956 f38d 65ef 5c89 7523 cf82 4b05 ..V....e.\#u...K 8037372: ce08 f0a8 cffa 6e0c 2bab 89d7 63e5 04cb .......n.+...c.. 8037382: 227d 7757 f6b9 842d 73d3 85ec 049d 4892 }"Ww..-..s.....H 8037392: 22dd c481 48b2 5a95 14a4 5f5c 50fb d7c8 ."...H.Z..\_.P.. 80373a2: ca3e b5c9 70e7 8212 713d 5ce1 0ccd 3b6e >....p..=q.\..n; 80373b2: 280e c5d6 ac4a d5c8 b05d 4555 be9b 36c5 .(..J...].UE...6 80373c2: 332f 8b8f 6c0c 9377 2c8d 1b3b be6c 5c4c /3...lw..,;.l.L\ 80373d2: 5b0a ddc3 e696 082d c6b9 24ea 7445 90ed .[....-....$Et.. 80373e2: 473f 8e7b 6f51 0af1 f6c4 63ea 6eae ce4f ?G{.Qo.....c.nO. 80373f2: 93d5 1760 6d86 914a fae5 26fb aac4 5823 ..`..mJ....&..#X 8037402: 22db b4d5 39e2 e887 0e2b 77ca e07c cb33 ."...9..+..w|.3. 8037412: 5f0b 3177 6b92 4587 fce1 1d8c 5ea3 621f ._w1.k.E.....^.b 8037422: 169d 8ac5 dd5c dae4 b8b3 1fb4 1659 7478 ....\.......Y.xt 8037432: a897 3aae 7a01 8f25 6875 0ab8 a6cb 7607 ...:.z%.uh.....v 8037442: 916c b052 185d dd31 716d cd98 bf99 07fd l.R.].1.mq...... 8037452: ae88 8a1d d339 f0d4 91f6 b167 e84e 7016 ....9.....g.N..p 8037462: ab6c 9430 cf4c d230 aaad 8fb8 fd76 892e l.0.L.0.....v... 8037472: 348d cd66 6dd6 bd97 8c30 a344 5d00 8b03 .4f..m..0.D..].. 8037482: e536 8cfa bd3f d10d 43b5 90ea 5d1f 9c94 6...?....C...].. 8037492: 7ddb 9cc3 6ead 018a 3ab9 7608 5862 ef05 .}...n...:.vbX.. 80374a2: 885b a7ac 06d1 5b65 8a14 3a35 fa0e 8b1e [.....e[..5:.... 80374b2: 3354 d3cf 5ab2 c51f a3f8 de87 ec85 679a T3...Z.........g 80374c2: 3858 e72f 510e 8baf 1358 5cfa ca3d 20b5 X8/..Q..X..\=.. 80374d2: 45d8 915d f0a6 a9f7 a445 f13b c8b4 f7c0 .E].....E.;..... 80374e2: c098 a2c8 5548 fcf5 be6d 9018 feeb 5fa4 ....HU..m......_ 80374f2: 2738 a36d d8de ac52 c959 4063 beae 7ae4 8'm...R.Y.c@...z 8037502: fae0 4ee9 d4dd 57fd e9bc 45ad cf21 f2ea ...N...W...E!... 8037512: 059b d719 6cb5 1af9 52e2 d827 61be 73ce .....l...R'..a.s 8037522: 2161 d344 892f a2c4 accd 508a cd72 9537 a!D./......Pr.7. 8037532: 102f f7a3 814e 65be 99b4 68f8 42b5 feae /...N..e...h.B.. 8037542: dae5 7213 891d 9c76 a4a5 144c eff2 72f2 ...r..v...L....r 8037552: 2715 4ee1 ce5d dcf1 2e4b 8937 7d74 720f .'.N]...K.7.t}.r 8037562: 5919 a244 8255 0c8b dda3 7038 80a7 61af .YD.U.....8p...a 8037572: 3a35 cd72 8454 5654 8938 241d 6b1b 5a92 5:r.T.TV8..$.k.Z 8037582: 0de4 0363 ab4c b1e8 f267 e7af 22d0 b5ea ..c.L...g....".. 8037592: eb15 cd7c 8a7b 2b5c 845e 87fc 5532 881f ..|.{.\+^...2U.. 80375a2: b455 9b61 598f b90a ab66 88e3 7093 ab26 U.a..Y..f....p&. 80375b2: dfcb d577 f7fb 2c84 795b 62f2 8f91 2563 ..w....,[y.b..c% 80375c2: 9cd7 8d60 5f8a f43f dff6 79da afe5 dc1c ..`.._?....y.... 80375d2: c9f9 5e37 23ba 6bee 95e7 bfaf ef64 1e98 ..7^.#.k....d... 80375e2: 440a 4599 c4b7 593a 9e66 2cbe 8666 6b51 .D.E..:Yf..,f.Qk 80375f2: e388 7f2e cde2 56bf 0276 6af6 ba4e 52c8 .......Vv..jN..R 8037602: b1b0 49e6 3a9d 8244 1a3b dd8f f8a5 9be4 ...I.:D.;....... 8037612: e2d4 78f1 b56b ae42 27ff 9ed7 d6fa bb1a ...xk.B..'...... 8037622: d38a f217 14e4 9412 258f 2215 564c 1c97 .........%."LV.. 8037632: e235 8b4a 7d42 a5f9 bebf ae56 1fa2 e773 5.J.B}....V...s. 8037642: 5ffc f64d e67e a970 f7dd cb24 2799 9ab9 ._M.~.p...$..'.. 8037652: fd2c 849d ab92 6443 fb13 4cae 98e7 563a ,.....Cd...L..:V 8037662: 7dcf ee3e b038 675c 9c0d 13a7 b706 cbd4 .}>.8.\g........ 8037672: dd35 bc94 9092 5ce4 ba46 5fa7 e1fd 96bd 5......\F.._.... 8037682: b29f 97e2 a894 5ca9 166b 4444 7d16 a6bb .......\k.DD.}.. 8037692: 9cb2 8c5a 3465 9c79 e2ae 6ed6 92ef 8def ..Z.e4y....n.... 80376a2: 914d b2c3 6dca 0512 0c2e b223 9190 1462 M....m....#...b. 80376b2: ae58 f3a1 c9d8 a980 db58 d725 08b2 ecf7 X.......X.%..... 80376c2: 8e2b 9dec 52d0 e72e 3c1d 2d64 9ad7 7608 +....R..... ..\.. 8037742: d542 5738 4ac0 bf2d f351 9fb7 28f8 5982 B.8W.J-.Q....(.Y 8037752: 10a6 4216 e3ae 6895 e575 26ba 9045 806e ...B...hu..&E.n. 8037762: 275c 9116 3aeb 3646 68cb 850b 91ac c9e5 \'...:F6.h...... 8037772: 0717 ab90 2569 34dc d195 eb76 7155 6b86 ....i%.4..v.Uq.k 8037782: c8c8 4235 0dae 62b7 d019 2753 fc90 a7c0 ..5B...b..S'.... 8037792: 70aa 0f35 5a2d d119 810a b6f6 ae58 36b3 .p5.-Z......X..6 80377a2: 0e17 d214 4b01 ee8d 2680 3ae5 841e 14eb .....K...&.:.... 80377b2: b7e8 d620 c799 bae7 341c e9dc 5c80 621b .. ......4...\.b 80377c2: b425 07dc 1135 dbd2 5ceb 3108 4961 5cca %...5....\.1aI.\ 80377d2: 2076 c954 44b5 33b0 82c3 1b53 ed72 5892 v T..D.3..S.r..X 80377e2: 0ee7 099f 28d3 e473 b2f9 167d 8d38 fa11 .....(s...}.8... 80377f2: 3cf2 8a74 39c2 457a edae 75c8 290f f93d ...6 8037872: 5791 145d ba15 7fc1 82da e35c f38a edaf .W].......\..... 8037882: 1a82 0d72 d724 62b4 b91d a8f7 1577 cad9 ..r.$..b....w... 8037892: aa7c bc8f caad c6ff b905 2d8e cb06 ee84 |..........-.... 80378a2: 6d8b 407d 5cb6 b74d 6a26 6d75 3792 c2f9 .m}@.\M.&jum.7.. 80378b2: 0c5c 6fda 6ff0 3663 d442 a742 8b00 5a08 \..o.oc6B.B....Z 80378c2: 6b96 586c 8824 7894 b927 84ee 50c8 7bae .klX$..x'....P.{ 80378d2: 009d d2ea f7be 8b8a 1b2f 4929 16ba 620c ......../.)I...b 80378e2: 8dcb 6304 de8b 9b52 c37d 1f5a 2d90 d823 ...c..R.}.Z..-#. 80378f2: 8235 95b5 30eb 09c0 ba1e bfc1 1ded da07 5....0.......... 8037902: 514c 90f4 736b ed72 445b d904 0f9a f690 LQ..ksr.[D...... 8037912: 59e5 ae4e 423b 7bae d3b9 6895 225d 1fda .YN.;B.{...h]".. 8037922: cb7f 4ce1 15e6 c50d 3a67 b042 a1e7 7fd1 ...L....g:B..... 8037932: 56de ab31 dbd0 2aea d357 fc66 e7a1 6663 .V1....*W.f...cf 8037942: 3b81 4c1b c187 d194 b00f e081 32dc 9f02 .;.L.........2.. 8037952: d720 0b66 a65a b879 a7a9 fa0f 391e eeb9 .f.Z.y......9.. 8037962: 3ffd 8b97 6d4a e12f 7e64 30b1 a654 09aa .?..Jm/.d~.0T... 8037972: 6e7f 9c58 1c4a fd1b 1f5b 2d90 dcbe 2c7c .nX.J...[..-..|, 8037982: 348f 17cd 0166 b872 e9a6 d0ab b3fd cca6 .4..f.r......... 8037992: c52d 391a c54c 21ea e6d7 3ae4 5c33 9daf -..9L..!...:3\.. 80379a2: 4458 2326 bc75 d551 9b9b eb93 bbff bcf4 XD&#u.Q......... 80379b2: f5e0 b66f 422a b9c8 6a06 c1a6 3578 a620 ..o.*B...j..x5 . 80379c2: 55d0 b7d0 cb58 363f 3b4c 2eb8 1d7b 1c56 .U..X.?6L;..{.V. 80379d2: 3527 fe1c c7b2 0ecb a6ff 6a8f 34f2 d450 '5.........j.4P. 80379e2: b214 1e0a 7fb2 67d6 a360 1afb 1236 22bd .......g`...6.." 80379f2: 7b57 86c6 4691 1964 2c49 690a b184 646e W{...Fd.I,.i..nd 8037a02: e420 8f9a 8d66 0e3a 9464 2226 54d9 faae ...f.:.d.&".T.. 8037a12: 912a c4eb 8262 c2d6 6871 e98b ec80 c6be *...b...qh...... 8037a22: 5792 4dd7 b309 11c0 6ea0 64c4 343b a77a .W.M.....n.d;4z. 8037a32: 5103 cfb1 9c94 14ae 26d3 57a2 6ae4 d0cf .Q.......&.W.j.. 8037a42: ef22 b53a e378 15fa ff09 d14a b92a 4f16 ".:.x.....J.*..O 8037a52: a36e 6d6f a139 2e4b cdad b5c9 772a f0ba n.om9.K.....*w.. 8037a62: 53b8 136e b203 8ea7 3572 6969 d9b2 69af .Sn.....r5ii...i 8037a72: 0832 2053 cd33 6715 0683 ebaa 9e81 7f6b 2.S 3..g......k. 8037a82: a04d 8593 5e8e ab91 913d 65c5 6257 8df9 M....^..=..eWb.. 8037a92: 175f acf1 630a df5a a2ac 3580 8934 d446 _....cZ....54.F. 8037aa2: b20a e554 2746 b79e ef14 b6ed 2037 48db ..T.F'......7 .H 8037ab2: 15d8 badb 45d4 a382 91c0 9752 6406 7977 .....E....R..dwy 8037ac2: 185b cb1f 6367 dae4 0acc 99ad 1145 6162 [...gc......E.ba 8037ad2: 1559 189e 965c 3525 cd72 8157 0667 ec51 Y...\.%5r.W.g.Q. 8037ae2: a2a2 a0ab 7b6a 85f0 be63 d435 ec80 d778 ....j{..c.5...x. 8037af2: 9edf 9359 89c2 b7d7 52b9 6cb0 eff2 80d2 ..Y......R.l.... 8037b02: 2eec f731 5858 4e34 207b 3757 1646 ad79 ..1.XX4N{ W7F.y. 8037b12: 61c4 b33d 8449 a992 e76f 855e ad5c 2b24 .a=.I...o.^.\.$+ 8037b22: abb7 2831 c564 5b16 bb8a 0a76 21a4 1ae4 ..1(d..[..v..!.. 8037b32: 0662 8584 5c14 e7ab 07a1 7764 ba89 3ae7 b....\....dw...: 8037b42: 1909 22bd 70d7 81a9 6599 3af4 c8d5 6539 ...".p...e.:..9e 8037b52: 1f16 58b2 4a33 8ad1 64b4 9714 25db 2aa1 ...X3J...d...%.* 8037b62: 9d6a faec f5d9 c435 6c80 e5a3 0db4 2109 j.....5..l.....! 8037b72: 68b3 09fb ecb9 9375 9ae5 fc0e c716 a28c .h....u......... 8037b82: e457 ceea e2d4 ae1b 292e d63f fa90 32c4 W........)?....2 8037b92: d222 14a9 3a27 9702 9c91 01da b477 1ada "...':......w... 8037ba2: a07c 3dbf dcf8 df70 df2c b203 728d f2ae |..=..p.,....r.. 8037bb2: a48b b121 03f6 b65f 0e9b 4ec8 5836 f1ae ..!..._....N6X.. 8037bc2: 6fc0 8427 b1d1 6b91 a5d8 33b0 3c87 8e99 .o'....k...3.<.. 8037bd2: 7b04 b24a 91a6 42ec 1073 5688 22d4 6ea7 .{J....Bs..V.".n 8037be2: 96c9 12ad 4eb9 862c b8c1 ceae 42ca d16c .....N,......Bl. 8037bf2: bf2d 3a44 d628 1a26 7bfc 2c1b 5ed7 9cc0 -.D:(.&..{.,.^.. 8037c02: 0cf2 36b9 7233 6170 0df1 d3a7 620e 0972 ...63rpa.....br. 8037c12: 1c37 dfac 36d9 edcb 30c0 5c34 de57 f9d3 7....6...04\W... 8037c22: 9776 5b2d e3ab f46a 6691 6286 e935 3573 v.-[..j..f.b5.s5 8037c32: 0d99 ed3b 5c88 0e17 9aab 7642 b40a bdb9 ..;..\....Bv.... 8037c42: c84b 014e 435f 6269 1ae4 ae5e 6589 5675 K.N._Cib..^..euV 8037c52: 5be7 3273 bf08 a68b bcae bab3 b1d9 1252 .[s2..........R. 8037c62: be2f daf2 d6ba d4a9 ae42 edba e358 00dd /.......B...X... 8037c72: 1abb 9404 d4eb fdf1 a26d dfc1 47a6 6db7 ........m....G.m 8037c82: 0d66 3ea4 c866 99b5 d961 cb0b 3408 ccd1 f..>f...a....4.. 8037c92: f695 203b 48d8 3fa3 1330 9d72 44d6 91ad ..; .H.?0.r..D.. 8037ca2: 5ca5 8d23 3368 2109 35d7 5b83 a35c a1d5 .\#.h3.!.5.[\... 8037cb2: f787 a9a4 ff06 4b7e 0763 1a9b 9d74 8ef9 ......~Kc...t... 8037cc2: 915e 336b d7b9 5cba 6e97 7343 301a cd8a ^.k3...\.nCs.0.. 8037cd2: 58e7 35a7 aaf9 aeda ef82 723d 75d4 5645 .X.5......=r.uEV 8037ce2: 0b5d 64d5 1e4d de36 b40d 971f e8a7 316d ]..dM.6.......m1 8037cf2: b0f0 736d 9d43 6502 919f 8a91 bad8 da2e ..msC..e........ 8037d02: a0d1 ae99 0588 6d72 b226 399b 9114 ab74 ......rm&..9..t. 8037d12: 99ff c967 1546 07b3 eeaa 36a7 3d8a 8afb ..g.F......6.=.. 8037d22: ae23 021d 229d 9727 c5b9 3809 b1f6 057b #...."'....8..{. 8037d32: 0e6c d5c8 f6ff 992f 0f43 c8eb 5f22 5897 l...../.C..."_.X 8037d42: 768a d9a8 5069 f977 995a 958b 0c63 a32d .v..iPw.Z...c.-. 8037d52: 2eca b5ca e5f8 ab12 2cf7 435d 91dc 397c .........,]C..|9 8037d62: d720 d8ad 30a0 cc75 0d7b 2f2d e73f 9db9 ....0u.{.-/?... 8037d72: 860e c325 d387 375c cd81 4fe5 26bf 9dfa ..%...\7...O.&.. 8037d82: 08d5 3c76 df28 7671 e553 800a 5b5c fdd8 ..v<(.qvS...\[.. 8037d92: 4eb5 8960 0446 ef3c ee48 a4ca b698 8bf6 .N`.F.<.H....... 8037da2: bce5 8783 ad8a c85a 9015 722b cab5 6663 ......Z...+r..cf 8037db2: f703 0245 a0e9 16dd 9b18 4802 f15c f798 ..E........H\... 8037dc2: 8b04 015c 22b9 90d7 03dd f2ba 39ea 980c ..\..".......9.. 8037dd2: d970 b2f1 f9a7 8cd8 6f22 d8b9 a1c0 0b15 p......."o...... 8037de2: 02b9 4572 daae ac3d bdba 3d87 3395 150d ..rE..=....=.3.. 8037df2: 66c9 5206 77cd ac37 e45b 3550 c0ff dfa8 .f.R.w7.[.P5.... 8037e02: b912 7202 ae45 fdb6 7373 49c3 8948 14ea ...rE...ss.IH... 8037e12: 21f0 d35a 838e e2b2 5555 365e 16dd 22c1 .!Z.....UU^6..." 8037e22: 400c ddae ab92 0f6e 666b f8d1 5abc 3339 .@....n.kf...Z93 8037e32: f752 d551 bddc 2f9a c930 09b5 5cf9 9b02 R.Q..../0....\.. 8037e42: cc59 ddb0 c128 0c22 ae40 93dd e9ab 024e Y...(.".@.....N. 8037e52: 8ebd 507d 037a 69fd 89f7 fae1 64f4 0453 ..}Pz..i.....dS. 8037e62: 308b b900 5376 a6ae 2203 1dc6 4068 0c8f .0..vS..."..h@.. 8037e72: 163b 1ac6 7651 3ae6 1463 02b9 4572 d6ae ;...Qv.:c...rE.. 8037e82: a883 3507 b55b 1034 9aa9 81b6 0625 9ec7 ...5[.4.....%... 8037e92: 98fb 8a65 015c 22b9 b2d7 ce08 9174 d4c0 ..e.\.."....t... 8037ea2: c0f3 aa8f b125 67a1 4691 cf25 617f a913 ....%..g.F%..a.. 8037eb2: 5723 ae40 d5c8 7c66 badf 7668 da25 87be #W@...f|..hv%... 8037ec2: 3508 d819 66ed 3ae0 b48b b04c f3b6 9146 .5...f.:..L...F. 8037ed2: 202b e457 bf6a 6029 174d b8c0 ae62 ac40 + W.j.)`M...b.@. 8037ee2: 9e7e 2f9f d2e0 e5c6 166b 9969 c760 c72e ~../....k.i.`... 8037ef2: ae44 5c80 6b91 96d7 b6ba ee31 9d70 8760 D..\.k....1.p.`. 8037f02: 5e21 e463 c80a 7f75 d5ca 3aa6 c5df b125 !^c...u....:..%. 8037f12: 043e 859b 94e8 ae40 5c80 aff7 8b5c 5d92 >.....@..\..\..] 8037f22: 2474 6d52 5ba2 df21 35a6 7221 e405 5c8a t$Rm.[!..5!r...\ 8037f32: 3343 6834 f7e0 69b9 d25e 73c2 bbed 5ce6 C34h...i^..s...\ 8037f42: 2b91 5720 6ae4 cd13 5aae 7ca5 b447 750b .+ W.j...Z.|G..u 8037f52: 64dc c5b0 f393 2b91 5720 aae4 db2b 0ed5 .d.....+ W..+... 8037f62: 7503 0573 12f2 a99d 74c8 59d5 dbd0 1f2f .us......t.Y../. 8037f72: e476 c80a 0015 9000 002b 7200 0005 ae40 v.......+..r..@. 8037f82: 0000 5c80 0001 2b90 0000 0572 0000 0ae4 ...\...+..r..... 8037f92: 8000 015c 9000 002b 2000 0057 e400 000a ..\...+.. W..... 8037fa2: 5c80 0001 b900 0002 5720 0000 0ae4 0000 .\...... W...... 8037fb2: 15c8 0000 02b9 2000 0057 4000 00ae c800 ....... W..@.... 8037fc2: 0015 b900 0002 7200 0005 ae40 0000 15c8 .......r..@..... 8037fd2: 0000 2b90 0000 0572 4000 00ae fb00 ae5c ...+..r..@....\. 8037fe2: f63f 6685 ca79 1883 db0e 3781 001f 6b90 ?..fy......7...k 8037ff2: b940 75b6 9aff 3f92 cb76 ad45 89c3 d002 @..u...?v.E..... 8038002: b96d 761e eb90 0433 0917 283e 82f8 41e0 m..v..3...>(...A 8038012: 49c1 23c1 7f82 dc13 7822 e087 0d79 f5cb .I.#...."x..y... 8038022: 824d 3af3 d72c 0b97 412e 00ae 2bdb 8bd7 M..:,....A...+.. 8038032: 9905 5c85 2e9f 4cb8 9ff0 a582 2706 d704 ...\...L.....'.. 8038042: be0b 01bb 1eb9 7c10 7045 60a7 83b7 dd72 .......|Ep.`..r. 8038052: dc15 f821 e09a c859 6015 e4fb 103a 213c ..!...Y..`..:...\?.F.:r.[ 8038342: 0a70 0572 2308 a4d7 9044 ac7f d621 9577 p.r..#..D...!.w. 8038352: eedc 6a4b 9665 c8e9 7cc1 7ae4 8543 de8c ..Kje....|.zC... 8038362: 905d 3dd7 bfaa 4ab5 7160 e661 8980 0f5c ]..=...J`qa...\. 8038372: f455 eab4 75c8 eea9 943f 2f5c b5c8 d95e U....u..?.\/..^. 8038382: 55c8 1872 02b9 9184 6cab fffa 495c d4fb .Ur......l..\I.. 8038392: 2a6b 7924 e091 92c9 0245 5967 73ce e7cd k*$y....E.gY.s.. 80383a2: 6f5c 235b b7a2 a417 eff5 456a 9d56 df20 \o[#......jEV. . 80383b2: 996a 3d73 7055 079f ceb9 8a4b 3e6c 2ae4 j.s=Up....K.l>.* 80383c2: 0317 55dc 4d21 b95d 2fde 9088 402b 8298 ...U!M]../..+@.. 80383d2: 19d6 8782 b20b 4fbc 3df0 c31a 9658 572a .......O.=..X.*W 80383e2: ae7b b0c3 7cec c0b7 3531 35bf a12f 8583 {....|..15.5/... 80383f2: a725 0472 59e1 c59a 8fa8 6ee5 9377 5c81 %.r..Y.....nw..\ 8038402: a9af bc99 2ba5 65d7 12e5 7b5e 26b9 c215 .....+.e..^{.&.. 8038412: 9134 e4ab e45a 100a 5bae 6de0 9725 b7f9 4...Z....[.m%... 8038422: c8a9 f576 cf37 7c13 f0a5 4f37 48aa 65d6 ..v.7..|..7O.H.e 8038432: 8227 3eaa d7d7 9e0a fdcc 01ee 4795 6dd5 '..>.........G.m 8038442: fffc 45ba eb9f 0bf7 f71e d728 52ff b091 ...E......(..R.. 8038452: b92f 5b3e af70 b947 109e 04bc 02b9 9184 /.>[p.G......... 8038462: 94ab 5fe8 0897 a476 7f7e 64a0 cb18 1653 ..._..v.~..d..S. 8038472: 3809 f36c b652 eb42 8555 5909 6252 1ae7 .8l.R.B.U..YRb.. 8038482: fe34 5717 3d68 5357 53ae 998d 26b1 9572 4..Wh=WS.S...&r. 8038492: a1fc b947 5d5e 4b23 b953 6e4a ae45 e100 ..G.^]#KS.JnE... 80384a2: 1116 5f3c 50f0 9e41 0b8f 447e 5370 5889 ..<_.PA...~DpS.X 80384b2: f3af 87b8 a0d6 3664 f1c0 d4c2 9fa9 1036 ......d6......6. 80384c2: 4beb ab0a 74b3 0b67 4abc 2073 a9b7 1f5c .K...tg..Js ..\. 80384d2: 1157 abb1 cf5c f350 7d59 55cb 6af2 0ae4 W...\.P.Y}.U.j.. 80384e2: 6e10 d685 4b1b fa24 4988 ab2f 06c3 7f85 .n...K$..I/..... 80384f2: 46b5 324c fd7a 0379 cab1 b4bd a5fe dfd0 .FL2z.y......... 8038502: 02fa b90d c2ca ddd3 729a e995 9b89 2715 .........r.....' 8038512: 6f34 69f3 720f 94fd 28a6 a84f ae19 0792 4o.i.r...(O..... 8038522: 6f34 8f73 e9e0 15c8 dc20 d7f2 28b2 cf35 4os..... ....(5. 8038532: aabc d597 ae41 2e2f 73cc ed5d f040 0306 ....A./..s].@... 8038542: feb1 daa0 70b4 9a59 ad6b eb96 cb61 656d .....pY.k...a.me 8038552: f84c 0719 c6b9 929a e174 c89d 2015 5c9c L.......t.... .\ 8038562: 134f 797c 588d 4165 85eb b701 2ed6 89db O.|y.XeA........ 8038572: e640 cf40 28d6 fd5e c39e 044e c872 fdcb @.@..(^...N.r... 8038582: 9206 57bc e4f5 50de 78f2 b8ab 6d5b 68bc ...W...P.x..[m.h 8038592: d72a d453 563c 495d 213e 41b8 af71 edc1 *.S.!.Aq... 80385a2: 141e 177c 0572 3708 65b8 3250 f03e d511 ..|.r..7.eP2>... 80385b2: b58a 5013 abae b43d 978e b044 0bb7 54ae ...P..=...D....T 80385c2: 3fbf ed5f 25a5 cda3 af8f 7bc9 6f5e 87b0 .?_..%.....{^o.. 80385d2: b5d6 1186 69a8 35ce 61cf b90b 321e 408c .....i.5.a...2.@ 80385e2: 726d 2bae 43ae 00ae a761 bd62 b6cf cae5 mr.+.C..a.b..... 80385f2: ae51 be92 eec3 8faf ee18 fafe 0603 d379 Q.............y. 8038602: dcfc 33d6 0f15 de1b 01f6 2915 caeb 54f5 ...3.......)...T 8038612: ecd5 226f 87c8 6705 ee2a bc32 1cad 7dae ..o"...g*.2....} 8038622: 720e 0805 5727 6339 1fe0 5c95 f0af 9e31 .r..'W9c...\..1. 8038632: 40d0 3bae f2ea f2f9 90c2 2aea a84e f568 .@.;.......*N.h. 8038642: ed74 fd35 dd4f a65e c629 7206 a3fd 7206 t.5.O.^.)..r...r 8038652: 45ad 8b3e 015c cec2 7d73 bad9 81f1 c80d .E>.\...s}...... 8038662: 3f35 fb14 9522 94df 5a83 541e fa82 5a86 5?.."....Z.T...Z 8038672: fb06 8217 a877 012e 21b3 76d5 bfbb c3fa ....w....!.v.... 8038682: b0df 60ec a270 9800 3ff3 637f aecb 24e6 ...`p....?.c...$ 8038692: 24ed 0000 0000 4549 444e 42ae 8260 .$....IEND.B`. 080386a0 : 80386a0: 6d2f 6961 2e6e 736a 0000 0000 5448 5054 /main.js....HTTP 80386b0: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 80386c0: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 80386d0: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 80386e0: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 80386f0: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8038700: 6e65 2d74 654c 676e 6874 203a 3639 3438 ent-Length: 9684 8038710: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8038720: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8038730: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 8038740: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 8038750: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 8038760: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 8038770: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 8038780: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 8038790: 0008 0000 0000 0a04 5de5 730b d71b fe75 .........].s..u. 80387a0: cb2b 4bad c101 0402 f040 7005 a189 d928 +..K....@..p..(. 80387b0: 4756 4aaf 93b4 6294 fb38 b002 b022 ed0b VG.J...b8..."... 80387c0: 482e 2251 ec67 6da4 933a dd4c 3b49 a76d .HQ"g..m:.L.I;m. 80387d0: b4d3 7f4d e281 8944 bb62 4cee 017f 8ff9 ..M...D.b..L.... 80387e0: 9dfa ef73 07dd 5200 ec74 edb8 4674 7724 ..s....Rt...tF$w 80387f0: 3def 75f7 39ee 9ee7 5dd7 26f5 9381 61f8 .=.u.9...].&...a 8038800: bda0 b253 2fca 2f23 4499 e681 ce86 e464 ..S../#/.D....d. 8038810: 4905 efad b725 1e87 de3d b93c 02e3 ace2 .I..%...=.<..... 8038820: e0a7 967b ddeb 6209 656a e2d5 64e4 d5e8 ..{....bje...d.. 8038830: b1c2 f8e5 89c9 3759 2852 54bb 797e 4564 ......Y7R(.T~ydE 8038840: 639a ad8e f628 1dde 5686 9a52 2f82 fc77 .c..(....VR../w. 8038850: a95e 54e4 5acc b97d d5bc 3058 ea17 7db3 ^..T.Z}...X0...} 8038860: 1d3a c6ea 8f35 c0fd 8f0d 916b 6cf7 c5e2 :...5.....k..l.. 8038870: bbc9 3591 4af2 7cba cbd3 b71d 9764 cecf ...5.J.|....d... 8038880: b94a ba79 6256 cbbd c573 7a54 5461 7ea2 J.y.Vb..s.TzaT.~ 8038890: 732c 72cf d70c fc31 a0e0 d687 3846 c449 ,s.r..1.....F8I. 80388a0: f8c3 3238 2b6c 7039 31ac 032a 3a2f bc48 ..82l+9p.1*./:H. 80388b0: 98d1 128a e47f bd0d 625e 0fc4 63c3 322f ........^b...c/2 80388c0: 9be2 f328 93a2 c37d eb36 7b1d aad3 bd0d ..(...}.6..{.... 80388d0: 9fa0 3a0c a576 4e52 b3b1 ef67 26e7 fef3 ...:v.RN..g..&.. 80388e0: bdee 4ebb 59e4 4789 a378 d899 8a66 516c ...N.Y.Gx...f.lQ 80388f0: 4b71 1ee2 eb4b e213 654b 99c3 9186 527b qK..K...Ke....{R 8038900: 5dd2 08ff a68b 3955 9e35 0d2d 5a60 a71d .]....U95.-.`Z.. 8038910: f3d6 38a3 19d9 43f8 53b7 6bb6 78d6 05ec ...8...C.S.k.x.. 8038920: bf2e 3202 2bab e477 db8e 1bd3 b25b 7b0c ...2.+w.....[..{ 8038930: 1776 86ea 3bda 8fd7 43c7 c4eb 4fb4 754f v....;...C...OOu 8038940: 187b 873a b67a 8ee9 74dc adfb 6e9b a6d3 {.:.z....t...n.. 8038950: 5caf e9ba 75f6 dd37 da99 c0f4 624b 3b0f .\...u7.....Kb.; 8038960: f416 03e3 6067 7d05 8b0f 9cf7 4c43 b40c ....g`.}....CL.. 8038970: 27a6 c4d1 4dd3 0e73 e2d4 42e2 d4be ee7b .'...Ms....B..{. 8038980: 9339 73c4 2fcb 95e7 5082 8279 9996 d7db 9..s./...Py..... 8038990: 9b1b 14d8 77cd 1d4d 1f48 549e 3cd5 adf4 .....wM.H..T.<.. 80389a0: f1cd f9d6 cecf e3ff cdfc 17f9 afe7 eff8 ................ 80389b0: 436b ff3b f9f5 17e7 689f ffe7 f179 5711 kC;......h..y..W 80389c0: 46bc fd05 41bc c5e1 e7c7 2faf 887e 4fd7 .F...A...../~..O 80389d0: 7e2f f172 1a17 5f4a 7c5d f17c 4043 897e /~r...J_]||.C@~. 80389e0: cfc2 e0a8 1e35 797f 17f1 fdf8 6e6b a5fe ....5..y....kn.. 80389f0: 9686 fd00 2a4f db41 d14f 47c3 8754 3f66 ....O*A.O..GT.f? 8038a00: 69ad ffe7 9dc8 f8fc b5fc 0006 a28c f5a1 .i.............. 8038a10: 008f a3f9 1f8b 70d2 a4bf 2fbe 8afe 7066 .......p.../..fp 8038a20: 13f1 fced 8d53 bf86 3800 02c1 51ba 30d7 ....S....8...Q.0 8038a30: 37f9 45a8 da83 d2e6 6b78 d2d3 9106 33d7 .7.E....xk.....3 8038a40: 2775 400c a357 d39a 75f7 19cd 715a ea6c u'.@W....u..Zql. 8038a50: 1276 f868 baa9 03b4 be91 fe75 f3af b5a6 v.h.......u..... 8038a60: 64b9 6d6d 012e 5b6b c037 4ac0 d8f4 7ba1 .dmm..k[7..J...{ 8038a70: 9a02 bd8e b928 81e9 c1c2 4631 d2b1 ea21 ....(.....1F..!. 8038a80: 1fbe 5eba 57bc 2fdf 821b 4ae5 94ef 11a6 ...^.W./...J.... 8038a90: 065f a471 0902 8d3d b43e 3e86 02c4 9ea4 _.q...=.>..>.... 8038aa0: 5424 bad0 7101 7860 cf46 1be8 c303 9e37 $T...q`xF.....7. 8038ab0: 871a d0c6 7518 132c 81fd dd61 2703 8d1c .....u,...a..'.. 8038ac0: 0126 9bc4 065e a3c3 38f4 13f2 50af 50ec &...^....8...P.P 8038ad0: c8f1 2c0a f62c 43ce b9c0 8285 4a26 42bc ...,,..C....&J.B 8038ae0: 32c9 7a4a 9285 4a16 85fa 1592 0c94 c4a8 .2Jz...J........ 8038af0: 5b1f 1bae cde1 b7a7 31fe 9e9e c80a 10f8 .[.......1...... 8038b00: 87cf 1cf4 07c5 d840 7011 365d b286 1c60 ......@..p]6..`. 8038b10: 0946 475e f5f2 c3d0 980a 036c 5fa2 ffc9 F.^G......l.._.. 8038b20: eb68 9c0e 5eb1 39ae 27c4 7b9e 5a7a 6892 h....^.9.'.{zZ.h 8038b30: eef2 a43c bd81 2e38 0c0d bb5d b0f3 ea0a ..<...8...]..... 8038b40: 35fd e508 c5f5 1ac7 40e8 e451 e8ef 0409 .5.......@Q..... 8038b50: 4af7 a32f 3a31 946f d98d fc2e 2ed9 0afe .J/.1:o......... 8038b60: f01c e7d7 7dbf c34b 86a7 fe7e 3b4a 67ff .....}K...~.J;.g 8038b70: 81e2 cff3 51e8 b8d0 91e0 d937 65a0 2043 .....Q....7..eC 8038b80: 0bc2 7b2c b9e8 92d9 1716 2ce7 70e9 3e66 ..,{.......,.pf> 8038b90: b68f dd6f e0f9 60b1 8fbe 0324 5bcd fdd3 ..o....`..$..[.. 8038ba0: c8c9 a2f6 10d2 101d 5f5d 047c ba16 db6e ........]_|...n. 8038bb0: e1ed 5218 6709 e46c a53b f511 4ff0 19c4 ...R.gl.;....O.. 8038bc0: 161a ec47 86fd 12b8 7cc8 59a5 038e bfc4 ..G......|.Y.... 8038bd0: dfad 8879 a876 5fd7 fb30 10b3 1ed0 bfdf ..y.v.._0....... 8038be0: 50f7 646b 4a78 a737 1930 d0cb 811f b5dc .PkdxJ7.0....... 8038bf0: 8c9d 67dc b376 c0d0 f436 12ef 5c27 22d9 ...gv...6...'\." 8038c00: 2123 ee77 c0b4 331a 64a3 bc6d 6db9 3cc0 #!w....3.dm..m.< 8038c10: b457 cde9 036d baf6 4da2 6e7f 301b da60 W...m....M.n.0`. 8038c20: c826 c904 692c 89f3 9429 549d 8950 3d33 &...,i..)..TP.3= 8038c30: af3d 3e87 4f78 5cb2 c4fe cfd6 0e7f 4b19 =..>xO.\.......K 8038c40: c067 502b 1bdc c430 214f 2171 c1cc 9015 g.+P..0.O!q!.... 8038c50: 38de f42d 5d8a 17d1 6374 07e9 e6a5 5eca .8-..]..tc.....^ 8038c60: babd 7fb2 c4da d69f 7e3e ec6d ee9f 1bd5 ........>~m..... 8038c70: 5dfb e47e dd5f 93f2 ffda dc0c 4b3b 04b5 .]~._.......;K.. 8038c80: 198a bc74 6b23 f138 ddca 7a85 649b de32 ..t.#k8....z.d2. 8038c90: cca4 daad 73e1 6530 2541 1b29 1690 b8b3 .....s0eA%)..... 8038ca0: 2c95 2df6 b621 ddda e27b f6d6 a52b db6e .,.-!...{...+.n. 8038cb0: 76ab b89f 7295 1bf7 4d5d 6d81 b9ae 1c26 .v...r..]M.m..&. 8038cc0: 4b21 a03f b52d 2faa abb6 b67f 795f 6967 !K?.-../...._ygi 8038cd0: fd3e c9d0 39fa 758e 13a6 a43a 3cbf 0dff >....9.u..:..<.. 8038ce0: 9f98 754f 0e52 0d48 0df8 978b d29f 0ea1 ..OuR.H......... 8038cf0: 9060 67d8 6244 539f 9f29 24e9 df57 6a90 `..gDb.S)..$W..j 8038d00: 3a40 67c1 75a4 9b40 2ed0 12fe c3da 439f @:.g.u@........C 8038d10: fdbc 3744 6fdc 7360 89e3 f23d 7793 0e71 ..D7.o`s..=..wq. 8038d20: 38c7 a57e 50da cfd2 867f 30e1 d0ae 8458 .8~..P.....0..X. 8038d30: 7202 63f1 aa9a fa46 4d0d 3f11 5c98 535e .r.c..F..M.?.\^S 8038d40: b562 a8a6 fd18 168e d5d1 90cb 20f6 20bb b............ . 8038d50: 5719 00fd 5ae7 4afa a3e7 074f 385d 0d26 .W...Z.J..O.]8&. 8038d60: de20 de5b a417 e74a 0a63 a92e 98d7 1756 .[...J.c.....V. 8038d70: d4ba 1529 9042 c4d6 a04a e7a0 c395 baa2 ..).B...J....... 8038d80: 6e59 a3cf 617d 292e 5a15 cfea fa39 33e7 Yn..}a.).Z..9..3 8038d90: e1f8 6f77 3f01 ee68 9384 a920 471e cd16 ..wo.?h... ..G.. 8038da0: 6e7a 3a53 18f1 a60a 7051 5029 910a 8f37 znS:....Qp)P..7. 8038db0: a878 561d c591 c280 a23c 450e 1421 e3b9 x..V....<..E!... 8038dc0: 7230 003f d0de 3333 d0b5 c27f 3ba1 a63e 0r?...33.....;>. 8038dd0: 55e3 b194 13f2 c778 32f9 7fd6 5944 8de4 .U....x..2..DY.. 8038de0: f661 d0a4 2cde d759 d34d a5b4 750d 4a7a a....,Y.M....uzJ 8038df0: 4e6f cde1 6f95 6b5d 9d08 0410 24c3 ba4f oN...o]k.....$O. 8038e00: d433 2160 4929 f823 5e9c 7d49 d05d 6dcb 3.`!)I#..^I}]..m 8038e10: c167 dd34 696e 05ba 1714 af12 e144 5fe7 g.4.ni......D.._ 8038e20: 2290 0af1 c1dc 43fc d4af 741d 540c 0d53 .".....C...t.TS. 8038e30: df89 bf8b f8be ba21 3423 5717 ea6d 153a ......!.#4.Wm.:. 8038e40: 9716 285d ae2c 551b b6e5 d30e b4c3 65d2 ..](,..U.......e 8038e50: f240 d343 4cc6 f948 a486 8a17 b10d 6fe7 @.C..LH........o 8038e60: 0e79 9dc4 89af 535d 015b 4b6c c17c fe73 y.....]S[.lK|.s. 8038e70: b115 ad30 da78 c00e be0a 4420 d508 b73f ..0.x..... D..?. 8038e80: 8bc8 129f 3c66 c9c1 1836 3e43 d93a 5ba3 ....f<..6.C>:..[ 8038e90: c2ee 7750 77bf 2eef 51ac 0945 58d8 ee52 ..Pw.w...QE..XR. 8038ea0: 13bb 4250 b300 d4db 562b 5f45 8424 b2b0 ..PB....+VE_$... 8038eb0: 074f 22d4 4261 41bc 78ff e0f8 6ef1 1666 O.."aB.A.x...nf. 8038ec0: 9882 3ec5 0324 863f 1f01 c18f de7d f7ae ...>$.?.....}... 8038ed0: 293c d21b 87aa c91d 396a 696a d07c b969 <)......j9ji|.i. 8038ee0: db9d b93c 844b f489 145c 9f8b 3939 a9bf ..<.K...\...99.. 8038ef0: cacd 24ce ff32 cb61 9eed d98c 2776 84fa ...$2.a.....v'.. 8038f00: 0c2d 808f fb03 4ef0 7ae0 59cf 4036 0882 -......N.z.Y6@.. 8038f10: 7309 0430 b3b1 741d c81f 98aa 36ba 5df0 .s0....t.....6.] 8038f20: 0bd7 c104 a828 c26b e060 24ed 7c89 c61b ....(.k.`..$.|.. 8038f30: 5928 b1fd 6d50 ec8d 8991 1533 a95f 13b4 (Y..Pm....3._... 8038f40: efc2 79aa 8848 8c6b 43c0 b0c0 e24b f213 ...yH.k..C..K... 8038f50: 8d19 2bbc 9897 bc07 9562 c3b0 faa6 5321 ...+....b.....!S 8038f60: a872 63c5 382b 1c68 bd84 2683 8c63 f2e0 r..c+8h....&c... 8038f70: 98dd 852c 38ab 923e 1c28 c832 94ec 77e6 ..,..8>.(.2....w 8038f80: 7045 e96f 8e4a 7916 f0a3 9bc8 7987 85c6 Epo.J..y.....y.. 8038f90: e8ec 280a 2f90 0789 dbb5 8445 9fcd 0a5d ...(./....E...]. 8038fa0: 96fc e629 aee1 0198 a78b 4399 9a70 e62c ..)........Cp.,. 8038fb0: 3360 25a5 e330 58a5 0b78 cc49 e15f 9465 `3.%0..Xx.I._.e. 8038fc0: 6731 b312 31d4 48c5 64d3 5531 4b3d 7312 1g...1.H.d1U=K.s 8038fd0: f200 9e88 96aa 5fdd 3983 cf08 1e92 01ae ......._.9...... 8038fe0: 3f9d e9eb a774 3b73 08f3 74ae c5d0 009d .?..t.s;...t.... 8038ff0: 45ce ad1c e525 80ba 94fc 4396 0703 e2e5 .E..%......C.... 8039000: 05a2 b409 8750 2ea0 4cca 4f38 12db 8700 ....P....L8O.... 8039010: 42df a21d 5a60 0aba cd87 6412 bda4 7a85 .B..`Z.....d...z 8039020: 5abb d9a5 350b 4603 ac29 a05a 7324 da27 .Z...5.F).Z.$s'. 8039030: 7d86 3466 e5bc a4dc 57c9 38f0 3721 6b26 .}f4.....W.8!7&k 8039040: 4528 01d7 41cb ade5 8880 96bc 22e8 c67f (E...A.......".. 8039050: 6175 1647 3c79 03ae f82d 9d2f 15cb 4c94 uaG.y<..-./....L 8039060: e018 bc39 4605 7d8e 5405 4d0e e591 93fa ..9..F.}.T.M.... 8039070: 8738 f828 6667 12dc ae8c e39c 2ae6 a37e 8.(.gf.......*~. 8039080: 0259 b854 ae74 c803 da0a 9315 1d95 53b2 Y.T.t..........S 8039090: aae8 04fe f322 bcb3 bee6 b366 0afd 780d ....".....f....x 80390a0: d7d6 1787 bfb3 7c06 6b6e 49ac c832 0c6d .......|nk.I2.m. 80390b0: 92bd 101c 2fce 25b5 5ed9 1dbd 1985 ecac ...../.%.^...... 80390c0: bc04 6297 ab2d c6bc e52c 649e d26d e10e ...b-...,..dm... 80390d0: 2b51 5490 9da6 41f8 fc2f 3530 c1b1 ac95 Q+.T...A/.05.... 80390e0: 93c6 535b 30b8 5f21 f5a6 2577 b038 9cec ..[S.0!_..w%8... 80390f0: 4f06 4e6e 1d44 a154 c074 8e67 3942 9788 .OnND.T.t.g.B9.. 8039100: 6637 709b c2cd 237e 924b 4d2c 43b2 fe2f 7f.p..~#K.,M.C/. 8039110: bd92 6e26 0bc1 6c58 c703 bc11 7079 9222 ..&n..Xl....yp". 8039120: cb2e bcce f1cf 4617 e92b e7ac dfaf 1eda .......F+....... 8039130: 260a cd7b 10be 2e7a 217a 10fd ea5e 4b5c .&{...z.z!..^.\K 8039140: c337 65d0 4713 e394 3eed 299b fc33 4689 7..e.G...>.)3..F 8039150: f886 7fe8 2583 df0e 82d4 7bf5 5939 f584 .....%.....{9Y.. 8039160: 077a 0384 f972 cc46 37f0 cb50 cd85 ec21 z...r.F..7P...!. 8039170: 4f8e 1984 4d3e 5d9b 3108 4672 3952 7189 .O..>M.].1rFR9.q 8039180: 07f6 7e94 4b3f 0119 3fca fc79 3ee0 ab45 ...~?K...?y..>E. 8039190: 470c a4ec 49db 84a3 6030 4fde f192 1123 .G...I..0`.O..#. 80391a0: ec2c 38c2 8ad1 6d45 922a e3c7 7436 23da ,..8..Em*...6t.# 80391b0: 7bef ec0f 50a7 4be9 3dfa 89df 38c2 25ec .{...P.K.=...8.% 80391c0: 6a35 bbb2 10fb a5c7 a70b 1781 f494 6ef7 5j.............n 80391d0: aec3 0cb1 3830 0515 1f14 8938 38e9 3614 ....08....8..8.6 80391e0: 99b3 b23b 1f05 9d7a 0c16 0851 0058 d4b2 ..;...z...Q.X... 80391f0: a9c1 a16c 1a80 624d 59a3 3987 7561 9e4b ..l...Mb.Y.9auK. 8039200: 8b49 71a9 b4a8 e044 1b79 2ec9 6579 b458 I..q..D.y...yeX. 8039210: 1350 67ca 3618 4046 6f2f 03c8 3b13 ddef P..g.6F@/o...;.. 8039220: 9549 3008 d0be 1016 80bd e1cc 0cb0 c0c6 I..0............ 8039230: 8eb8 95f9 1b37 a4b6 0c88 ac7d 49ac a284 ....7.....}..I.. 8039240: 1184 29f6 f678 a8d7 9e97 7ca3 4a88 6279 ...)x......|.Jyb 8039250: 06ca 60e6 e187 9cd7 4404 3904 5eb1 edb3 ...`.....D.9.^.. 8039260: 2bf7 a3f8 847e e127 9a00 8513 12f8 87b4 .+..~.'......... 8039270: 2781 5263 bee1 eade b4c9 4c86 7f22 f480 .'cR.......L"... 8039280: 9137 49b9 b261 2837 ecfa 47e2 a373 3c20 7..Ia.7(...Gs. < 8039290: d3be d92d 642a a45d afbc 8c4f 2cf6 da31 ..-.*d]...O..,1. 80392a0: 2a92 3288 47db efa1 f56a 004c 0f6e 68ad .*.2.G..j.L.n..h 80392b0: c224 42ba 95e0 c5ac e6c6 5da6 dade 53b2 $..B.......]...S 80392c0: 9649 8381 ee68 5080 e010 40a7 6530 e407 I...h..P...@0e.. 80392d0: 4254 e75d b3a0 47e8 618f 0699 787d 1235 TB]....G.a..}x5. 80392e0: c718 4f61 bbb3 7a88 6db7 cd08 c77a 54dd ..aO...z.m..z..T 80392f0: 9c5e 8b8e 38b8 5acb d2ef 3678 c7b9 dcbd ^....8.Z..x6.... 8039300: 3c38 3d83 cf67 dfdd f9af 604e d278 45ff 8<.=g.....N`x..E 8039310: 30a1 790c e117 5378 d46f cfc7 5475 7e25 .0.y..xSo...uT%~ 8039320: f432 7ccc 2e13 71c1 b98a dde7 5ecd 203e 2..|...q.....^> 8039330: 6608 46b3 23f1 690f f100 9200 4950 9d14 .f.F.#.i....PI.. 8039340: e21e 6030 879f b95e 2567 5a83 2164 60f9 ..0`..^.g%.Zd!.` 8039350: 8704 ca5f 69e0 bf14 d562 422c 8230 7bf5 .._..i..b.,B0..{ 8039360: 58fb 7e39 a679 b940 ac6d 9850 bd4f 20b4 .X9~y.@.m.P.O.. 8039370: d5b2 1af3 fb45 cbd4 0532 d4fa 8e0b 3f7a ....E...2.....z? 8039380: 597d 50a5 aa9f 9669 103b dba0 103b 999d }Y.P..i.;...;... 8039390: 5e8e aec8 ded8 5729 fc10 19f9 c55b aeb7 .^....)W....[... 80393a0: bc00 0795 a994 9710 2b77 b801 bfef 01c5 ........w+...... 80393b0: 7a4f ca8a b89b 95bc 2882 4334 c596 2de5 Oz.......(4C...- 80393c0: 4950 7fc0 03cc 478c f008 6016 aebd f37e PI.....G...`..~. 80393d0: 9c84 7a4c bf5b 8619 a271 9185 7376 19c2 ..Lz[...q...vs.. 80393e0: 5d08 36a7 609e 751b 39ef 2f5c 3f23 7760 .].6.`.u.9\/#?`w 80393f0: 3912 6502 0079 add7 cf05 d18c 414f ce1d .9.ey.......OA.. 8039400: 285e 83b7 70c9 0c68 e2d2 3078 b361 8d0c ^(...ph...x0a... 8039410: c6b9 baef 0fb2 05ca de41 ddc7 2610 5b4b ........A....&K[ 8039420: a615 3f1d c3cd 22ed a214 483a 4a19 f31f ...?..."..:H.J.. 8039430: 7159 13e0 e97b b638 ac8c 2eca b954 5f6c Yq..{.8.....T.l_ 8039440: 74cb 0294 0a12 2dfb 3201 65a4 2b89 3797 .t.....-.2.e.+.7 8039450: 60ca dda8 bd7f 61da 5374 c257 0668 5d6b .`.....atSW.h.k] 8039460: b8de c600 cb3b 0159 85dc 93eb 3c6f 4d23 ....;.Y.....o<#M 8039470: 0670 ba8a f9fa 41bf 243d e697 3817 382c p......A=$...8,8 8039480: 0081 781b 0ffe cc28 580a 0df5 da67 2147 ...x..(..X..g.G! 8039490: 2fb5 a282 6ced a287 a23d c589 a3f1 79b0 ./...l..=......y 80394a0: f6cd 89d8 b85d 4087 a5b4 6082 f610 816f ....]..@...`..o. 80394b0: ebef af30 3ce9 ce55 f265 52e3 052e 0416 ..0..T.. 8039560: de5e ff7b e1e0 a3f6 7bed 86fb 4380 cf1a ^.{......{...C.. 8039570: 80e0 e129 af40 4120 70a4 108e 1608 d7b2 ..).@. A.p...... 8039580: 8740 e80c 011d 0c77 0a28 7f29 338c 66b2 @.....w.(.)..3.f 8039590: b947 e1fd fbed 38bb a623 6c3a 8770 d54d G......8#.:lp.M. 80395a0: 6f21 ec80 0a90 e8af c3f0 bbed dc1f ed9e !o.............. 80395b0: c9b0 221d 25c6 4866 10da 37f3 a6ad b147 ...".%fH...7..G. 80395c0: abaf bcfa bdb5 7b7b cef7 39bd 2edd 5ba3 ......{{...9...[ 80395d0: c550 7114 1d4d 52b2 06b1 ef91 e184 0fa1 P..qM..R........ 80395e0: f5cf 409c 6e99 b5d8 c539 4c69 d720 1c7a ...@.n..9.iL .z. 80395f0: 3d85 687f be71 4aa2 a2eb f3e6 e7ca 0fb5 .=.hq..J........ 8039600: 8f3c 78f2 4f38 0c49 bd9b cb23 e86e 9159 <..x8OI...#.n.Y. 8039610: 7e62 1d1c 4b08 6fd0 c733 f9a3 22e5 c9e9 b~...K.o3....".. 8039620: 2620 cb3d 8e18 617d b909 c1e6 6924 2f74 &=...}a....$it/ 8039630: 0308 058f 4623 b626 302b 8dd0 41cd eb63 ....#F&.+0...Ac. 8039640: effc 2221 823e 098a 21c9 4f22 44bf 17c2 ..!">....!"O.D.. 8039650: 64c5 b77f 84b9 ce7a 9328 5529 8b70 437b .d....z.(.)Up.{C 8039660: 7f8d 5d57 67af 864d 3209 28cb 2ce5 500f ..W].gM..2.(.,.P 8039670: c01d 20d2 6c9d fceb 585f fd4f 6425 2bee ... .l.._XO.%d.+ 8039680: 6491 39b5 38d6 6888 24ea aa0b 1a70 83f4 .d.9.8.h.$..p... 8039690: e6b6 6660 d45e 8341 c3bf fe34 8843 2428 ..`f^.A...4.C.($ 80396a0: 2189 e51f ca63 1145 3dc9 4278 4c28 7e24 .!..c.E..=xB(L$~ 80396b0: 8c89 bcad 9a88 8f42 42f2 2c88 f840 c933 ......B..B.,@.3. 80396c0: 3e17 c047 3b94 14d7 a968 65b2 7909 3885 .>G..;..h..e.y.8 80396d0: 672c 3a73 7524 1da4 21cf 8cc7 7165 72b8 ,gs:$u...!..eq.r 80396e0: d5ca 40e0 26f1 384a 6ae5 a070 0b98 9c25 ...@.&J8.jp...%. 80396f0: 3572 1920 b8a9 41c3 5a2a 378e 3dec be67 r5 ....A*Z.7.=g. 8039700: c898 ab6b 40b3 cb92 577b 24f6 b739 257f ..k..@..{W.$9..% 8039710: c650 978a 630a 9581 ecf8 25f7 dce4 1361 P....c.....%..a. 8039720: 3280 421e 5fe2 0b7f 4dad 4956 2ee4 4fe7 .2.B._...MVI...O 8039730: dc8b 4389 7851 62ab 8c36 30ec 0dcb 8e3a ...CQx.b6..0..:. 8039740: a3bc 36af 7228 f985 ae04 d65e f925 29d5 ...6(r....^.%..) 8039750: b892 f8f3 3a43 7338 4d41 ac78 8ad8 354f ....C:8sAMx...O5 8039760: e979 cb32 e05b 81b3 0eca e7d9 21bb c3ba y.2.[........!.. 8039770: 8a19 3b34 be9c 74c8 d5a1 c992 e795 4985 ..4;...t.......I 8039780: 5bd2 703f 073d 2bda ac8d d548 e0a6 83b0 .[?p=..+..H..... 8039790: 690c 1b61 39a5 64c3 391b 2808 81c2 ed10 .ia..9.d.9.(.... 80397a0: cda0 5276 f282 6ce7 9a35 5d6b aefc 5b37 ..vR...l5.k]..7[ 80397b0: 1d40 acfe 2a20 75de 46cc b1bd 6eda ea34 @... *.u.F...n4. 80397c0: caf4 7d26 bea3 84dc bf3b 3e62 5b66 d6ac ..&}....;.b>f[.. 80397d0: c28b a211 dcfa c957 aea9 d6b7 3be1 b540 ......W......;@. 80397e0: 8118 577b 5f36 f52e de77 c8ea 93fa 1e76 ..{W6_..w.....v. 80397f0: 3ff2 fd4c 17fc 0f64 f94b baf4 fe73 960b .?L...d.K...s... 8039800: 5f0c 7c5e dc22 1d76 69a8 04e4 3950 80a3 ._^|".v..i..P9.. 8039810: 19f8 db64 f3eb 2e2f 793e 3d12 f841 43d3 ..d.../.>y.=A..C 8039820: b27e 4742 388f 2bd7 f723 dbdb edeb 7457 ~.BG.8.+#.....Wt 8039830: 6086 a4a5 da4f 7209 2175 e334 e870 86d5 .`..O..ru!4.p... 8039840: bf61 8c44 315a 0add 7f3c 4214 97ef 3c65 a.D.Z1..<..B..e< 8039850: 2d84 a55d bd86 7c5d f4c9 01c7 7ff2 b58f .-]...]|........ 8039860: 605b 5879 035a 754a e7a7 b412 1c59 fcb8 [`yXZ.Ju....Y... 8039870: 0f7e 1b02 6126 f056 387e 9089 22b4 fd6b ~...&aV.~8..."k. 8039880: d100 bc58 34d2 b147 010f c513 539c 102a ..X..4G......S*. 8039890: 54f6 fe19 33ec 772a d69e 7d52 5387 4b47 .T...3*w..R}.SGK 80398a0: ec7a cd8d 2f0e 92b9 9727 1c3e 3917 d860 z..../..'.>..9`. 80398b0: 3127 95a6 a22f 64b4 d04a 3983 570a 859a '1../..dJ..9.W.. 80398c0: 2510 88ec ba85 57e1 9af4 2313 1c25 b2c0 .%.....W...#%... 80398d0: 99d9 8c37 de3d 43c0 8753 b37c 94da ec96 ..7.=..CS.|..... 80398e0: 988b 12d1 3b80 7244 e338 4c4c baa1 e86e .....;Dr8.LL..n. 80398f0: 2f15 ee46 57bb 9e9a f0d1 a352 6a1d 6765 ./F..W....R..jeg 8039900: e358 12a0 6692 8585 ea6e 7e47 dbec f43e X....f..n.G~..>. 8039910: 93aa 0ab6 0f7c 0181 8fc1 9aa6 a669 71e6 ....|.......i..q 8039920: 6fbe 815e 2218 1585 f0ab 6b29 0a7b 784c .o^.."....)k{.Lx 8039930: 45e3 fb3a 6f30 17cc 81b6 6d57 5da9 ac08 .E:.0o....Wm.].. 8039940: bf23 816f 6b61 c094 ddb0 79c7 3c87 0b16 #.o.ak.....y.<.. 8039950: 1742 fba1 4807 bf0a f8f7 6dce 4d2d abcf B....H.....m-M.. 8039960: b642 b720 4e7d daab 4ac8 419c 6969 f237 B. .}N...J.Aii7. 8039970: ce11 6a4f 89df 9e8e 1780 d49f 3896 6dd9 ..Oj.........8.m 8039980: 91a1 ece9 b8ec 907f 900c 0a26 0019 5932 ..........&...2Y 8039990: 499e 101a 32b4 0b73 cd20 4418 d2f2 2a04 .I...2s. ..D...* 80399a0: c743 91ae 4573 d99c bba4 99a4 d305 5351 C...sE........QS 80399b0: 359b 153d 05bd 50a4 d3e2 f170 9487 8796 .5=....P..p..... 80399c0: 9162 3448 a2b2 1fbe 86ec e563 2146 4669 b.H4......c.F!iF 80399d0: 0016 55e5 3703 9540 bf4a 91b6 4ffb c2e7 ...U.7@.J....O.. 80399e0: df63 421e 28b5 6533 5869 0e14 3524 595c c..B.(3eiX..$5\Y 80399f0: 8ac9 597c d0a7 7e67 28ef 5f6d 6009 340d ..|Y..g~.(m_.`.4 8039a00: 09c8 10fb 79cb 8c37 662a 5e1f 6ba6 7c09 .....y7.*f.^.k.| 8039a10: 9862 be5c b2b5 b057 3243 9b07 41ed 42a8 b.\...W.C2...A.B 8039a20: 34f9 14ed 98aa 4dd6 33a0 dd29 ec29 0d54 .4.....M.3).).T. 8039a30: a701 9083 29b9 6c90 2365 0b37 c820 9d55 .....).le#7. .U. 8039a40: 5905 802e e6b4 b481 200a 44c8 ed9d 8565 .Y....... .D..e. 8039a50: 8440 2dcd 2126 6dec 852a 9cd9 40b6 5e29 @..-&!.m*....@)^ 8039a60: 6945 6136 e52e a6a9 5231 12b5 4051 380d Ei6a....1R..Q@.8 8039a70: aa2c fb8a 54c7 a324 aaa0 5e90 b8a9 0718 ,....T$....^.... 8039a80: 7306 0151 998f a5e5 2ba7 8348 1289 0640 .sQ......+H...@. 8039a90: 5535 329f a870 b32a 334c 4b74 c775 acae 5U.2p.*.L3tKu... 8039aa0: d112 5cbf 1433 aac8 10d9 b71a c595 5404 ...\3..........T 8039ab0: fb8c 6ba1 202a 5742 1b29 320b 502d f524 ...k* BW)..2-P$. 8039ac0: 9d00 6d2a 5610 8f24 4089 35fc 61a0 7e22 ..*m.V$..@.5.a"~ 8039ad0: 6805 7a98 fd0c 1787 970e 0148 2660 40c5 .h.z......H.`&.@ 8039ae0: cd6e 1730 c655 8993 4bd3 3ee4 6db1 0973 n.0.U....K.>.ms. 8039af0: dab4 b495 709a be9e e7a0 85cb 14cd 5e60 .....p........`^ 8039b00: a8f2 b174 a3b4 490f 61a6 d2f3 5482 49ec ..t....I.a...T.I 8039b10: 3413 60ad 2148 e6b9 1556 993a 829a cc58 .4.`H!..V.:...X. 8039b20: 66dc 3ae4 2499 ca4e 566d 6f0d 56b4 b89c .f.:.$N.mV.o.V.. 8039b30: 4739 8d4a a95e 4c98 1cf0 bd30 f152 6654 9GJ.^..L..0.R.Tf 8039b40: c28c be5e 2258 d730 6b18 8833 38cf 84ae ..^.X"0..k3..8.. 8039b50: b2a3 2110 7236 6e71 8683 6b21 5296 30d8 ...!6rqn..!k.R.0 8039b60: 1a1a 8c52 8e64 4df1 9858 41bd b055 9574 ..R.d..MX..AU.t. 8039b70: f5ba 787b f2bd 326a 891c 23e4 c795 2b23 ..{x..j2...#..#+ 8039b80: 92dc 28c1 b243 f2fd c8cc c197 3fc5 16f2 ...(C........?.. 8039b90: 7517 a499 a0b2 0e02 6073 8a66 36b6 9436 .u......s`f..66. 8039ba0: a8be 9ee6 8d33 1973 5085 bf5f e73c cab4 ....3.s..P_.<... 8039bb0: 854f 2ae2 d222 6b52 0284 cecf 4c4f 4f9a O..*".Rk....OL.O 8039bc0: 4ea4 a6ce 4440 267b 91e5 91e7 e40f bcc9 .N..@D{&........ 8039bd0: 99cf e172 3e66 3833 2802 2a22 ef7e 8804 ..r.f>38.("*~... 8039be0: 59c9 1f48 7c3c 77cc 1f0f 7af4 6057 6aec .YH.<|.w...zW`.j 8039bf0: 58f4 d83d 8bf9 058b 70fc 1019 35f4 8451 .X=......p...5Q. 8039c00: 5634 19b8 9970 6947 17ff 009f d06b ae10 4V..p.Gi....k... 8039c10: 519e 4e12 274d bf09 b991 c9c0 3b3a 321b .Q.NM'......:;.2 8039c20: b065 9387 6531 e0d1 e71a bfb7 1489 7ef6 e...1e.........~ 8039c30: c3cf cebd 8fcc 454b fab3 580d 8274 751c ......KE...Xt..u 8039c40: 1496 9799 a20e 0b85 1049 6c50 d284 f34c ........I.Pl..L. 8039c50: 5cb5 9546 8af0 e949 af93 a596 d004 963b .\F...I.......;. 8039c60: cb16 0f54 3969 610f e239 59da 1071 4a51 ..T.i9.a9..Yq.QJ 8039c70: 3800 0318 e30a 07e7 32e1 2caa 9da4 aa40 .8.......2.,..@. 8039c80: 3bf0 4c55 9f27 2ea0 893e caef 365c 9882 .;UL'...>...\6.. 8039c90: 444a 8001 a12c da4a 74be 539a 1783 14ea JD..,.J..t.S.... 8039ca0: 3cf0 114c c0a0 1cd6 f761 1707 ca81 0a39 .. 8039da0: 0ff7 57d8 3668 a4f1 821c b2e6 eb71 f7fb ...Wh6......q... 8039db0: be0f fb7b 29a6 9eff be9e eb3c e7c8 6dda ..{..)....<....m 8039dc0: 490a 2f98 c3c1 d4ed 80fd 2e17 8bbe 91f0 .I./............ 8039dd0: 7407 5377 e1da 1a34 d703 5d9d 3713 1740 .twS..4....].7@. 8039de0: d01a a784 4b81 b448 c401 bb59 88d8 8aee .....KH...Y..... 8039df0: f503 3396 aee0 0341 ae01 2122 79b8 0866 ...3..A..."!.yf. 8039e00: 2f8b 5e1b 5fbc 067f e073 98af eb84 9dcd ./.^._..s....... 8039e10: adc4 f707 24fc e737 9934 62d6 4345 a372 .....$7.4..bECr. 8039e20: d847 a2c2 9813 5ec5 6b82 ea7f e491 e453 G......^.k....S. 8039e30: ab48 0cbc 7208 0256 96f6 c170 6433 28b1 H....rV...p.3d.( 8039e40: 90cf 4fd2 e305 bf83 20af 55d4 1760 02be ...O..... .U`... 8039e50: 0bea bc41 c3f1 5f08 804f 027f 240e 6cee ..A...._O....$.l 8039e60: 2caa 1bdf a124 3815 f0de c4e6 a846 6901 .,..$..8....F..i 8039e70: d486 19c9 54f9 7977 85da 2255 e8cb 80f8 .....Twy..U".... 8039e80: 5d71 1463 6f40 ce60 d726 5887 f2a5 9203 q]c.@o`.&..X.... 8039e90: a3c3 e016 2144 10fd c862 b0e6 f2a0 8005 ....D!..b....... 8039ea0: cf19 14ce d5a5 3c44 7cc7 6d09 3732 e51a ......D<.|.m27.. 8039eb0: 8960 d45b 70c2 55c1 8eea fa3a e4d3 f210 `.[..p.U..:..... 8039ec0: f657 d733 1f5b 0516 5c87 7d4b c172 82ed W.3.[....\K}r... 8039ed0: e1bd 6b60 beb6 7ce3 b567 ff4e f128 7918 ..`k...|g.N.(..y 8039ee0: fd11 125a 77be 576f 37b8 504b 535b 766a ..Z..woW.7KP[Sjv 8039ef0: b638 e264 0a2e 9fc2 405e d71e 1e0f 81dd 8.d.....^@...... 8039f00: 0c7b 4bf7 43b0 20f8 a544 e834 1dea 7bcd {..K.C. D.4....{ 8039f10: f63e 89a1 6a01 3b80 2838 a975 8c74 0ec4 >....j.;8(u.t... 8039f20: b914 08a2 05c9 7c1d 62fe f964 f501 0a26 .......|.bd...&. 8039f30: 547b e318 004b 8791 b590 920e 4cc6 eb73 {T..K........Ls. 8039f40: b9ce 0b77 6adf 89e0 e0c9 52e2 49e7 d4bc ..w..j.....R.I.. 8039f50: b4c7 1391 d143 ce40 8186 646a f49b 8866 ....C.@...jd..f. 8039f60: 4fcb 17ca 6bc5 2b29 5575 9178 6b8b c5aa .O...k)+uUx..k.. 8039f70: 8c70 b3c1 ef2c 5544 b01a c478 27e7 e9ca p...,.DU..x..'.. 8039f80: 5305 5b4a a640 3798 4dcc a455 81c9 c424 .SJ[@..7.MU...$. 8039f90: 120e 41ca d811 f992 2ce8 39d9 d914 1b02 ...A.....,.9.... 8039fa0: 014e 0e45 e617 bbb0 983b 5a18 51bd 13fd N.E.....;..Z.Q.. 8039fb0: a82b d5ae 7ab5 4dbd 1aff 361a 980f 48cb +....z.M...6...H 8039fc0: 83e8 1fc4 d282 9c95 57a2 a988 7f09 a2f3 .........W...... 8039fd0: 6130 52e9 9f62 8cb1 d8f4 81b5 3f15 0e38 0a.Rb........?8. 8039fe0: 6988 a0e0 813a 1867 6e1f 10b0 c1a3 e84a .i..:.g..n....J. 8039ff0: 498f 18a1 d3ec b93b 529e 4f8e 8a97 4bc5 .I....;..R.O...K 803a000: 568e 375f 2701 09a9 5aed 9c76 3ae7 ee25 .V_7.'...Zv..:%. 803a010: 0b34 f514 d592 3867 0512 631a 4ab0 22f6 4.....g8...c.J." 803a020: 164c 3f9b 705a df00 87a7 dcda e9db eaa9 L..?Zp.......... 803a030: 470a b2b5 826f 0a03 1e6b 3cc1 7004 bd98 .G..o...k..<.p.. 803a040: 025d e3ec 0443 9002 a69e 4880 1a53 91ee ]...C......HS... 803a050: 701f a4df 4279 10c2 8954 ca4a a967 022c .p..yB..T.J.g.,. 803a060: 8990 49f1 8594 c849 c5de 3297 c73a 2f19 ...I..I....2:../ 803a070: c2a8 5487 8f32 d89b 4b07 329d da35 7831 ...T2....K.25.1x 803a080: 1550 58be 80c6 d5fc c0bb e80c 155d 4210 P..X........]..B 803a090: 0ae1 5b94 725c 920d 931e b671 7243 11a3 ...[\r....q.Cr.. 803a0a0: d820 27db c1ab 5da5 19be c785 2750 4f1f ..'...]....P'.O 803a0b0: e4c6 021f a7e3 94a1 711e 0992 c789 aa9f .........q...... 803a0c0: 1189 e83f 28f4 028a 780f 4e4c 7619 3dd9 ..?..(...xLN.v.= 803a0d0: 0fa6 3cd3 781e 7320 40ae 1038 a680 7f03 ...<.x s.@8..... 803a0e0: 0e2a 7936 c233 3a80 b96a 9b85 2a6a 6140 *.6y3..:j...j*@a 803a0f0: 1061 cf6f efda e858 e29a 6e05 5e89 d429 a.o...X....n.^). 803a100: 6673 4ccc bf2f 8916 4be7 6d88 7171 454e sf.L/....K.mqqNE 803a110: f37c d764 d3ea 3175 b8d8 f813 7ba5 807e |.d...u1.....{~. 803a120: 180f 66a4 2a6e f208 3afc 3e7d 9e9f 3da6 ...fn*...:}>...= 803a130: cee7 e563 869a 96ee 063f aa55 f4c6 2f77 ..c.....?.U...w/ 803a140: c08c 9108 4a9e e474 1bec 3c63 6c92 06c6 .....Jt...c<.l.. 803a150: 0c52 19e6 0e8e 7ebc e8f0 126e 6fbe db21 R......~..n..o!. 803a160: 294a e5f3 48ce f154 f701 422e 7f50 413a J)...HT....BP.:A 803a170: 94a2 d994 1968 b8e6 6b04 4840 6441 0bdc ....h....k@HAd.. 803a180: 415a 94df 36f4 8eea c3da 90ee 3069 140d ZA...6......i0.. 803a190: b445 e60f 2f78 efda d844 5009 0507 7088 E...x/..D..P...p 803a1a0: e02e 6f57 3e7a 9c1e a21a a78c 5787 488f ..Woz>.......W.H 803a1b0: b069 f8b8 34cc 187b e718 8a0f 1190 20e1 i....4{........ 803a1c0: 83b6 0f68 72e4 3c1f 9d1d 1cbc dda0 253b ..h..r.<......;% 803a1d0: b738 2011 9381 063f 3e87 9485 8a7a 9360 8.. ..?..>..z.`. 803a1e0: f681 f516 03b3 4c7f c25c 0947 6598 a03d .......L\.G..e=. 803a1f0: ae85 e717 f0aa 0c99 f551 c110 be7a 0c7a ........Q...z.z. 803a200: 4eeb d624 8798 93d4 3e20 c0f4 7baa f08e .N$..... >...{.. 803a210: d738 5252 2a4e b025 4849 1df7 c784 143b 8.RRN*%.IH....;. 803a220: f10c 92dc dc83 1b63 5804 43ea 2abf f99f ......c..X.C.*.. 803a230: 1158 bf79 c1de 9437 3978 997e ba24 0a58 X.y...7.x9~.$.X. 803a240: bb9e c3a5 c5c5 6443 012b 3c10 8105 23b4 ......Cd+..<...# 803a250: 8326 0e8e ff49 0900 5bcd be53 6a66 d849 &...I....[S.fjI. 803a260: b549 bf20 5edc ff40 314f ae62 dca7 9e6c I. ..^@.O1b...l. 803a270: 0d22 8737 7ca9 04af 5595 6c0b bae5 5546 ".7..|...U.l..FU 803a280: c248 a590 3897 8975 3306 532e 49a1 3a52 H....8u..3.S.IR: 803a290: 0118 bb36 161b 72bc 8032 d0dc 6188 476f ..6....r2....aoG 803a2a0: 8211 fab4 50fd 1d83 5741 341b df8e 8220 .....P..AW.4.. . 803a2b0: 25a1 cce8 f04b 1ead 87ad 584b 122e 48b2 .%..K.....KX...H 803a2c0: 50ec 3618 193b 93c0 1b8c 4ae2 edf8 1b2c .P.6;......J..,. 803a2d0: 19a6 6d82 04fa 0e77 5841 6bf9 73ca 9507 ...m..w.AX.k.s.. 803a2e0: 342d 1ab8 313c 850c 113c 9212 d3a3 4aa0 -4..<1..<......J 803a2f0: 4054 8015 b957 b630 0794 5470 da93 2391 T@..W.0...pT...# 803a300: 0c82 0e09 b67d 2a46 665c 504f 0780 10ce ....}.F*\fOP.... 803a310: 0bec 38a9 9fc8 a03e 0219 0247 9e79 7a10 ...8..>...G.y..z 803a320: 40c6 686d 2081 3304 f614 43af 326c d3b5 .@mh. .3...Cl2.. 803a330: 4440 e281 f725 74f8 4e4e 43ed 096e d41a @D..%..tNN.Cn... 803a340: 1bd8 0689 e721 4272 068b 0ab6 1f1d a067 ....!.rB......g. 803a350: 9c8b 64fc 1840 69aa 1b6c a3d1 2c46 21ac ...d@..il...F,.! 803a360: 29e4 7d80 2fda 9a75 b3a5 b137 82f2 a190 .).}./u...7..... 803a370: 7944 7e95 a3d4 1b1d 8fe4 8557 520d 6d4a Dy.~......W..RJm 803a380: 20a9 4e43 5b21 a0b4 93de 09be dd5d a1c8 . CN![......]... 803a390: c32c 193f 1c39 746a 0905 1d8a 2f40 2792 ,.?.9.jt....@/.' 803a3a0: 38cb 64f4 8bd0 0705 80be 6452 7c87 2a65 .8.d......Rd.|e* 803a3b0: 0455 9c33 1c19 1442 31f2 121b 2fc1 63f6 U.3...B..1.../.c 803a3c0: dd31 443b f031 1f34 ec1f 9e82 0d05 647b 1.;D1.4.......{d 803a3d0: 21c1 5a59 b5e4 2819 0754 9d1a ae9a 2b3a .!YZ...(T.....:+ 803a3e0: ff59 b7a4 fd59 0db3 b0d7 4ba2 62ce fe80 Y...Y......K.b.. 803a3f0: 1409 a15d aa76 10bd 676a f58a acdc b421 ..].v...jg....!. 803a400: a204 1a80 db96 a6f3 520e cd76 bcde f7a9 .........Rv..... 803a410: ea79 fdfd 5f4e 009c 7bc4 5eee 529f 44d8 y...N_...{.^.R.D 803a420: 1708 336a fb4d 1525 3d92 26d0 140b 8869 ..j3M.%..=.&..i. 803a430: a7b5 8fa1 1b5b 0684 411b c3bf 0f33 dd22 ....[....A..3.". 803a440: 5e23 b841 c25b 70c9 f626 b44c 27c3 b0d4 #^A.[..p&.L..'.. 803a450: 0c84 e0ad 4e1a d603 6d71 0cf2 ffa7 34db .....N..qm.....4 803a460: 9ca3 63a6 3819 fc5a 0e51 1c11 960b 1a99 ...c.8Z.Q....... 803a470: f6a9 2355 8520 1873 7867 6e43 f081 2e57 ..U# .s.gxCn..W. 803a480: e0fd 5c49 c539 3bcf 7d4b 2e25 aa88 09f0 ..I\9..;K}%..... 803a490: 5836 3601 21f2 1d20 0a44 ffb2 13c2 673d 6X.6.! .D.....=g 803a4a0: 29e3 6931 3d2e d189 be47 1e0b 2ec5 5da7 .)1i.=..G......] 803a4b0: b521 3102 5670 586d 65ec f09d 24d1 4112 !..1pVmX.e...$.A 803a4c0: ac48 f23e b7fa 8f9f fa4b 2793 7f36 8472 H.>.....K..'6.r. 803a4d0: 1afe e17a 36f3 3bf2 0e30 3d51 cf89 0754 ..z..6.;0.Q=..T. 803a4e0: e751 d64d f339 ee50 a504 ec77 3e51 2dcc Q.M.9.P...w.Q>.- 803a4f0: 9231 422b b2da a15e 5003 187a 26a6 7dcc 1.+B..^..Pz..&.} 803a500: c0e6 9dc1 1853 f7ca 853f 7401 905a e9c3 ....S...?..tZ... 803a510: 9019 99cd 257d 93bc 51b8 75d3 ff52 a406 ....}%...Q.uR... 803a520: fcc7 6aa6 2f6f 27ab 1cd3 3746 a83e 9df7 ...jo/.'..F7>... 803a530: 7aec bc85 3049 7283 6990 728a 4068 7d53 .z..I0.r.i.rh@S} 803a540: 63aa a6c3 b6d4 723a 255e c8d7 3d4f 7bd0 .c....:r^%..O=.{ 803a550: 4196 6500 6641 53b1 7679 311c e60a 72a9 .A.eAf.Syv.1...r 803a560: 1c05 5f94 ce62 bb5d 3d2d 4a28 6417 85c2 ..._b.].-=(J.d.. 803a570: 8037 544e 96ba 4562 f40e f527 b294 a52c 7.NT..bE..'...,. 803a580: 2059 f1c4 7292 0590 1490 0d31 3fb8 f485 Y ...r....1..?.. 803a590: cc5a 2f49 8b0f f671 fdbc 278e 0044 3834 Z.I/..q....'D.48 803a5a0: 29bc 1348 3e9e 4717 e728 bb65 cb48 1855 .)H..>.G(.e.H.U. 803a5b0: 67a7 9e29 9d74 9597 af2a b5b9 85c0 f795 .g).t...*....... 803a5c0: 1505 4256 12ee 70ca 8181 3303 a54a fc8c ..VB...p...3J... 803a5d0: 0d11 d268 9c1a 92ae 758d 6e90 bd3b e350 ..h......u.n;.P. 803a5e0: 68f2 86a4 7b5e e420 493d cbc1 010c c1ac .h..^{ .=I...... 803a5f0: 2049 531e 90dc c637 3298 7270 2803 8b41 I .S..7..2pr.(A. 803a600: d2c9 f01d f746 ae86 3c8d b7d7 b510 7f65 ....F....<....e. 803a610: aeb3 6d2d 093d b46e e86f 37fc eafb f71e ..-m=.n.o..7.... 803a620: ba59 24f1 44d8 c78e 86a1 70ef 09a0 50d9 Y..$.D.....p...P 803a630: d931 f850 0586 eb7f 06ef 26a4 f679 19b2 1.P........&y... 803a640: 9a3c bd0c 272b 3530 d6fe b68d a5be 1bcf <...+'05........ 803a650: 4797 b2d3 1764 28e4 fac5 8a8d 8243 737a .G..d..(....C.zs 803a660: 6b89 66b7 3045 d8a5 2fa9 da93 a064 6fa7 .k.fE0.../..d..o 803a670: 31f4 f4ca 56c5 0517 8615 4f4f 6eed 639a .1...V....OO.n.c 803a680: 6c76 0145 3819 7b74 90aa 83c6 642e a783 vlE..8t{.....d.. 803a690: 1b5d 2b96 c632 8218 21c4 fa9d 9ec7 e87d ]..+2....!....}. 803a6a0: f227 e19a e076 c343 1f84 3f8f ca4e 805a '...v.C....?N.Z. 803a6b0: 3efc 54e9 cf4d 9b14 9d21 e6ff eada 5d3a .>.TM...!.....:] 803a6c0: 84e4 b05f 2e6f 5c94 987c 1c85 b05f bdcf .._.o..\|..._... 803a6d0: a708 d237 1c4d bbaf 68d0 9e53 4517 d9df ..7.M....hS..E.. 803a6e0: 0657 bb4f c7e6 ed9a 3e91 170b 0b84 4a25 W.O......>....%J 803a6f0: 34b3 a9dc 718c c9f9 909f 89ce 7e8c 58fe .4...q.......~.X 803a700: 716a cd78 6545 0212 9ed8 59f4 82df ea5e jqx.Ee.....Y..^. 803a710: 783f adac 00a2 561f 9284 ab0b 7167 f611 ?x.....V....gq.. 803a720: 40d2 2411 7970 e296 3e92 fb07 90b2 9a6b .@.$py...>....k. 803a730: 3cff 672c 8a3d ebc3 3416 883a 63de 991c .<,g=....4:..c.. 803a740: c98e a8f7 d646 d2f3 4ab3 1563 aa74 ceba ....F....Jc.t... 803a750: 93d6 e0ff 5581 667a a112 5539 373b 2f72 .....Uzf..9U;7r/ 803a760: 8fdb 28ed 4eb2 0f32 3e06 3a6d 7844 1613 ...(.N2..>m:Dx.. 803a770: 698f e1ed 21d6 5baf 84af a7fb d6a7 205e .i...!.[......^ 803a780: b36b 4001 7227 c55f 3965 d1ba 67b1 c657 k..@'r_.e9...gW. 803a790: 90fb f267 5cfa 6f19 a7a7 819e 77a5 f6bd ..g..\.o.....w.. 803a7a0: 3e21 939c a061 245f 3e2d 9470 e59e 9c76 !>..a._$->p...v. 803a7b0: e54d eb92 4238 a15a 986f fbd3 e0a4 47c8 M...8BZ.o......G 803a7c0: 8fa9 49c8 67b8 3084 7f76 92c8 e5e9 ac8d ...I.g.0v....... 803a7d0: b771 2014 68cb 2d9c bb02 a020 f4f7 f61d q.. .h.-.. ..... 803a7e0: e30b 161c 920f f520 62fd ac03 13da 9957 ...... ..b....W. 803a7f0: 7c2c 27b3 5f24 7d06 122d 1308 657e 2f81 ,|.'$_.}-...~e./ 803a800: 375c ea35 8438 5e5d dbba e21e 53ae 74b6 \75.8.]^.....S.t 803a810: 29ba e727 0098 d82f ac91 cfce 80ea aca1 .)'.../......... 803a820: 29fc 13ca 8c7c 4709 1ced 847a aee6 db1c .)..|..G..z..... 803a830: 4245 5d35 a35c acbf 0611 acbe c619 332e EB5]\..........3 803a840: f942 9e4b 08f0 21ec fa5e c802 dc11 efaa B.K....!^....... 803a850: c5c3 17a1 d287 eae1 15d0 2ad6 3c21 751d ...........*!<.u 803a860: 0223 a207 2c9d c22d b11b 14a8 9ee8 4baa #....,-........K 803a870: 844c 17d9 4ee2 5b0c ae06 c504 e405 94f3 L....N.[........ 803a880: 610c 5e2a 114a a256 9e73 cbaa 43a4 6708 .a*^J.V.s....C.g 803a890: 3638 3b07 58e6 97b1 7412 df9b f6f4 c4c8 86.;.X...t...... 803a8a0: 083e ea1a 9170 40dc 6054 f213 7415 ee11 >...p..@T`...t.. 803a8b0: de08 ec6b 2c81 9796 da07 1633 5c9a 4b29 ..k..,....3..\)K 803a8c0: 982f f45a 6585 14b0 9949 4c20 2e20 3448 /.Z..e..I. L .H4 803a8d0: 20d7 e581 8ff6 f4ce af90 674c 3ff7 2739 . ........Lg.?9' 803a8e0: ed5b f732 8263 117d 4db5 5a5d 3469 6840 [.2.c.}..M]Zi4@h 803a8f0: dd0d 6797 7f52 0a10 df2f 34e1 5c21 5df0 ...gR.../..4!\.] 803a900: f6e1 5c4b 6cfc d8df 8f8c 4a48 4a21 ea6a ..K\.l....HJ!Jj. 803a910: 3acd 220e efcf 700f 8985 8f9e ef7c 66f8 .:."...p....|..f 803a920: dcf8 e1d4 d66e 6b1a 4d1b a5fe cf6b c347 ....n..k.M..k.G. 803a930: ee00 01fe 80ae 97b7 8e96 8f8f c76b b5cb ............k... 803a940: ea30 e12f 75be 097d d21d 7937 fee1 0c87 0./..u}...7y.... 803a950: efd7 8e51 b6b5 6ad2 b51d eb5a d0cf ab4d ..Q....j..Z...M. 803a960: a1ba 9735 6a93 5973 18db 9754 f59b d567 ..5..jsY..T...g. 803a970: 4b46 e3ab babd 5491 f037 a8f7 daba 567a FK.....T7.....zV 803a980: 52a7 4b7a 62a8 6cd0 8eb6 cbaa cd2b 72e9 .RzK.b.l....+..r 803a990: 5240 f46b 6da8 d424 8bf1 ab51 aab1 c829 @Rk..m$...Q...). 803a9a0: eaf5 72da b9b5 e186 1b1a fceb 1783 a659 ...r..........Y. 803a9b0: 09e1 1aa5 acd5 6b2d 40a8 ff09 a591 22b9 ......-k.@....." 803a9c0: 9002 503d c033 18be 4a61 1d5a 6a2b 37d6 ..=P3...aJZ.+j.7 803a9d0: 48aa d713 d796 6a57 582b dad7 6d46 4d05 .H....Wj+X..Fm.M 803a9e0: bbf1 45ca b8f8 b2ef 2278 5130 7f2f 35a7 ...E....x"0Q/..5 803a9f0: 8c19 296c e17a 59f6 04e7 ea25 6fe5 677a ..l)z..Y..%..ozg 803aa00: 1798 cc3a 21fd 8a74 151b 5411 b115 0ad6 ..:..!t....T.... 803aa10: 21e9 dc38 fa8f 375b a590 6b84 7cbc efbb .!8...[7...k.|.. 803aa20: be35 8106 258f 16e3 3f0a bb88 f873 3230 5....%...?..s.02 803aa30: b854 fdc2 6fce 448f b1d6 cd0d fad6 7011 T....o.D.......p 803aa40: 184a c55d 68c6 202d b5b3 b402 aa0f 95cd J.]..h- ........ 803aa50: 67d5 e6d5 a82a b5a4 2a82 4dda 1d3c 1955 .g..*....*.M<.U. 803aa60: 2a9c 3df8 cae1 0101 2c13 403a c279 bd3d .*.=.....,:@y.=. 803aa70: 2d18 a083 2bea c3ab 736a 835d 0042 a3a2 .-...+..js].B... 803aa80: 9a61 ec75 1895 0f08 43d3 0761 3069 c202 a.u......Ca.i0.. 803aa90: d470 2ab4 f29a 6b90 9a5c 5ab4 360c 4a20 p..*...k\..Z.6 J 803aaa0: c316 80a2 0607 fa00 d99e 841a e7c6 cbee ................ 803aab0: 20df 87cb b4bf 1bc1 4c21 6faa 076d 1b9a . ......!L.om... 803aac0: da1b 637a 5879 356d 1a9b 807e 0d9f 5581 ..zcyXm5..~....U 803aad0: 8a5a 3b40 b010 a2d1 aa1f ff94 3b80 fdc6 Z.@;.........;.. 803aae0: 6c10 040e 9f37 0d71 4d96 e398 180d 5a36 .l..7.q..M....6Z 803aaf0: e06b 35fa ec90 c80a 657e 441e 921d db85 k..5....~e.D.... 803ab00: 3062 47fa 223b adf7 6ad1 eb68 cccb fff6 b0.G;"...jh..... 803ab10: 996f 3399 e624 ccd2 f9cf 856b ecf8 5839 o..3$.....k...9X 803ab20: 5d57 feac 68d6 7566 a5b5 6fad 92ac 5f50 W]...hfu...o..P_ 803ab30: ad59 82ae 36a1 b1d6 286f 626d f1ff e1a3 Y....6..o(mb.... 803ab40: f419 aeb2 36ad 0fe8 a840 2094 87f8 459e .....6..@.. ...E 803ab50: 6d0d 7aef 5b53 4627 6e5b e441 5737 d4f1 .m.zS['F[nA.7W.. 803ab60: ab5c 6b3f 7441 b536 480d 0856 6481 197d \.?kAt6..HV..d}. 803ab70: b52c 7f52 a286 1356 e0a3 036d 40bf 249f ,.R...V...m..@.$ 803ab80: d773 f8f1 8aac d6e1 ffd0 034a 8d25 46f5 s.........J.%..F 803ab90: 5d52 46a1 26cd 3e1f 96f5 22d6 8796 472c R].F.&.>..."..,G 803aba0: 46b3 9a9d 5635 4009 16fe 5425 039b 8aac .F..5V.@..%T.... 803abb0: 0436 1a07 36e7 1bf4 a08b 5496 6a09 1345 6....6.....T.jE. 803abc0: 465a c1b3 4203 1134 682e 5816 e35a f819 ZF...B4..h.XZ... 803abd0: 0b0a 79e1 d2e2 c610 c9a6 6957 cff2 1b96 ...y......Wi.... 803abe0: d6d5 2632 5d5f 27a9 981b 3829 05a4 5689 ..2&_].'..)8...V 803abf0: 69c7 6846 df00 13d4 8cc2 cc06 18bc 6ce1 .iFh...........l 803ac00: 93ac 3a14 5fc2 7e60 dd05 6bae 751b 9c9c ...:._`~...k.u.. 803ac10: 1c75 f805 778d b7fa a751 1463 d520 a695 u....w..Q.c. ... 803ac20: 48a8 0eb8 78b0 7fa5 f51b 8b6b 7c26 b642 .H...x....k.&|B. 803ac30: f298 cf87 9d08 1671 b891 3faf e487 ff96 ......q....?.... 803ac40: ba20 46c4 4b13 5b5e b67d 0cb2 bef9 48c1 ..F.K^[}......H 803ac50: 9481 964d d449 ebd2 f2d1 1d3a 2b20 1aa0 ..M.I.....:. +.. 803ac60: 4455 2198 e1e4 a8fd 4ab1 5b38 ad5d 4892 UD.!.....J8[]..H 803ac70: 906a d056 d658 6b5a 6c03 9d11 ab30 c274 j.V.X.Zk.l..0.t. 803ac80: 08a0 20d5 35a9 3c7a 6eaa 1b50 12aa 8905 ... .5z<.nP..... 803ac90: 1fa8 0b70 406a a11d 112e d25d 2f10 9846 ..p.j@....]../F. 803aca0: a341 7d09 bd65 ae85 eb9b a838 41d6 d07e A..}e.....8..A~. 803acb0: 5868 c1bf 4289 8d2a 541c 3f2a 5f50 3158 hX...B*..T*?P_X1 803acc0: e23a 20f1 3530 9356 4b58 b1e2 9aa4 2503 :.. 05V.XK.....% 803acd0: e849 e848 8072 afbe 87bd c73f ff91 ec5b I.H.r.....?...[. 803ace0: 2e22 d2bf 5577 bbe8 f8ac 3024 a3ee af8a "...wU....$0.... 803acf0: e27e 2fbb d09f 7b1d afb1 3b94 673c ff53 ~../...{...;: 803ad62: 6c2f 676f 6e69 682e 6d74 006c 5448 5054 /login.html.HTTP 803ad72: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803ad82: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803ad92: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803ada2: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803adb2: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803adc2: 6e65 2d74 654c 676e 6874 203a 3835 0d37 ent-Length: 587. 803add2: 430a 6e6f 656e 7463 6f69 3a6e 4320 6f6c .Connection: Clo 803ade2: 6573 0a0d 6f43 746e 6e65 2d74 7974 6570 se..Content-type 803adf2: 203a 6574 7478 682f 6d74 0d6c 430a 6e6f : text/html..Con 803ae02: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803ae12: 697a 0d70 0d0a 1f0a 088b 0000 0000 0400 zip............. 803ae22: 7d0a cd54 d46e 1030 157e 2463 754e 7bb7 .}T.n.0.~.c$Nu.{ 803ae32: a841 91c4 e950 1381 401c a382 cc93 5c6e A...P....@....n\ 803ae42: db1c 93d8 eeec e2ad 09c0 c409 2415 015e .............$^. 803ae52: 03d1 8845 433e 8df6 2718 6ddb a423 e21e ..E.>C...'.m#... 803ae62: d8f5 e333 67ef d9b4 a7bd 4fcf be5e 7179 ..3..g.....O^.yq 803ae72: 6aca 4c6c a59e 1995 9765 7392 408a 7955 .jlL....e..s.@Uy 803ae82: 00d6 562a 2ad6 4044 5bc9 885c 7447 9c37 ..*V.*D@.[\.Gt7. 803ae92: 88d6 c05e 56bb 9277 16bf 9eaf 1388 78d7 ..^..Vw........x 803aea2: ba85 c030 e959 822c 92a5 a767 aa12 5c25 ..0.Y.,...g...%\ 803aeb2: 5917 80d5 9de4 9586 0177 e56f 74ad b585 .Y......w.o..t.. 803aec2: a0ac 25d3 2188 d038 a356 4656 52c4 9019 ...%.!8.V.VF.R.. 803aed2: 83f3 ad46 d375 fb36 8db8 8610 d140 f293 ..F.u.6.....@... 803aee2: 9e88 8d40 f206 5bfe d57f edff b72f fbef ..@....[..../... 803aef2: edab 7f79 fb49 6c8b de36 4665 b7db 0eac ..y.I..l6.eF.... 803af02: 90b0 51bc 1eda 3196 1672 48c0 711e 2063 ...Q...1r..H.qc 803af12: 00d6 9d48 1962 47b4 1b86 704f d611 3b38 ..H.b..G..Op..8; 803af22: 9d53 4f1a 8b39 94a1 383c 8703 9167 6792 S..O9...<8..g..g 803af32: 39e3 466d 0ad1 6d57 acf2 1dd2 8d2b 518a .9mF..Wm....+..Q 803af42: ab72 42ba 3605 88fe 160a 35aa 1d78 f42e r..B.6.....5x... 803af52: 2a1a ce81 a753 6aff ea44 6108 cabc b533 .*..S..jD..a..3. 803af62: 7e83 949f 5b1b b71b 0974 a282 aa8f eba7 .~...[..t....... 803af72: 76ad a0ab a7bc 4c46 9257 dcef baa1 9e7a .v....FLW.....z. 803af82: 9ff7 9ffb a97b f57e b63f 481f 4fba 65c4 ....{.~.?..H.O.e 803af92: c13e 95e3 c305 f586 c19a f014 9578 d3b8 >...........x... 803afa2: c2f9 8685 12a9 b3b5 1392 a4c6 52f4 4673 .............RsF 803afb2: 5393 423b 5de0 ee4c 39ef 2b68 0952 1a55 .S;B.]L..9h+R.U. 803afc2: d055 143b eaec de78 257f 2f3f 8f92 0fc7 U.;...x..%?/.... 803afd2: 116c e3fd 366c e524 b699 bdbe d26d 63be l...l6$.....m..c 803afe2: 25ea 4b12 8932 d093 e869 1406 ff23 96dd .%.K2...i...#... 803aff2: ca06 5d80 dcd2 f9f1 7243 0d35 1a40 408b ...]....Cr5.@..@ 803b002: 4570 cbd0 8f1a fcd9 afc8 a8a7 593c a04a pE..........hB...S. 803b042: 2a25 17fd f802 cc9b 24bd b30a ca24 3e74 %*.......$..$.t> 803b052: 1376 ce33 6ceb 17f8 07f8 a233 8ac5 0415 v.3..l....3..... 803b062: 0000 .. 0803b064 : 803b064: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803b074: 0000 0000 .... 0803b078 : 803b078: b0b4 0803 6e92 0803 6e9e 0803 1802 0000 .....n...n...... 803b088: 0001 0000 .... 0803b08c : 803b08c: d7e0 0803 b757 0803 b763 0803 04e3 0000 ....W...c....... 803b09c: 0001 0000 .... 0803b0a0 : 803b0a0: b08c 0803 0b35 0804 0b41 0804 04f6 0000 ....5...A....... 803b0b0: 0001 0000 .... 0803b0b4 : 803b0b4: e260 0803 ce89 0803 ce95 0803 0948 0000 `...........H... 803b0c4: 0001 0000 5825 4c00 676f 756f 5474 726d ....%X.LogoutTmr 803b0d4: 6600 6e75 0063 7322 6f74 2270 d000 d0a2 .func."stop".... 803b0e4: d1b5 d181 2082 bed0 81d1 82d1 b0d0 bdd0 ..... .......... 803b0f4: bed0 b2d0 bbd0 b5d0 bdd0 0021 a2d0 b5d0 ..........!..... 803b104: 81d1 82d1 d020 d0bd 20b5 83d1 b4d0 b0d0 .... .... ...... 803b114: bbd0 bed0 81d1 8cd1 d020 d1be d181 d082 ........ ....... 803b124: d0b0 d0bd d0be d0b2 d1b8 d182 218c 2200 .............!." 803b134: 6964 6373 6168 6772 2265 d000 d0a2 d1b5 discharge"...... 803b144: d181 2082 b7d0 b0d0 bfd0 83d1 89d1 b5d0 ... ............ 803b154: bdd0 0021 a2d0 b5d0 81d1 82d1 d020 d0bd ..!......... ... 803b164: 20b5 83d1 b4d0 b0d0 bbd0 bed0 81d1 8cd1 . .............. 803b174: d020 d0b7 d0b0 d1bf d183 d181 d082 d1b8 ............... 803b184: d182 218c 2200 6974 656d 0022 6322 6e61 ...!."time"."can 803b194: 6563 226c d000 d192 d08b d0ba d1bb d18e cel"............ 803b1a4: d087 d0b5 d0bd d0b8 20b5 98d0 91d0 9fd0 ......... ...... 803b1b4: d020 d1be d082 d0bc d0b5 d0bd d0b5 d0bd ............... 803b1c4: 21be d000 d192 d08b d0ba d1bb d18e d087 .!.............. 803b1d4: d0b5 d0bd d0b8 20b5 98d0 91d0 9fd0 d020 ....... ...... . 803b1e4: d0bd 20b5 83d1 b4d0 b0d0 bbd0 bed0 81d1 ... ............ 803b1f4: 8cd1 d020 d1be d082 d0bc d0b5 d0bd d1b8 .. ............. 803b204: d182 218c 2200 666f 2266 6100 7466 7265 ...!."off".after 803b214: 2c00 7400 006f 9fd0 b5d0 80d1 b5d0 b7d0 .,.to........... 803b224: b0d0 b3d0 80d1 83d1 b7d0 bad0 b0d0 d020 .............. . 803b234: d098 d091 219f d000 d19e d082 d0bc d0b5 .....!.......... 803b244: d0bd 20b0 bfd0 b5d0 80d1 b5d0 b7d0 b0d0 ... ............ 803b254: b3d0 80d1 83d1 b7d0 bad0 b8d0 d020 d098 ............ ... 803b264: d091 219f 2600 6c00 676f 6e69 003d 6170 ...!.&.login=.pa 803b274: 7373 6f77 6472 003d 5448 5054 312f 302e ssword=.HTTP/1.0 803b284: 3220 3030 4f20 0d4b 430a 6e6f 6574 746e 200 OK..Content 803b294: 542d 7079 3a65 6574 7478 682f 6d74 0d6c -Type:text/html. 803b2a4: 530a 7465 432d 6f6f 696b 3a65 7520 616e .Set-Cookie: una 803b2b4: 656d 003d 0a0d 6553 2d74 6f43 6b6f 6569 me=...Set-Cookie 803b2c4: 203a 6469 003d 0a0d 6553 2d74 6f43 6b6f : id=...Set-Cook 803b2d4: 6569 203a 6f72 656c 003d 213c 4f44 5443 ie: role=................ 803b354: b8d0 81d1 82d1 80d1 b0d0 82d1 bed0 80d1 ................ 803b364: d000 d09f d0be d1bb d08c d0b7 d0be d0b2 ................ 803b374: d1b0 d082 d0b5 d1bb 008c 6572 6461 635f ..........read_c 803b384: 6d6f 756d 696e 7974 003d 7277 7469 5f65 ommunity=.write_ 803b394: 6f63 6d6d 6e75 7469 3d79 6d00 6e61 6761 community=.manag 803b3a4: 7265 5049 003d 616d 616e 6567 4972 3250 erIP=.managerIP2 803b3b4: 003d 616d 616e 6567 4972 3350 003d 616d =.managerIP3=.ma 803b3c4: 616e 6567 4972 3450 003d 616d 616e 6567 nagerIP4=.manage 803b3d4: 4972 3550 003d 6864 7063 003d 7069 6461 rIP5=.dhcp=.ipad 803b3e4: 7264 003d 7767 003d 616d 6b73 003d 7372 dr=.gw=.mask=.rs 803b3f4: 655f 616e 6c62 6465 003d 7372 735f 7265 _enabled=.rs_ser 803b404: 6576 3d72 7200 5f73 6f70 7472 003d 7372 ver=.rs_port=.rs 803b414: 705f 6477 003d 7372 6b5f 7965 003d 6964 _pwd=.rs_key=.di 803b424: 3d31 7200 316f 003d 6f72 3d32 6e00 7074 1=.ro1=.ro2=.ntp 803b434: 003d 746e 7370 7265 6976 3d70 7400 6d69 =.ntpservip=.tim 803b444: 3d65 7500 6374 003d 003f 003b 5448 5054 e=.utc=.?.;.HTTP 803b454: 7000 6f72 6164 6574 003d 5448 5054 312f .prodate=.HTTP/1 803b464: 302e 3220 3030 4f20 0d4b 430a 6e6f 6574 .0 200 OK..Conte 803b474: 746e 542d 7079 3a65 6574 7478 682f 6d74 nt-Type:text/htm 803b484: 0d6c 0d0a 540a 7572 0065 776f 656e 3d72 l....True.owner= 803b494: 7300 7379 6f4c 6163 6974 6e6f 003d 6f63 .sysLocation=.co 803b4a4: 6d6d 6e65 3d74 7500 6573 6e72 6d61 3d65 mment=.username= 803b4b4: 6f00 646c 6170 7373 003d 656e 7077 7361 .oldpass=.newpas 803b4c4: 3d73 d000 d09f d1b0 d080 d0be d1bb 208c s=............. 803b4d4: 83d1 81d1 bfd0 b5d0 88d1 bdd0 bed0 d020 .............. . 803b4e4: d0b8 d0b7 d0bc d0b5 d1bd d091 00bd 92d0 ................ 803b4f4: b2d0 b5d0 b4d0 b5d0 bdd0 8bd1 d020 d0bd ............ ... 803b504: d0b5 d0ba d1be d180 d080 d0b5 d1ba d082 ................ 803b514: d1bd d08b 20b5 b4d0 b0d0 bdd0 bdd0 8bd1 ..... .......... 803b524: b5d0 0021 92d0 b2d0 b5d0 b4d0 91d1 bdd0 ..!............. 803b534: d020 d0bd d0b5 d0b2 d1b5 d080 d1bd d08b ............... 803b544: 20b9 bfd0 b0d0 80d1 bed0 bbd0 8cd1 0021 . ............!. 803b554: 4547 2054 6d2f 6961 2e6e 7363 0073 4547 GET /main.css.GE 803b564: 2054 722f 746f 6b65 702e 676e 4700 5445 T /rotek.png.GET 803b574: 2f20 6166 6976 6f63 2e6e 6369 006f 4547 /favicon.ico.GE 803b584: 2054 722f 6c6f 2e65 736a 5000 534f 2054 T /role.js.POST 803b594: 6c2f 676f 6e69 632e 6967 2f00 6f6c 6967 /login.cgi./logi 803b5a4: 2e6e 7468 6c6d 5400 6f6f 6c20 6e6f 2067 n.html.Too long 803b5b4: 4f50 5453 7220 7165 6575 7473 0d21 000a POST request!... 803b5c4: 4547 2054 6d2f 6961 2e6e 736a 4700 5445 GET /main.js.GET 803b5d4: 2f20 6573 7474 6e69 7367 682e 6d74 006c /settings.html. 803b5e4: 4547 2054 692f 666e 2e6f 7468 6c6d 4700 GET /info.html.G 803b5f4: 5445 2f20 6567 4a74 6f73 2e6e 6763 0069 ET /getJson.cgi. 803b604: 4547 2054 732f 7465 6974 676e 2e73 6763 GET /settings.cg 803b614: 0069 4f50 5453 2f20 6573 7474 6e69 7367 i.POST /settings 803b624: 632e 6967 4800 5454 2f50 2e31 2031 3032 .cgi.HTTP/1.1 20 803b634: 2030 4b4f 0a0d 3c00 4421 434f 5954 4550 0 OK........GET /info. 803b6b4: 6763 0069 4f50 5453 2f20 6162 5f74 6574 cgi.POST /bat_te 803b6c4: 7473 632e 6967 5000 534f 2054 752f 7370 st.cgi.POST /ups 803b6d4: 705f 776f 7265 632e 6967 4700 5445 2f20 _power.cgi.GET / 803b6e4: 6572 6573 2e74 6763 0069 4547 2054 722f reset.cgi.GET /r 803b6f4: 6265 6f6f 2e74 6763 0069 4547 2054 632f eboot.cgi.GET /c 803b704: 6e6f 6966 6d72 632e 6967 2f00 6e69 6564 onfirm.cgi./inde 803b714: 2e78 7468 6c6d 5000 534f 2054 662f 5f77 x.html.POST /fw_ 803b724: 7075 6164 6574 632e 6967 5000 534f 2054 update.cgi.POST 803b734: 632f 6168 676e 7065 6477 632e 6967 4700 /changepwd.cgi.G 803b744: 5445 2f20 6573 5074 6f72 6164 6574 632e ET /setProdate.c 803b754: 6967 2f00 gi. 0803b757 : 803b757: 692f 646e 7865 682e 6d74 006c 5448 5054 /index.html.HTTP 803b767: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803b777: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803b787: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803b797: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803b7a7: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803b7b7: 6e65 2d74 654c 676e 6874 203a 3031 3937 ent-Length: 1079 803b7c7: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803b7d7: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803b7e7: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 803b7f7: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803b807: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 803b817: 0a04 56bd 6f5d 44e3 fd14 832b 6979 baa5 ...V]o.D..+.yi.. 803b827: fba1 2084 54b6 8bba 4fb4 10ac f620 9a29 ... .T...O.. .). 803b837: 93d8 1678 ed7f 9278 6fb4 60fd 5161 8291 ..x...x..o.`aQ.. 803b847: a010 e17d 17f3 8174 9a40 dda6 30bf 47fe ..}...t.@....0.G 803b857: 3b9c bb8e 3521 5961 7d89 93b0 e7b1 7bde .;..!5aY.}.....{ 803b867: b9ee 5ee7 fb4f dbb5 edef 707d deff 161d ...^O.....}p.... 803b877: 24e9 dbf6 6774 4f31 9efb 60e3 7825 b7e8 .$..tg1O...`%x.. 803b887: a113 0b39 ae22 a10a 673d 7ba0 9bee 6778 ..9."...=g.{..xg 803b897: 469f e75a 78ae 9038 cf43 d8f9 70fd ddd7 .FZ..x8.C....p.. 803b8a7: 92cb 6b9c 8dd9 c385 2c82 22d5 c985 3bdd ...k.....,."...; 803b8b7: 089e a2fb 4a36 2279 673c c528 cf28 5e94 ....6Jy"...Vc...nN.. 803bba7: fc2b 9a94 7ece 5783 0387 a0e5 2265 b13a +....~.W....e":. 803bbb7: d9e8 b581 273a 07fe 4045 3f09 e923 d047 ....:'..E@.?#.G. 803bbc7: ea2c c20e 0c41 d78d c599 8f58 f0d7 5655 ,...A.....X...UV 803bbd7: 1bfe ccb4 0011 3580 2140 9e45 8913 7e76 .......5@!E...v~ 803bbe7: f435 284f d677 fd55 7027 817f 76cb e564 5.O(w.U.'p...vd. 803bbf7: 3169 d8a8 834e 9537 acbd 5bb7 de8d 356e i1..N.7....[..n5 803bc07: 6b61 e3aa cba2 d3ab 0bd2 b81c 79ec efed ak...........y.. 803bc17: ae07 56b5 c87e 7f35 c717 bba7 c6e9 56e6 ...V~.5........V 803bc27: 15ce 8a4f 05f7 7c86 6d11 be6c ae8d 67b1 ..O....|.ml....g 803bc37: b43c 3d8f fefc 4905 2b6e 0ce6 000b 2f00 <..=...In+..... 0803bc46 : 803bc46: 732f 7465 6974 676e 2e73 7468 6c6d 0000 /settings.html.. 803bc56: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803bc66: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803bc76: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803bc86: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803bc96: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803bca6: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803bcb6: 3434 3738 0a0d 6f43 6e6e 6365 6974 6e6f 4487..Connection 803bcc6: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803bcd6: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803bce6: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803bcf6: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 803bd06: 0000 0000 0a04 5bdd 736b d51b fe19 cb2b .......[ks....+. 803bd16: 3286 d8f2 2d92 205f 2c71 da75 6524 5332 .2...-_ q,u.$e2S 803bd26: 8788 0538 793e d2d6 5ada ed22 d58a 4eca ..8.>y...Z"....N 803bd36: c99a 2e4c d2d0 8521 8424 50c2 0848 7ebd ..L...!.$..PH..~ 803bd46: 35a1 e6e4 f95c ab0b d47f 79e7 d9cf a49b .5..\......y.... 803bd56: e595 7ce0 87e9 bb38 3dab 7de7 7bce df7f ...|..8..=.}.{.. 803bd66: 7673 a5e9 27a3 ac8e bbbc cc7c 0468 66ad sv...'....|.h..f 803bd76: 8975 8d7f e5a6 546e 134c b677 af55 b52e u.....nTL.w.U... 803bd86: c0ec 6a32 cb0d d8ef c541 06ec c5eb f883 ..2j....A....... 803bd96: 9e4d 8236 5da0 dfb4 3aef 159b 9df3 a9e2 M.6..]...:...... 803bda6: 155f 788f b6ad 3815 4d6b 34db 9e6a d81b _..x...8kM.4j... 803bdb6: 862e 3f1c b156 1beb 3476 b5c8 765a dcc5 ...?V...v4..Zv.. 803bdc6: ec74 b6ad 07e7 f7a9 9cb6 d07a d4a8 4ded t.........z....M 803bdd6: 66a7 e517 ca66 9d71 b1c0 c59a cd4e da6a .f..f.q.....N.j. 803bde6: f295 cb54 e33a bab4 f8ad dbbe 7db1 b1b9 ..T.:........}.. 803bdf6: b240 0332 8112 3413 6aed 4df8 ddb8 d8bb @.2....4.j.M.... 803be06: d4bb 10bb 0b3e 861f c28f a59d f569 52cb ....>.......i..R 803be16: 71d3 1b4f df0d af5e 2d98 71cb b54b c74e .qO...^..-.qK.N. 803be26: 7c34 59bb 3b31 d9c1 dda6 d869 8076 3a79 4|.Y1;....i.v.y: 803be36: df35 0769 7046 0db6 81b0 267d 7e98 dacf 5.i.Fp....}&.~.. 803be46: d4b4 d353 f8e8 8ab5 7be9 bb4d 5ef4 2f07 ..S......{M..^./ 803be56: ab4f b8e7 2c50 f35b 67ea 4bab 6775 70d3 O...P,[..g.Kug.p 803be66: 15ea e6b3 dd75 b8a0 5be5 bc6d 799a f758 ....u....[m..yX. 803be76: 5cb6 6b3c c357 80af a9f3 fbc6 7c38 de1c .\.. 803bf06: 1aee 8fe1 bca4 7143 e5e0 bd27 06cb 8516 ......Cq..'..... 803bf16: 16d7 4205 6ec7 b5da 50c0 d14a 36f4 771c ...B.n...PJ..6.w 803bf26: d795 5aa6 0648 29d1 1b08 d2ea c004 498a ...ZH..).......I 803bf36: 456c 18aa 00a4 5e30 289b 4d8d d9ab bc85 lE....0^.(.M.... 803bf46: 6acc bd78 71f7 83f8 66f0 7487 f009 a819 .jx..q...f.t.... 803bf56: 015e 9f07 3f85 2c02 00c1 d2c5 1ab4 3fda ^....?.,.......? 803bf66: 3505 accb 6ff2 1bde bd56 40e5 f27a f25f .5...o..V..@z._. 803bf76: b4ce 505a 6975 57cd 1cff ddb7 640d 5e35 ..ZPui.W.....d5^ 803bf86: deb3 aade 5a9b daa7 9f11 ae87 68c8 ad37 .....Z.......h7. 803bf96: dd9a 10c0 afdb e198 4a77 bd72 853f e13b ........wJr.?.;. 803bfa6: 34c3 afb3 0cc4 de11 3341 df9d 0183 33b3 .4......A3.....3 803bfb6: 9710 a675 bb69 301b b329 aafc 39a9 0c4c ..u.i..0)....9L. 803bfc6: 0c20 0d8e 73e2 9161 89cf 1bef 1532 ff1c ....sa.....2... 803bfd6: d859 7f48 3634 6edf 16db 865c cab2 713d Y.H.46.n..\...=q 803bfe6: 96f0 bc20 3e14 9683 2342 577a a5a8 07fb .. ..>..B#zW.... 803bff6: 2dfa ac85 ad9f e80a 375a 3c08 ab57 d374 .-......Z7.. 803c056: eccc a3ed 8985 97a9 59ca 3f82 5f81 30db .........Y.?._.0 803c066: e118 d419 9a66 1786 8e79 7fc4 c268 b5ae ....f...y...h... 803c076: 66b9 d0f9 fe35 ac57 ebdb b756 e349 db96 .f..5.W...V.I... 803c086: e775 5d8c 062f e45e 3306 8a63 9cf4 3934 u..]/.^..3c...49 803c096: c87a 92ea 5da5 e3b4 edd6 2533 a586 7178 z....]....3%..xq 803c0a6: 7450 408f 2cac 688a 01c4 e7c5 ed96 8b76 Pt.@.,.h......v. 803c0b6: 1c0e 7e84 dbb5 988c 3403 2211 aa5c 79b7 ...~.....4."\..y 803c0c6: 4551 1868 b84a de1a e712 4db6 d3ee f747 QEh.J......M..G. 803c0d6: 563e f9d4 7a7e 020c e064 1bb8 2c9d 3a5e >V..~z..d....,^: 803c0e6: 4dd0 bf44 3161 6b89 9fe8 71c5 3dd7 4335 .MD.a1.k...q.=5C 803c0f6: fc35 4112 03e1 d9d1 8027 07f0 0148 6b0e 5..A....'...H..k 803c106: a0d8 d386 3c09 6cff ee34 bd2f 90cb 1c1b .....<.l4./..... 803c116: f873 7938 ba7f 088b 203f c632 36a5 ab1d s.8y....? 2..6.. 803c126: 550a b312 8bc1 7946 6028 5e3c 2b02 2ef9 .U....Fy(`<^.+.. 803c136: d2d4 23a9 7bd8 716e 3bcd 3643 7e73 1989 ...#.{nq.;C6s~.. 803c146: 99fc d017 28a5 c47c a9bc 386d 2849 3e59 .....(|...m8I(Y> 803c156: 7271 2305 a0a3 5818 786b a30f 6ab4 7ba8 qr.#...Xkx...j.{ 803c166: 82f5 4dd0 439e f462 6962 1ff6 b8e8 76ad ...M.Cb.bi.....v 803c176: 0462 ef8a d62b 599a f93d 1be6 09cb 321f b...+..Y=......2 803c186: 1c63 ebd7 9a22 b785 b1c1 e10f 115d 1e29 c...".......].). 803c196: 2fc1 1620 7983 208f 1ced 1f59 ed70 8b60 ./ ..y. ..Y.p.`. 803c1a6: a8e3 f012 f4ce 127e 1865 7706 94d5 8803 ......~.e..w.... 803c1b6: 4c2b f473 1704 c0c4 e62e f440 7aad c1d7 +Ls.......@..z.. 803c1c6: c362 a0ab 3da2 1318 5181 70fa 0dc0 0ac0 b....=...Q.p.... 803c1d6: 4186 0d66 d24f d36a 06a7 5594 7196 3ae0 .Af.O.j....U.q.: 803c1e6: 05f2 445b 89b7 c07c ea65 1146 ee69 c7f3 ..[D..|.e.F.i... 803c1f6: d8a6 942b 623d 9c6e 6449 625e 6422 1074 ..+.=bn.Id^b"dt. 803c206: 19e0 379c af7c 67db 35fb 69af 3930 2d59 ...7|..g.5.i09Y- 803c216: 7aaf abeb 14b3 b5a8 3766 280d d30f d733 .z......f7.(..3. 803c226: 2782 be3c eb1c c0c3 c2eb 727e f98f 1952 .'<.......~r..R. 803c236: c4b6 19d1 03b0 3243 937e 5d89 3b3c 3635 ......C2~..]<;56 803c246: 294e c544 0853 8254 3c92 2c88 1869 d9de N)D.S.T..<.,i... 803c256: ca78 ea01 c019 2fb3 300e f420 2621 9573 x....../.0 .!&s. 803c266: 0ff1 3c83 2637 b9e4 0717 1019 20fa 8dcf ...<7&....... .. 803c276: 3c84 263f f9e4 0717 1019 20fa 8fcf bc84 .2&...o.G.be.. 803c2f6: 20b1 c1bc 11aa 1841 0c21 ef71 8aa9 bab0 . ....A.!.q..... 803c306: 64ac 6e5c a3cc 67de 1fe5 214d 5837 a053 .d\n...g..M!7XS. 803c316: f0ca 2500 d058 8b88 156b d1d0 6808 c7a8 ...%X...k....h.. 803c326: 1037 1f19 594a f48a bc36 7ea7 e698 bc20 7...JY..6..~.. . 803c336: ad22 408f f215 4f32 8abd 12f8 1fa0 7fc2 "..@..2O........ 803c346: aa99 eeb5 6320 1861 0b95 ff1d c132 bfa4 .... ca.....2... 803c356: 2cb8 3233 cf23 6c78 c320 16bb 4ade c7ca .,32#.xl ....J.. 803c366: 1d6c 9f0b d4cd 58c5 8e41 bc96 9713 0298 l......XA....... 803c376: 0347 4856 85a7 9103 4fa3 3689 6e66 681c G.VH.....O.6fn.h 803c386: 3147 5bfe 0670 083d 4e74 a662 ac7f f9aa G1.[p.=.tNb..... 803c396: 607d 97fb f2c2 e867 3c5c db05 3d1f db37 }`....g.\<...=7. 803c3a6: 4f7d 5db3 c62e fb65 d057 7626 7604 73a4 }O.]..e.W.&v.v.s 803c3b6: ed02 1e42 8e85 4b05 661c 926e 0f60 08ef ..B....K.fn.`... 803c3c6: 1840 e148 41d9 de79 1019 44cf 279c ad8f @.H..Ay....D.'.. 803c3d6: 948c d6a6 a437 4307 cdf5 10f7 a9dd 726f ....7..C......or 803c3e6: fff1 f0b4 6d69 5970 1e35 cde6 fb24 994e ....impY5...$.N. 803c3f6: 733d 5dd2 d99c 89ae 7efa b4b9 d9b4 bcb1 =s.].....~...... 803c406: 7546 6684 4ea8 2374 a6e7 6922 9335 4a8d Fu.f.Nt#.."i5..J 803c416: ce31 4a5a e887 a37a d6d6 459e 50ae 4bbc 1.ZJ..z....E.P.K 803c426: 0ea5 834f 93fb 1581 85d8 b409 5002 b29f ..O..........P.. 803c436: 75b7 2a19 5aad c71b 8b97 e8d0 e2bb 2f38 .u.*.Z........8/ 803c446: 728a 6eb3 f940 b6ca a257 68f9 ea8a 4334 .r.n@...W..h..4C 803c456: 38b1 0e15 b69d af55 28a3 dad4 c315 dc8f .8....U..(...... 803c466: 9647 4802 cdc7 ed56 b750 b9e3 ecd3 b888 G..H..V.P....... 803c476: 4d10 5993 2efe 78c9 4904 43c5 177d bab9 .M.Y...x.I.C}... 803c486: f414 ad8d 61b1 047f 7dae 52c2 df6a 12c1 .....a...}.Rj... 803c496: 0284 ab8a 2021 565b 74e7 cc3e 6bf0 4a48 ....! [V.t>..kHJ 803c4a6: 937c 5bea c5de 430d 2260 fdb0 aa62 a1c2 |..[...C`"..b... 803c4b6: ca90 8475 6d35 ea74 249a 58a5 a5d4 a46b ..u.5mt..$.X..k. 803c4c6: e31b 12a5 d0ac 2aa2 3317 c90d f63b 2b56 .......*.3..;.V+ 803c4d6: 36b2 1518 aec2 b3c2 d7b3 7e8d db33 d4bc .6.........~3... 803c4e6: 007f e1d0 07ec 0431 fbfa e47b f329 d508 ......1...{.)... 803c4f6: d3a3 c59d 61a8 b5a7 6a3f e9a7 967e c469 .....a..?j..~.i. 803c506: b45d 2b35 b158 413b dce1 d77a 2dad f2be ].5+X.;A..z..-.. 803c516: d77e 0e0b 11a3 56d3 e757 9c61 dae8 f1b1 ~......VW.a..... 803c526: adbd 8dba 370c 6e06 a9ef 4b87 8ad3 ba12 .....7.n...K.... 803c536: fb79 bf47 74ee 5bb8 61b3 40a7 017c 3f00 y.G..t.[.a.@|..? 803c546: 4ad1 47c3 f229 c46c 333f 85c0 f0ed ba01 .J.G).l.?3...... 803c556: 9f5a 16e2 f096 2002 4e05 a34b e299 e2e5 Z...... .NK..... 803c566: 05cb 2d85 ef00 9356 271f d24a 14ea 0db6 ...-..V..'J..... 803c576: 1c47 4ba3 2217 ec23 6e28 a47f 5d57 2380 G..K."#.(n..W].# 803c586: 09dc 4e9f abec ebd1 6d26 db39 4778 9ddf ...N....&m9.xG.. 803c596: 1326 33af 0576 4989 f50d bbb0 f769 ed90 &..3v..I....i... 803c5a6: e7a2 6350 5342 6511 3555 c3de 1be1 313a ..PcBS.eU5....:1 803c5b6: f7d7 a6a8 1f9c 79db df45 f35e 763c 6ea3 .......yE.^..4...&..o.|.s8 803c706: 3ded d7d3 2791 6d95 489c c6bd b4ca 36ff .=...'.m.H.....6 803c716: 6f90 ad32 46e3 1196 18ee 41d8 0d92 2421 .o2..F.....A..!$ 803c726: 08be 838f 50e1 eded 2dec a715 5274 dc56 .....P...-..tRV. 803c736: 6a0d 0c23 5fe2 d952 08f0 0e06 88e6 477b .j#.._R.......{G 803c746: 8e72 2f9d c1ed 9ed2 dfb5 a298 9bae b636 r../..........6. 803c756: 874c 174d 425b 769b 8bc1 aefe b15b 5b3c L.M.[B.v....[.<[ 803c766: 11c2 c2a1 6feb 18ac 5eb8 999c 3099 efc2 .....o...^...0.. 803c776: 0ba5 0dc5 5624 8fc8 0ca6 1328 415a d9e0 ....$V....(.ZA.. 803c786: fc7d 4dd5 a4b0 935b cfed cb15 d4e5 658c }..M..[........e 803c796: a335 fc24 32e0 68d6 90a0 41db 7e1d f7b9 5.$..2.h...A.~.. 803c7a6: f0e7 a621 8dbe 9f29 07e0 3c64 7bc3 c54c ..!...)...d<.{L. 803c7b6: 4cf2 c26a 3519 67e1 4518 0f48 b029 719c .Lj..5.g.EH.)..q 803c7c6: 9287 8761 a8d4 52ab 48f6 9911 ea3b 3260 ..a....R.H..;.`2 803c7d6: a0ea f51a da1d 3c03 03b6 4056 5045 b0b5 .......<..V@EP.. 803c7e6: c064 f21d ad28 e839 1596 90b0 877f 4557 d...(.9.......WE 803c7f6: be9f 4be2 07f8 431d 9d42 ee83 84b5 6bce ...K...CB......k 803c806: 9ad1 1ca4 d9fb bf33 cc9a aafc f99a 549f ......3........T 803c816: ee6d 03d2 cf14 30fb 1c1f 3d0b f3e4 d435 m......0...=..5. 803c826: 9b80 58c0 ee71 165a 8a12 8a0b 75e2 2504 ...Xq.Z......u.% 803c836: 78d6 a5aa 3e39 6bb5 7640 a307 1d50 f682 .x..9>.k@v..P... 803c846: 415f 0d17 5c9a f3ba dd09 4579 2af7 3e46 _A...\....yE.*F> 803c856: 1916 9ba5 033a d3f4 1212 56f5 d43b bbc8 ....:......V;... 803c866: 177b ee85 5176 14c2 308c 7c47 2573 3f04 {...vQ...0G|s%.? 803c876: 3665 8b73 b473 6f9a 577a 7e90 807c e429 e6s.s..ozW.~|.). 803c886: 9934 b74e 8eef 2198 bc36 0539 9afe e808 4.N....!6.9..... 803c896: 1601 98fd 574d b900 6626 7102 2ef5 b116 ....MW..&f.q.... 803c8a6: fdd5 8e90 104a 80de 5229 605b e492 4915 ....J...)R[`...I 803c8b6: 12e6 594a 36b8 dbf0 079c 5163 51f1 3017 ..JY.6....cQ.Q.0 803c8c6: 0e75 20db dc8a d369 ae66 cf99 6483 45c8 u.. ..i.f....d.E 803c8d6: 1e68 6652 0e88 1680 1b5d 99e5 37b9 2fc2 h.Rf....]....7./ 803c8e6: 8200 84de 08ea d04a deb5 18c7 2b9c d8ef ......J......+.. 803c8f6: 800f 52db 8b0b c18d d8d2 fead 8c5c 19f1 ...R........\... 803c906: dd0f 0489 5e71 2b01 5fc4 e3b9 3b51 8ccc ....q^.+._..Q;.. 803c916: 485a 813d e802 d17b 0016 a5ce ac9a 5273 ZH=...{.......sR 803c926: 337b 09c8 e692 3c84 772e 0405 7b58 38e2 {3.....<.w..X{.8 803c936: 4822 01de 3b91 c2bc 7453 a4ac 08e1 8777 "H...;..St....w. 803c946: 753b 6660 bc27 c79f 44d1 934e 4e5a 915f ;u`f'....DN.ZN_. 803c956: e18d 428f 8e80 f297 3fe2 769c d4e4 fe78 ...B.....?.v..x. 803c966: e81f 6681 d5c0 07de 4c78 cd43 ca5d 6c5c ...f....xLC.].\l 803c976: 932f e55a a6be 304c c944 be87 29f8 784f /.Z...L0D....)Ox 803c986: fb50 fde9 0599 c4e3 fe25 01de 6bb1 36b2 P.......%....k.6 803c996: 3578 fd21 ef7d 3142 96fc 1a8a 2ae6 6279 x5!.}.B1.....*yb 803c9a6: 2025 5628 53c2 e07b 660f a904 4e3c 7624 % (V.S{..f.....AM@ 803c9e6: 3b42 a0e4 0e29 0d0a ff37 e1c4 6a4d f787 B;..)...7...Mj.. 803c9f6: f939 39ae 1146 5c25 dec3 100e c830 bb11 9..9F.%\....0... 803ca06: 1de2 9008 ac03 051f 76e5 23ef 178c 9d27 .........v.#..'. 803ca16: 324f b946 50a0 57d2 c13e d894 c293 c424 O2F..P.W>.....$. 803ca26: df4c 858e d3c3 ff2b 2919 f2a0 e26a c8a0 L.....+..)..j... 803ca36: 5a43 2e5d 1637 af4a 08a5 2fcd d6c0 9688 CZ].7.J..../.... 803ca46: ecc7 1ca8 dc08 0879 b893 a933 0ee3 2de2 ......y...3....- 803ca56: 3187 02d1 0a42 0d0f f0c8 a09e fe45 f1af .1..B.......E... 803ca66: bae7 2498 4e44 10ea 0d49 8da4 fc31 2f32 ...$DN..I...1.2/ 803ca76: 87f9 23dc 926b 99e9 509d a80a f286 206d ...#k....P....m 803ca86: ef89 3a93 43be 31d5 420c 24c3 58d2 9510 ...:.C.1.B.$.X.. 803ca96: adba 0d2c b253 7849 bf01 067d b0a2 f90e ..,.S.Ix..}..... 803caa6: 277b 098f d249 a931 8e93 6aff c091 30cc {'..I.1....j...0 803cab6: 77c9 8e44 9fa9 9ae1 2655 b13a bab8 1d09 .wD.....U&:..... 803cac6: ec11 14f2 7924 1734 921a 9acb 7143 01f8 ....$y4.....Cq.. 803cad6: d119 abd9 76f0 ec14 2636 8987 2262 1bf0 .....v..6&..b".. 803cae6: 7053 371f d0d7 a952 64d5 a759 d756 1265 Sp.7..R..dY.V.e. 803caf6: 0706 a3e4 882a f20b 486c 9f17 fecb da84 ....*...lH...... 803cb06: 10e4 24ef eb21 2c33 ca09 c79e 549f 3876 ...$!.3,.....Tv8 803cb16: d659 94fe 7a6a ff07 5b00 7084 3c1b ca52 Y...jz...[.p.es 803cc86: 3e16 f7bf 0321 2c08 e939 c0b1 ee31 88d5 .>..!..,9...1... 803cc96: d976 4e80 34a3 6c0d 49b3 96e3 7ec7 55d4 v..N.4.l.I...~.U 803cca6: 97ac 46e9 fa4e 6dba 27c8 1546 3e53 5a6e ...FN..m.'F.S>nZ 803ccb6: cf2c fccc 6302 d9c6 6bf9 4efb f2cb 8ecf ,....c...k.N.... 803ccc6: c838 beaf f800 8e0d 76b0 29d4 ec7e 80b6 8........v.)~... 803ccd6: ac27 9929 cbaa 80b9 75b8 e63f 4e3e 87ff '.)......u?.>N.. 803cce6: f408 6ab3 073f 55ae c73a 903f 6ced e8df ...j?..U:.?..l.. 803ccf6: 434d 55f5 3b11 5533 5bdd 569a 9307 f8c6 MC.U.;3U.[.V.... 803cd06: 4a9c c6be 7eca 354e 5472 e8f5 6fbb beae .J...~N5rT...o.. 803cd16: ec7d a5d7 9c15 2f1a 5101 5db7 e738 17d4 }....../.Q.]8... 803cd26: b44d e4c9 f914 be14 39de 79e2 1da7 b3bb M........9.y.... 803cd36: d2f8 f9cc c389 fc9b 2134 1472 e3bf 42a7 ........4!r....B 803cd46: f187 1ca2 7fd9 d8fd d80a 72f6 d641 f7a7 ...........rA... 803cd56: 2693 b04a f959 825a bbbb c23c 985c 8738 .&J.Y.Z...<.\.8. 803cd66: 0a2f 1dd6 55bf 5530 04fa b2e6 c477 1ff2 /....U0U....w... 803cd76: 35cd 97c9 f7a4 a0c0 350e 57e5 f85c 89fc .5.......5.W\... 803cd86: bb09 3d84 7684 b124 e712 2075 0446 2d97 ...=.v$...u F..- 803cd96: 5faa 139a bcaf 6852 567a 9dfd 7e37 d47b ._....RhzV..7~{. 803cda6: 15ab f5cc 55ad a405 23c4 53f3 2026 139a .....U...#.S& .. 803cdb6: e253 963c a9f9 c4c6 e279 ef4d 0ddf cc05 S.<.....y.M..... 803cdc6: 9277 d00f 6026 f8d7 adca 9d04 bb85 5b3d w...&`........=[ 803cdd6: d731 5e9a b4ed cc99 1cb4 967d f394 22a6 1..^......}...." 803cde6: f03a 4b11 e92e 2fc1 f4b8 2f2e d2be 5522 :..K.../.../.."U 803cdf6: 51fd f654 fea1 6912 43d8 09fd f650 51a7 .QT....i.C..P..Q 803ce06: 740b 9c3d 1a0c 7d67 a2f2 2f2c f1d1 cba1 .t=...g}..,/.... 803ce16: b48a c0c1 9be9 5b73 42f8 dbc5 812a f28b ......s[.B..*... 803ce26: 4429 7d49 0859 97e7 14fe 7ce4 52b9 b0d9 )DI}Y......|.R.. 803ce36: 2383 1faf e02f 1bc3 26fc 8522 71c0 02b9 .#../....&"..q.. 803ce46: 882f 104f f60a d954 539e 4d32 99ed 050e /.O...T..S2M.... 803ce56: 3d40 47c6 6a5e 50a7 3aa6 109c a9b0 e347 @=.G^j.P.:....G. 803ce66: 9d0b 21aa 219f c8e6 4a7b cb78 0a37 cd2f ...!.!..{Jx.7./. 803ce76: e740 a70e 763f 37e4 ffa3 1103 a13e 43e5 @...?v.7....>..C 803ce86: 003a 2f00 :.. 0803ce89 : 803ce89: 722f 6c6f 2e65 736a 0000 0000 5448 5054 /role.js....HTTP 803ce99: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803cea9: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803ceb9: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803cec9: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803ced9: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803cee9: 6e65 2d74 654c 676e 6874 203a 3132 3035 ent-Length: 2150 803cef9: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 803cf09: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 803cf19: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 803cf29: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 803cf39: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803cf49: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 803cf59: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803cf69: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 803cf79: 0008 0000 0000 0a04 58b5 6eef c8db 7f11 .........X.n.... 803cf89: 6615 90ef 2370 479a aee5 2229 1186 2762 .f..p#.G..)"..b' 803cf99: e4bd 2710 a241 af43 0208 b963 b4bb 5318 ...'A.C...c....S 803cfa9: de5c 6572 b547 1405 f407 fb53 0fa9 bed0 \.reG.....S..... 803cfb9: 5142 01dc d0fd 19f6 37e4 6fea a497 c944 BQ.......7.o..D. 803cfc9: 1271 2814 0710 eed2 eccc fdfc 8ccd 79b2 q..(...........y 803cfd9: 4dc9 4aae 4bef d19f 2d73 5ccd 9e97 7c50 .M.J.K..s-.\..P| 803cfe9: 933e 09a5 a58f 5c79 fb48 7f71 54f1 6280 >.....y\H.q..T.b 803cff9: 7599 bcf4 fc50 2f24 6373 78f9 9921 5a7e .u..P.$/sc.x!.~Z 803d009: a91a 594f 9be1 267c dcd5 80d0 6bcf 66a3 ..OY..|&.....k.f 803d019: 9607 5412 7b41 d49e acd2 7b69 c124 7e50 ...TA{....i{$.P~ 803d029: 7bdd 50a0 2fc7 c6e6 2b5f 2855 7e26 7c38 .{.P./.._+U(&~8| 803d039: 48f6 9f71 0ee0 840f 38fc 931f 21c1 d333 .Hq......8...!3. 803d049: b350 a852 4f99 f203 e3ed 0909 353a 2ec1 P.R..O......:5.. 803d059: 2164 3c8d ea50 9724 d13e 90aa 0684 87db d!........ 803d069: c0b9 59d1 090e 2167 6594 21d6 54e1 2ccb ...Y..g!.e.!.T., 803d079: 5f21 a9e1 5f1c accc 4b20 dc1a 6e18 d03c !_..._.. K...n<. 803d089: 8853 6905 03c0 cf41 994f 64f6 932c 1856 S..i..A.O..d,.V. 803d099: 7df4 4c62 4af5 38fe b597 9719 ccf2 3edb .}bL.J.8.......> 803d0a9: d91a 96a3 21f8 7102 7f2a 9178 93be f8dc .....!.q*.x..... 803d0b9: 30e4 5ae7 2ad5 a133 9965 5e4c 4742 aa19 .0.Z.*3.e.L^BG.. 803d0c9: 964a 1a7e e0b0 6446 c2bf ad95 27f0 0992 J.~...Fd.....'.. 803d0d9: 7da9 a072 8610 ecd2 164d 2495 6101 5555 .}r.....M..$.aUU 803d0e9: 8de4 5f45 abbd 4955 6c68 cc75 8862 352a ..E_..UIhlu.b.*5 803d0f9: 1678 61b5 f246 2b29 658f 73d2 37db 2249 x..aF.)+.e.s.7I" 803d109: 4743 daf0 dc12 e9bc 3867 c4b0 3af3 13b8 CG......g8...:.. 803d119: 4945 8d92 eafd 3c4c 0fad d694 d8d0 d791 EI....L<........ 803d129: 2a95 396b ef91 404d 613a 4924 940c 9951 .*k9..M@:a$I..Q. 803d139: 6fc7 e4de d5a1 e168 4a4b 1c47 08b4 5c07 .o....h.KJG....\ 803d149: ec7e c793 2b5a 284d 3a5d 4aab 8be1 2e5e ~...Z+M(]:.J..^. 803d159: 2130 2b5e 52ed 532d b7da a416 07c9 b4b2 0!^+.R-S........ 803d169: 5fde 141c aeac b39f 6219 835d a585 de2e ._.......b]..... 803d179: 893c 7e62 0d3f 590b 9b1e cc69 0307 be9a <.b~?..Y..i..... 803d189: 6fe1 0843 7c7e 770a cb3d 786b facd c38f .oC.~|.w=.kx.... 803d199: 275d 095b bcd4 a666 6d79 e1eb 31a1 4f3a ]'[...f.ym...1:O 803d1a9: a6e7 8f95 f0a0 03e4 2277 3eb7 1e41 e1c1 ........w".>A... 803d1b9: 59f5 f86e d5d4 ab09 6125 d305 9ab3 ac8c .Yn.....%a...... 803d1c9: 915c f26c d58d b0d3 b446 fb10 082f 337d \.l.....F.../.}3 803d1d9: 1b7c e7db b11c 6c2f d182 4538 4e40 6e62 |...../l..8E@Nbn 803d1e9: 08a5 c8bd 6acb 206e 6408 f48f a9e2 86fb .....jn .d...... 803d1f9: d8dc d3a6 60b2 4379 caf4 747d cb14 9261 .....`yC..}t..a. 803d209: b1f0 1bd3 d429 69b3 77a3 f640 8486 3e8e ....)..i.w@....> 803d219: 0341 6592 502f a550 34ad 82a0 5c73 e3c0 A..e/PP..4..s\.. 803d229: a85e 2bb8 b843 ed2c 8d4c 783d 0ba8 40aa ^..+C.,.L.=x...@ 803d239: c498 de7d 4985 4c20 494d fc25 788d b1db ..}..I LMI%..x.. 803d249: e024 33c8 be5f de89 0926 2da3 cd68 594b $..3_...&..-h.KY 803d259: 5673 9c49 df0f 65d2 4a73 a6c8 615e a768 sVI....esJ..^ah. 803d269: f39b 93a6 122c 2036 1909 bcb4 93a9 1fcc ....,.6 ........ 803d279: dd44 b6bb 1f3e ff21 2f51 9fe0 d900 697c D...>.!.Q/....|i 803d289: c0d3 a27d af83 46ef 6dd1 db7e 5722 1220 ..}....F.m~."W . 803d299: 2031 27b1 57df 7d88 656d 4686 7b7d 7938 1 .'.W.}me.F}{8y 803d2a9: 848d 8f29 ba7d 275c e36c 4485 746c c2db ..).}.\'l..Dlt.. 803d2b9: b823 976e 2ad4 11b9 993d 03ce 1a2f df7a #.n..*..=.../.z. 803d2c9: d2b1 de1b 75fb 45e4 c8d1 1bfe 787a ee2e .....u.E....zx.. 803d2d9: 0c99 bf45 fd7b b9e2 f0ef 31a9 c449 ffe2 ..E.{......1I... 803d2e9: 4e84 580e 4264 ca80 7928 45d6 242b ac34 .N.XdB..(y.E+$4. 803d2f9: e554 31d3 188c 1193 bffe 6249 20d1 8359 T..1......Ib. Y. 803d309: 72d6 8e40 2fe0 73bf dd36 d878 1ce1 3f88 .r@../.s6.x....? 803d319: 558a d136 2058 6063 d896 2cc6 8386 663e .U6.X c`...,..>f 803d329: b1b1 132f 92eb 62b0 96ba 25be 60df 0d16 ../....b...%.`.. 803d339: 06d2 5098 00ab b022 004a 2f51 f9bd f254 ...P..".J.Q/..T. 803d349: e793 e4ca 02d9 859d 3d18 3097 9375 a4f4 .........=.0u... 803d359: 0694 6269 ef10 a8fa 54c1 96b4 83b1 a3bc ..ib.....T...... 803d369: 22ee 5d74 8e93 4e76 50d1 10a1 d81a a955 ."t]..vN.P....U. 803d379: 5695 5e59 8730 3d27 42b1 e69e 1e5c 6ff5 .VY^0.'=.B..\..o 803d389: d93b ba1f c8fa a503 e294 7008 e59c 067a ;..........p..z. 803d399: 3b7d 8f4d c0e6 b46a eedd 93aa ed7e fb7d };M...j.....~.}. 803d3a9: 26c4 e1af 979a b34c cd99 7a40 02de 3e21 .&....L...@z..!> 803d3b9: 0859 a2f3 5b51 ada4 36c5 ca67 e559 cdf0 Y...Q[...6g.Y... 803d3c9: 7e1b 72e0 3756 7777 deae 19c9 8bcb e6e5 .~.rV7ww........ 803d3d9: 2161 3e79 c563 ed44 25e7 0bd3 be0b 63cd a!y>c.D..%.....c 803d3e9: 7b3e 00f0 8de5 6cd2 f2eb 2f4e a9be 9e23 >{.....l..N/..#. 803d3f9: 47a8 f70d cb86 e973 a982 8605 19f4 6a78 .G....s.......xj 803d409: b05f 30a7 a6ca 4f21 20ec ba15 9144 3c62 _..0..!O. ..D.b< 803d419: 451c 8b71 fc4f fdfe a374 d31f 2d9a ef1c .Eq.O...t....-.. 803d429: ab21 74ed b8e4 a4d3 4813 1a78 0191 d00b !..t.....Hx..... 803d439: 79e5 70ff 0f68 b487 ba13 f0ab d9ae 05e9 .y.ph........... 803d449: 2647 9d77 73d8 dba9 038e eafb a37d 43b6 G&w..s......}..C 803d459: 1cf8 1840 4fb8 b2aa ab6d d24e 3a71 5f3a ..@..O..m.N.q::_ 803d469: 6406 eb26 1d9a 924b 5e97 feff c2e2 7fef .d&...K..^...... 803d479: 5b0d 84b2 bcec f231 c89e 50a2 6fde 2e95 .[....1....P.o.. 803d489: 0dc4 4bb4 1e92 5573 d7a0 427f 4b60 9096 ...K..sU...B`K.. 803d499: a22f dee8 bbbd 2d77 c1ab f160 cc59 426b /.....w-..`.Y.kB 803d4a9: 67b0 6659 e779 b8ba e4fa 08d6 4572 97f3 .gYfy.......rE.. 803d4b9: 6b18 a791 1218 b6bc bc38 5fef f33d 78a0 .k......8.._=..x 803d4c9: 24eb bf34 f15e b337 c5e5 ef45 4ec8 1796 .$4.^.7...E..N.. 803d4d9: 5b17 6453 c1d2 baef 57f3 6018 4c4b 702c .[Sd.....W.`KL,p 803d4e9: a7e9 5087 3c1a a9b4 a213 8dea 73b2 8a15 ...P.<.......s.. 803d4f9: c852 2ff7 7032 735f 7493 6ff1 9de2 e926 R../2p_s.t.o..&. 803d509: 45c5 eeb4 edb9 d2f8 464d d20f 9e98 bba3 .E......MF...... 803d519: e0da 49be 60d1 1d37 8d36 8307 6db4 7bac ...I.`7.6....m.{ 803d529: 65c3 4933 43b6 7f7d dfd6 47bc bbcf 3da7 .e3I.C}....G...= 803d539: 29b6 7f26 3d18 6360 9112 2111 c074 e936 .)&..=`c...!t.6. 803d549: fa99 a2a8 5cb6 9f98 2eda 7b60 4faf 80e9 .....\....`{.O.. 803d559: 4884 e6fc 10e8 ee13 a7d4 6183 ea73 7ec8 .H.........as..~ 803d569: 2f33 df8a 0761 31c1 d6f1 4f94 5cd4 8ed7 3/..a..1...O.\.. 803d579: b47b 3b3e 4bcc 6f0c a7bb 25af 2c02 e9ec {.>;.K.o...%.,.. 803d589: 55d2 5771 9d5f 5dfa 8a81 2640 975d 198a .UqW_..]..@&]... 803d599: e286 a375 ae86 55fd 7309 b624 549e 47bd ..u....U.s$..T.G 803d5a9: abf7 02cd ae53 18aa cdcf 2122 8243 a151 ....S....."!C.Q. 803d5b9: 8213 e37e 4cfa 5033 8e60 bdb8 1a41 b83a ..~..L3P`...A.:. 803d5c9: bf2b 2db9 66ba 7bf8 ca55 5917 f006 9a85 +..-.f.{U..Y.... 803d5d9: 0540 27b9 02b0 24f4 71ed bac8 7566 e9eb @..'...$.q..fu.. 803d5e9: 99f3 e75a e625 27e1 c393 8967 8a6b a5cb ..Z.%..'..g.k... 803d5f9: e34f 3d36 6955 42bb cc3f 9848 24ad 71bf O.6=Ui.B?.H..$.q 803d609: 967d 4837 c687 9d7c 25a6 453b f6bd 4687 }.7H..|..%;E...F 803d619: bd4c b646 c5de 97f2 9ae3 f86f f6f9 c335 L.F.......o...5. 803d629: c874 eddb 1ded 653b d735 6579 a746 172a t.....;e5.yeF.*. 803d639: 447e 1263 5470 674c 591a e5fd 4ff2 7f97 ~Dc.pTLg.Y...O.. 803d649: fd5c f567 e7b3 4193 72af b6e7 9122 849e \.g....A.r.."... 803d659: 0e5a ba55 00bd bad3 4a5d 3483 5e04 5bb6 Z.U.....]J.4.^.[ 803d669: c128 de37 1d2d 43fd 77f4 0f8c d307 10bc (.7.-..C.w...... 803d679: 223e ecc3 b3e6 483e 72e9 ec19 ce00 4d56 >"....>H.r....VM 803d689: 66e7 bfc7 be37 006c 1737 8af4 770b 205c .f..7.l.7....w\ 803d699: 7872 6630 4956 d187 c0b9 3deb 4b1d c137 rx0fVI.....=.K7. 803d6a9: d9ec c4ec 9345 299e 27e3 5ac7 a1cd 45b1 ....E..).'.Z...E 803d6b9: 86e7 85b1 b0b9 e2c5 b135 e0c3 926d e235 ........5...m.5. 803d6c9: 31ba faf0 55e8 2cd0 2d0d 41f5 a9b3 8b6e .1...U.,.-.A..n. 803d6d9: db69 15c8 396f d7a9 1d07 990b bb71 1216 i...o9......q... 803d6e9: f791 4d4d e94d 6fe1 d84f 56fd e5ef a9e5 ..MMM..oO..V.... 803d6f9: 46d4 1b0a bed3 640e 37f5 039b 3f97 fead .F.....d.7...?.. 803d709: fab1 f2e5 ab0f 579f bcff e9fc cff2 0c96 .......W........ 803d719: d6f5 8fdb 44da 66c0 5bdd 6fff c191 2f56 .....D.f.[.o..V/ 803d729: ab44 9019 c15b fc2d 7114 f02b 95e6 fa40 D...[.-..q+...@. 803d739: e856 14a1 bb89 069d 8bc8 4e2d 4ace 8b2e V.........-N.J.. 803d749: 677d 134d 6c65 5d15 eca1 7944 b36d 90f8 }gM.el.]..Dym... 803d759: 67c1 974c 4318 167b 49db 02d8 8cd1 fc69 .gL..C{..I....i. 803d769: f1a4 664c 2126 aabf 0290 c762 7f15 1b85 ..Lf&!....b..... 803d779: b5fe 65fa eff5 dfd5 e5ed e0ff c680 ef8c ...e............ 803d789: db3f d80d d7f5 a656 2c4a a150 e235 2fb4 ?.....V.J,P.5../ 803d799: 18b1 744a edad 6e4b ea4b 12b9 c6b2 b806 ..Jt..KnK....... 803d7a9: e1fe c326 1fef 4b4f 57bf 1f25 30ad aa37 ..&...OK.W%..07. 803d7b9: 94ee 8f58 8dd7 0c63 5cc3 405b de34 41d6 ..X...c..\[@4..A 803d7c9: 99cb 953a 714d 67e3 65b1 5ffc 782d e1b4 ..:.Mq.g.e._-x.. 803d7d9: 1349 0000 0000 3800 I...... 0803d7e0 : 803d7e0: e238 0803 d7f4 0803 d804 0803 04bd 0000 8............... 803d7f0: 0001 0000 .... 0803d7f4 : 803d7f4: 682f 7369 6f74 7972 682e 6d74 006c 0000 /history.html... 803d804: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803d814: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803d824: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803d834: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803d844: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803d854: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803d864: 3031 3134 0a0d 6f43 6e6e 6365 6974 6e6f 1041..Connection 803d874: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803d884: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803d894: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803d8a4: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 803d8b4: 0000 0000 0a04 568d 6ecd 46db 7e10 8615 .......V.n.F.~.. 803d8c4: 0c09 1011 0b25 14bd c895 50a0 0873 a050 ....%......Ps.P. 803d8d4: fa01 e683 ac14 11c8 f1b9 9772 5dd9 5652 ..........r..]RV 803d8e4: 02eb fa49 4393 040a 21e8 a5ed fa28 6e06 ..I..C...!..(..n 803d8f4: 0301 eb4e 19e4 6f96 59d4 a92e b5d2 fae0 ..N....o.Y...... 803d904: 7160 667f 6676 f9be c666 5b8b 7d1f fcb2 `q.fvf..f..[.}.. 803d914: e1ec 7b83 ae5e 160b ec2f c7af cf08 df22 ...{^.../.....". 803d924: 1dc7 3490 145e 89a0 e497 2a44 91d0 e95f ...4^.....D*.._. 803d934: f875 de3e a7b5 d6b9 0865 2a4f 475a 97fe u.>.....e.O*ZG.. 803d944: e7e1 861f 514b 4494 15d3 df03 044b c0d7 ....KQ.D....K... 803d954: e551 bdfe d208 7a0c 4e25 880a 9afc a6c2 Q......z%N...... 803d964: 5214 e40f 3436 79d5 4294 134d db08 98cd .R..64.y.BM..... 803d974: aa72 6129 4aa1 8308 3668 c82e 2d31 62aa r.)a.J..h6..1-.b 803d984: afb7 c814 4376 64d0 8874 3426 0cd5 f362 ....vC.dt.&4..b. 803d994: f9ba 79b6 de6a 539a b7f3 3cd7 ef33 1fcc ...yj..S...<3... 803d9a4: cbcd b9e6 3739 166f 2753 60b2 1f94 b979 ....97o.S'.`..y. 803d9b4: 7584 17e4 f284 a249 ef94 6049 af91 96f4 .u....I...I`.... 803d9c4: ca81 3401 a83e 4912 ed4b 6de9 5e89 386b ...4>..IK..m.^k8 803d9d4: d3d6 a4c7 ee26 f7d4 4c94 5f22 060a c793 ....&....L"_.... 803d9e4: 850a eea7 171c bb0e 4895 f1b7 a522 97b5 .........H.."... 803d9f4: a230 e454 5273 88af dcf4 4c27 4d61 a62a 0.T.sR....'LaM*. 803da04: edfb 1e9a 1a43 516a 4be2 7457 fb42 4822 ....C.jQ.KWtB."H 803da14: 1577 482f 3ae7 29e5 4f1c de6c 4910 8367 w./H.:.).Ol..Ig. 803da24: 4c89 5f58 fe08 33e1 6ffd 71af f7db 8a68 .LX_...3.o.q..h. 803da34: 0331 42af 498a 44ea d62b a3eb bd73 b847 1..B.I.D+...s.G. 803da44: d274 1176 6423 0d7b e6c7 7337 708a 9a9f t.v.#d{...7s.p.. 803da54: 730b 3cd6 9e6f 2f36 759d 3f2b 41d4 6906 .s.. 803dab4: caf4 9615 fde1 8930 32da 9434 4aa0 55c1 ......0..24..J.U 803dac4: c3eb 3da2 5f6a 576d fcbb f3b9 6cce 11cf ...=j_mW.....l.. 803dad4: a8b4 a71d b4b4 3ecb 6559 d18e 3efc f820 .......>Ye...> . 803dae4: 1219 df3c 6127 4691 5ee0 5561 9b9c 52fd ..<.'a.F.^aU...R 803daf4: db3f 698a 985e 6bb3 7e64 e842 cccf 8585 ?..i^..kd~B..... 803db04: dadd 5a99 7077 b6d5 6d0a def9 d446 ffa1 ...Zwp...m..F... 803db14: 2528 589a b582 f637 616b 6fc0 4bcb b20b (%.X..7.ka.o.K.. 803db24: a2a5 1505 c86b 5016 847f a37c 7619 a412 ....k..P..|..v.. 803db34: 1f67 4ae9 30f3 a293 d5b2 aab1 16b4 707c g..J.0........|p 803db44: d9e3 aedb 7c9c f04f d184 28e4 33f2 0fd0 .....|O....(.3.. 803db54: 0648 59a3 4a80 24aa 23dc 9292 a730 0a69 H..Y.J.$.#..0.i. 803db64: cb1c 5659 8648 0393 9e46 6254 d58e 128b ..YVH...F.Tb.... 803db74: 9ce8 3d7b 6ef6 a66c 5094 76b7 33ae 5683 ..{=.nl..P.v.3.V 803db84: bca4 6462 91c8 6492 bb94 e3a0 e505 3565 ..bd...d......e5 803db94: 3b6c ff1d 292a a9b1 24a2 5876 bf45 9ec2 l;..*)...$vXE... 803dba4: f334 03e3 52be 7ce5 3eea 4e2e ab8b 6295 4....R.|.>.N...b 803dbb4: a0b4 c6d8 770e b5c1 dfc8 3f14 fd8e ffee .....w.....?.... 803dbc4: 9303 02fb 39bb 7d7a 4a92 623b 73ee ba3d .....9z}.J;b.s=. 803dbd4: 3a33 7cc0 f9e8 7fce 0db7 b626 2efd 58dd 3:.|......&....X 803dbe4: ae09 5a85 09b6 d93d dd05 b465 dde3 e8fe ...Z..=...e..... 803dbf4: 494b 220b 21b7 35e5 0d48 03a9 653c a482 KI.".!.5H.....+...{~ 803dc94: f114 a3bb dcde f320 31ff 135a 4156 8c10 ...... ..1Z.VA.. 803dca4: cd6f 0f82 416a ef53 1bf0 425b 4ced 4ac6 o...jAS...[B.L.J 803dcb4: ff6d f96b bd07 325e c546 0008 2f00 m.k...^2F.... 0803dcc1 : 803dcc1: 662f 7661 6369 6e6f 692e 6f63 0000 0000 /favicon.ico.... 803dcd1: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803dce1: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803dcf1: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803dd01: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803dd11: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803dd21: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803dd31: 3131 3035 0a0d 6f43 6e6e 6365 6974 6e6f 1150..Connection 803dd41: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803dd51: 742d 7079 3a65 6920 616d 6567 782f 692d -type: image/x-i 803dd61: 6f63 0d6e 430a 6361 6568 432d 6e6f 7274 con..Cache-Contr 803dd71: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803dd81: 612d 6567 383d 3436 3030 0a0d 0a0d 0000 -age=86400...... 803dd91: 0001 0001 1010 0000 0000 0020 0468 0000 .......... .h... 803dda1: 0016 0000 0028 0000 0010 0000 0020 0000 ....(....... ... 803ddb1: 0001 0020 0000 0000 0440 0000 0000 0000 .. .....@....... 803ddc1: 0000 0000 0000 0000 0000 0000 ffff 01ff ................ 803ddd1: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803dde1: ffff 01ff ffff 01ff d2d2 ffd2 d2d2 ffd2 ................ 803ddf1: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803de01: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803de11: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803de21: 8d8d ff8d 8484 ff84 8989 ff89 8989 ff89 ................ 803de31: 8484 ff84 8d8d ff8d ffff 01ff ffff 01ff ................ 803de41: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803de51: ffff 01ff ffff 01ff a4a4 ffa4 8484 ff84 ................ 803de61: aeae ffae ffff 01ff ffff 01ff ffff 01ff ................ 803de71: ffff 01ff aeae ffae 8484 ff84 a4a4 ffa4 ................ 803de81: ffff 01ff ffff 01ff 8181 ff81 ffff 01ff ................ 803de91: ffff 01ff a0a0 ffa0 9a9a ff9a ffff 01ff ................ 803dea1: c7c7 ffc7 8f8f ff8f 8585 ff85 8585 ff85 ................ 803deb1: 8f8f ff8f caca ffca ffff 01ff d5d5 ffd5 ................ 803dec1: ffff 01ff 7777 ff77 ffff 01ff ffff 01ff ....www......... 803ded1: d5d5 ffd5 8484 ff84 ffff 01ff a8a8 ffa8 ................ 803dee1: 8c8c ff8c bbbb ffbb ffff 01ff ffff 01ff ................ 803def1: baba ffba afaf ffaf ffff 01ff ffff 01ff ................ 803df01: 6465 ff5b ffff 01ff ffff 01ff ffff 01ff ed[............. 803df11: 9898 ff98 b0b0 ffb0 d5d5 ffd5 8484 ff84 ................ 803df21: dada ffda 9595 ff95 8484 ff84 9d9d ff9d ................ 803df31: d7d7 ffd7 ffff 01ff 9898 ff97 7a7b ff73 ............{zs. 803df41: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803df51: 9393 ff93 ffff 01ff a4a4 ffa4 bebe ffbe ................ 803df61: bdbd ffbd d1d1 ffd1 ffff 01ff ffff 01ff ................ 803df71: b4b5 ffae 5f5f ff5d 979d ff6b c0d2 ff55 ....__]...k...U. 803df81: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803df91: f0f0 fff0 ffff 01ff f1f1 fff1 ffff 01ff ................ 803dfa1: d5d5 ffd5 cfd0 ffce 8585 ff85 6060 ff60 ............```. 803dfb1: 9194 ff85 b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803dfc1: ffff 01ff b4c9 ff33 ffff 01ff 6262 ff62 ......3.....bbb. 803dfd1: 5d5e ff5c 5c5c ff5c 5d5e ff5c 6161 ff60 ^]\.\\\.^]\.aa`. 803dfe1: 6567 ff5b 8486 ff7b ffff 01ff ffff 01ff ge[...{......... 803dff1: ffff 01ff b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 803e001: ffff 01ff b4c9 ff33 ffff 01ff ffff 01ff ......3......... 803e011: b5c9 ff35 ffff 01ff c0d2 ff55 ffff 01ff ..5.......U..... 803e021: c4d4 ff5e c3d4 ff5c ffff 01ff ffff 01ff ..^...\......... 803e031: c3d4 ff5c c4d4 ff5e cedb ff79 c0d2 ff55 ..\...^...y...U. 803e041: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 803e051: c0d1 ff54 cfdc ff7d ffff 01ff b4c9 ff33 ..T...}.......3. 803e061: ffff 01ff bed0 ff50 b4c9 ff33 b4c9 ff33 ......P...3...3. 803e071: c0d2 ff55 ffff 01ff b4c9 ff33 ffff 01ff ..U.......3..... 803e081: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 803e091: ffff 01ff b4c9 ff33 ffff 01ff cad9 ff6f ......3.......o. 803e0a1: b9cc ff41 d6e1 ff8f ffff 01ff ffff 01ff ..A............. 803e0b1: d5e0 ff8c b9cc ff40 cedb ff79 ffff 01ff ......@...y..... 803e0c1: b4c9 ff33 ffff 01ff ffff 01ff ffff 01ff ..3............. 803e0d1: ffff 01ff c5d5 ff62 c1d2 ff58 ffff 01ff ......b...X..... 803e0e1: ffff 01ff bbce ff46 b5c9 ff35 b5c9 ff35 ......F...5...5. 803e0f1: bbce ff46 ffff 01ff ffff 01ff c0d2 ff55 ..F...........U. 803e101: c5d5 ff62 ffff 01ff ffff 01ff ffff 01ff ..b............. 803e111: ffff 01ff ffff 01ff c8d7 ff69 b4c9 ff33 ..........i...3. 803e121: cedb ff79 ffff 01ff ffff 01ff ffff 01ff ..y............. 803e131: ffff 01ff cedb ff79 b4c9 ff33 c8d7 ff69 ......y...3...i. 803e141: ffff 01ff ffff 01ff ffff 01ff ffff 0dff ................ 803e151: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803e161: b9cd ff42 b4c9 ff33 b7cb ff3b b7cb ff3b ..B...3...;...;. 803e171: b4c9 ff33 b9cd ff42 ffff 01ff ffff 01ff ..3...B......... 803e181: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803e191: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803e1a1: ffff 01ff ffff 01ff e4eb ffb5 e4eb ffb5 ................ 803e1b1: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 803e1c1: ffff 01ff ffff 01ff ffff 01ff 0000 ffff ................ 803e1d1: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803e1e1: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803e1f1: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 803e201: 0000 ffff 0000 ffff 0000 ffff ............ 0803e20d : 803e20d: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803e21d: 0d0a 000a 0000 7400 ....... 0803e224 : 803e224: e274 0803 e288 0803 e294 0803 28a1 0000 t............(.. 803e234: 0001 0000 .... 0803e238 : 803e238: 0000 0000 dcc1 0803 dcd1 0803 053c 0000 ............<... 803e248: 0001 0000 .... 0803e24c : 803e24c: b078 0803 bc46 0803 bc56 0803 1233 0000 x...F...V...3... 803e25c: 0001 0000 .... 0803e260 : 803e260: e224 0803 86a0 0803 86ac 0803 26b6 0000 $............&.. 803e270: 0001 0000 .... 0803e274 : 803e274: b0a0 0803 ad62 0803 ad6e 0803 02f6 0000 ....b...n....... 803e284: 0001 0000 .... 0803e288 : 803e288: 6d2f 6961 2e6e 7363 0073 0000 5448 5054 /main.css...HTTP 803e298: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803e2a8: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803e2b8: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 803e2c8: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 803e2d8: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 803e2e8: 6e65 2d74 654c 676e 6874 203a 3031 3931 ent-Length: 1019 803e2f8: 0d30 430a 6e6f 656e 7463 6f69 3a6e 4320 0..Connection: C 803e308: 6f6c 6573 0a0d 6f43 746e 6e65 2d74 7974 lose..Content-ty 803e318: 6570 203a 6574 7478 632f 7373 0a0d 6f43 pe: text/css..Co 803e328: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 803e338: 7a67 7069 0a0d 6143 6863 2d65 6f43 746e gzip..Cache-Cont 803e348: 6f72 3a6c 7020 6972 6176 6574 202c 616d rol: private, ma 803e358: 2d78 6761 3d65 3638 3034 0d30 0d0a 1f0a x-age=86400..... 803e368: 088b 0000 0000 0400 d50a 6b7d 238f 7239 ..........}k.#9r 803e378: 5fe0 a791 76d0 b6d7 d1a4 5eab 6c2a 9ec1 ._...v.....^*l.. 803e388: ebf1 5b80 c0c0 3f79 35f5 2916 5529 6dca ...[..y?.5.))U.m 803e398: 2949 5948 d5dd eb23 183f 1807 c038 cfb0 I)HY..#.?...8... 803e3a8: 3fde bfe0 3fd2 e2e9 0649 cc99 ba94 1fbd .?...?..I....... 803e3b8: adec 199d 1f25 88c1 3060 0c18 c906 7f1f ....%...`0...... 803e3c8: 27f5 6d9d dfb9 eb64 97e2 3fbc 1c3f 9f3a .'.m..d....??.:. 803e3d8: fdc6 7f41 f9d4 ce87 fe6f dfc7 fe77 3167 ..A.....o...w.g1 803e3e8: b7cf 1c87 9ebe aa8b 945f ba3f 9db2 fd5f ........_.?..._. 803e3f8: 5fd8 cf97 3765 57db 7cc5 779d 43b3 c8b1 ._..e7.W.|.w.C.. 803e408: 8bbb cabc f58a bba1 9e2c d9e7 2aae 2dca ........,....*.- 803e418: 7cfe e7d9 65dd 5659 bef9 cabb 05b3 e7fe .|...eYV........ 803e428: 5f79 ecbe 9bba d8ac 3776 f6f9 bba5 3ecd y_......v7.....> 803e438: 0f75 9cf9 1c6a 365e 6c9b e5ff 28b8 bb0e u...j.^6.l...(.. 803e448: f675 3a65 975b 8ff3 fea7 5761 676c ebe5 u.e:[.....aWlg.. 803e458: b26f c7fd 62ee 3db9 cb2e d56d 543b d65f o....b.=..m.;T_. 803e468: b4f9 80a8 f980 0fa9 6650 bed9 787b c199 ........Pf..{x.. 803e478: bb3f aee3 143c 7108 cfba 59d7 7c55 4fca ?...<..q...YU|.O 803e488: 0cfd f89a 7794 b3fb db6a 965f 97f3 fd03 .....w..j._..... 803e498: 9a9c ab9f 13f2 8820 9ea0 c5d6 a653 ee59 ...... .....S.Y. 803e4a8: f29b 558f 5afe 16f5 bcf9 03dc 6860 5b61 ...U.Z......`ha[ 803e4b8: 016e 403a 2ded edb2 be73 15ef 005b e553 n.:@.-..s...[.S. 803e4c8: 820b 250f d997 bacb 8fe2 bb62 a32c ddfc ...%......b.,... 803e4d8: 40be a392 c3d4 7ccb 1f9e 510e e7ea bf6c .@.....|...Q..l. 803e4e8: b62d 2ecf 58f5 b3ed 10ad ad9a 9dd7 f8fe -....X.......... 803e4f8: c9d0 43b3 050e e57a c54b fb8c 7ca9 12ed ...C..z.K....|.. 803e508: e107 a747 eed8 aa5e fd2e 7dfb 65f5 ff97 ..G...^....}.e.. 803e518: 90fa fb67 eaf9 b1c3 39f7 7d9f aa2c b65e ..g......9.},.^. 803e528: 41db b64a e79d 584a 78b6 ae66 3f1d 8aaf .AJ...JX.xf..?.. 803e538: ef2a 761d 6519 de7e 3b67 7be2 65f7 afdd *..v.e~.g;.{.e.. 803e548: 19b2 e9b0 5c70 0717 19ed 8be6 7e74 7a9f ....p\......t~.z 803e558: 9a7d 512d fa12 ddd2 9047 6c9e 9d3f d595 }.-Q....G..l?... 803e568: 54ea 9e6c ebbb 39fc 2edf b38e 0f72 3282 .Tl....9....r..2 803e578: 9c1d bbf8 2d5b d5ba b8ea 16cb a00b 921d ....[-.......... 803e588: d557 cd66 b022 36cc fac5 f4cb f62f b645 W.f."..6..../.E. 803e598: feee be6d 94fe 4483 dd66 3003 77a5 f7c8 ..m....Df..0.w.. 803e5a8: f2c5 c951 4ea2 803b f7a4 c5b2 5fef d50e ..Q..N;......_.. 803e5b8: 3874 bc18 ec79 0e6d 64bd 69ce 2e56 1cbe t8..y.m..d.iV... 803e5c8: 5fa1 8b9e 74ed 38f0 e6cb 911f ed80 37a2 ._...t.8.......7 803e5d8: d72f 7ee5 f57a f757 f57f 5fd3 1f0f 6be5 /..~z.W...._...k 803e5e8: 1e3c a23f 2cec e5d7 dee7 e997 be61 d72f <.?..,......a./. 803e5f8: c7eb 5e55 af3c a5b8 f653 28b2 eeca db3c ..U^<...S..(..<. 803e608: ca7e dd0e bedd de7c ef43 3f76 c0c1 9d29 ~.....|.C.v?..). 803e618: 17b0 75db cdb1 247b 8ff3 4228 cb40 07ba ...u..{$..(B@... 803e628: fde2 9dbc a0ce 3157 0197 d741 6f54 cfdf ......W1..A.To.. 803e638: 1461 4340 0f87 0ed7 f204 db5c 9c1d afde a.@C......\..... 803e648: c58a df22 e87e f956 8606 9553 e507 d94e ..".~.V...S...N. 803e658: 46b1 c917 2ed3 e7db eadb 4d94 c465 5364 .F.........Me.dS 803e668: 7c16 2890 0144 207a cd9b eff6 a2ab e75a .|.(D.z ......Z. 803e678: a41f 7ab7 89d0 b955 0e99 af77 059d ccfc ...z..U...w..... 803e688: a717 b759 55dc d83c 800f f6e7 fb99 33ec ..Y..U<........3 803e698: e573 006e 391d 1654 6ff7 f2ef 674d c8f0 s.n..9T..o..Mg.. 803e6a8: 1b03 69ba ca3a 2737 ffe0 a3c7 78b0 b030 ...i:.7'.....x0. 803e6b8: 30dd 5abd 072e 03a7 2f28 0491 daec fde9 .0.Z....(/...... 803e6c8: cde0 1549 8780 7774 e6f3 1891 fd2b 6831 ..I...tw....+.1h 803e6d8: 2de4 8e2a dcaa 7b4d 1bfd 1d68 0120 4471 .-*...M{..h. .qD 803e6e8: af55 a23f 4f94 c4cf e9f9 341e f5da 7b51 U.?..O.....4..Q{ 803e6f8: ca7c 3e6c bab1 9253 4086 64d0 7bb0 ad3d |.l>..S..@.d.{=. 803e708: 47f6 b2d7 238a b328 a01e f28c bd8c ec08 .G...#(......... 803e718: 0606 82be 963c e0bf 548f 3a5e b4f9 0503 ....<....T^:.... 803e728: 228b 7d0c 7996 b28c aa97 cd3c 504b 1fcb .".}.y....<.KP.. 803e738: 0b67 b790 c61c 66c4 0c17 4d9a 2db9 2869 g......f...M.-i( 803e748: dd77 c32f c07e 34fe 017b b7e2 565d be19 w./.~..4{...]V.. 803e758: f32f 2835 df6b 1ba6 c824 69f1 5db1 b8c1 /.5(k...$..i.].. 803e768: 64ab c860 4097 e8f2 2a7d c50e 9d6c 0b6b .d`..@..}*..l.k. 803e778: da20 9200 2b15 e049 e612 5625 823f 0e03 ....+I...%V?... 803e788: d679 ac5d 38b5 03f9 c6e3 3049 f2a0 482a y.]..8....I0..*H 803e798: 0e81 14dc 5255 71b5 c7fd cbf9 00fe 79a3 ....UR.q.......y 803e7a8: 1657 07d0 417b 3de7 3e4c 6019 f8b7 35d0 W...{A.=L>.`...5 803e7b8: bacd a3c4 1254 7ebd ba32 be74 e7ca a11f ....T..~2.t..... 803e7c8: 029f f62c 8c19 8f7c e984 d646 c973 378e ..,...|...F.s..7 803e7d8: e959 5e0a 9a1b b7f6 9b2f be59 30ff aa9d Y..^..../.Y..0.. 803e7e8: 1598 2ddb 47cc 7b38 6cf6 3267 6ac3 61a5 ...-.G8{.lg2.j.a 803e7f8: 877c 55a5 496e 4c9a f13b 619c fc50 49cf |..UnI.L;..aP..I 803e808: 53b3 66d7 4216 5ee1 f916 617a 2d39 7818 .S.f.B.^..za9-.x 803e818: 394a 07a1 760a af9e c413 5536 f3f0 cb78 J9...v....6U..x. 803e828: 080c 3b53 b1e9 2a9e 27e5 ee9a 2983 e70d ..S;...*.'...).. 803e838: e6ff b342 441c 679a 5ed1 9655 306b 7455 ..B..D.g.^U.k0Ut 803e848: c42e 9a8a c5a4 5e68 165c 5aaf 7dc6 02bb ......h^\..Z.}.. 803e858: d630 80c0 ee82 ae5a 8a5f 2b85 2517 8ad7 0.....Z._..+.%.. 803e868: 0ad7 b54e 62c8 5bdd fb95 17e2 b084 2cee ..N..b.[......., 803e878: c81c ba5a c056 6a31 80ab 054d 0109 da4f ..Z.V.1j..M...O. 803e888: 288a 4d98 80b9 8e49 04ad 2ec5 d348 6082 .(.M..I.....H..` 803e898: 685e fe3e c934 4cc0 969c d9d7 90ee 229b ^h>.4..L......." 803e8a8: 7241 9c54 d16d b0a8 8624 c345 ae32 5dd9 ArT.m...$.E.2..] 803e8b8: 9606 e69e 87f1 dbd6 5b65 4114 2030 be7c ........e[.A0 |. 803e8c8: d14b fb42 b3f2 e2e6 4e4f d376 5833 eb53 K.B.....ONv.3XS. 803e8d8: 741c cd28 d30c 3a1f b03f 83ec 4c99 528a .t(....:?....L.R 803e8e8: b787 7719 6146 93c4 c988 564a 4138 a1cf ...wFa....JV8A.. 803e8f8: 2e81 1713 e308 7a6e d933 febd b149 95d9 ......nz3...I... 803e908: 2afb 56db 648f b123 b221 9b47 f1e6 b173 .*.V.d#.!.G...s. 803e918: 56a8 436c fcc9 5cbc 4f2e f76a b583 6a66 .VlC...\.Oj...fj 803e928: f3ac 5825 dca2 53c6 891f c922 8355 47ae ..%X...S..".U..G 803e938: 0110 4c16 8b95 d3e2 ad13 8e2d c0dc 7268 ...L......-...hr 803e948: 7bb3 7b55 1ee6 cb7f 436c b9a5 b7a4 a661 .{U{....lC....a. 803e958: fb2f dbf5 903d b1f2 dbbf 5f3e 7a77 a150 /...=.....>_wzP. 803e968: 1bd3 bfe2 65b7 9f6f 6183 601b b32e 6a32 .....eo..a.`..2j 803e978: a737 3c78 9c34 7383 9d98 cc61 bccb 8dec 7.x<4..s..a..... 803e988: 9b40 f655 75d2 a992 3ea7 34da d360 b26d @.U..u...>.4`.m. 803e998: 77df 6fdd 0958 eff1 0659 068b 512a 747e .w.oX...Y...*Q~t 803e9a8: c0c2 a0f6 fc70 f3d6 0863 247d 30fc d43c ....p...c.}$.0<. 803e9b8: ec14 11c5 0014 3493 a6ab 07dc d90a 16a3 .......4........ 803e9c8: 6cb3 e9d0 8ddd 7e03 b2f9 90cc 1de1 ed40 .l.....~......@. 803e9d8: dfdc 6f41 fc19 258d 8319 ddec 8560 01ef ..Ao...%....`... 803e9e8: fd9b 0dbe f8ec c0bb 8702 80db 810e dfbf ................ 803e9f8: 2b84 22a8 33d0 0dc7 b0cc dcde de47 8670 .+.".3......G.p. 803ea08: feae 9b4c 82ba 0180 48f3 71e3 2d95 0340 ..L......H.q.-@. 803ea18: 3a0c 3a68 aca3 9fee d967 41db ff17 a3fa .:h:....g..A.... 803ea28: 18eb 4752 cf21 9160 50b6 78eb be3c 66cb ..RG!.`..P.x<..f 803ea38: ed77 cd65 1672 a355 2fd8 3c21 f4b1 4c75 w.e.r.U../!<..uL 803ea48: c367 e8e1 d1ee 0088 d867 8255 13a2 4383 g.......g.U....C 803ea58: a005 ddd8 35dd 06a3 a27c 36c5 1cac ed61 .....5..|..6..a. 803ea68: 3ca3 37cc 4162 315e d665 c532 4021 c5ea .<.7bA^1e.2.!@.. 803ea78: ddcf 54b2 9e15 1eb3 5a3f 97c9 f81c 248f ...T....?Z.....$ 803ea88: 1ab3 6d13 7032 638c 1a6c 32aa 629e 9179 ...m2p.cl..2.by. 803ea98: 449a f435 09a8 02ba 4542 5c86 0a71 070e .D5.....BE.\q... 803eaa8: 2c1f b922 9831 6818 3149 5478 071f fb2f .,".1..hI1xT../. 803eab8: 0aa8 e0b4 0fdd 1f75 ab86 6e22 c611 29f6 ......u..."n...) 803eac8: 2d8b 17e7 c358 e7ef 62b0 5c7c b0e7 4314 .-..X....b|\...C 803ead8: 300b e39b a35a 803f 9565 3c22 e09d 6208 .0..Z.?.e."<...b 803eae8: aa4d c490 a249 371d 4d19 3796 1013 5c53 M...I..7.M.7..S\ 803eaf8: 2b90 a0e6 3a76 7287 2c5d 573a 6183 9c36 .+..v:.r],:W.a6. 803eb08: 75e5 9d80 3df1 6130 905d 7e86 3ca9 d925 .u...=0a]..~.<%. 803eb18: 6a0c 9982 88f9 89ea c7b8 7fda 8204 3aef .j.............: 803eb28: 1621 4625 604e b501 697e bfd7 e437 fac0 !.%FN`..~i..7... 803eb38: c030 9693 d9a2 9561 1e2f 017f c887 7f22 0.....a./.....". 803eb48: 1685 2747 5b9a 6161 2447 6329 5d5c 4767 ..G'.[aaG$)c\]gG 803eb58: 721c 0658 92c3 5db9 65fa 73c6 8d5d 0164 .rX....].e.s].d. 803eb68: cae9 6511 2619 98c9 b1a2 38c0 4998 c7f4 ...e.&.....8.I.. 803eb78: 3b1f ec9b 67b5 4252 1969 5091 b551 0aa7 .;...gRBi..PQ... 803eb88: 8b4d 6aa7 04ff 117e bbf4 73ac b493 4972 M..j..~....s..rI 803eb98: e138 a546 925c 852f 2563 e52a bc92 05cf 8.F.\./.c%*..... 803eba8: 0ff1 67c6 327f bfba 1bb9 c64e 5af1 037a ...g.2....N..Zz. 803ebb8: 071e 5d30 bd84 cbd4 5c5e 8b16 49c5 3631 ..0]....^\...I16 803ebc8: a8ad ad55 0eae 201a 420a 0b86 aa8a 9d08 ..U.... .B...... 803ebd8: 2281 7fec 0957 e9b4 d8b2 ff83 be69 d62a ."..W.......i.*. 803ebe8: 9540 4f63 317b 0cc7 21e8 5f32 82cf 2f6b @.cO{1...!2_..k/ 803ebf8: e0e7 5611 4a21 f0fb 61d3 be78 4ae8 1645 ...V!J...ax..JE. 803ec08: 0a79 cb0a fc74 923b 9b08 e49f 8756 a4eb y...t.;.....V... 803ec18: 22a7 0801 1393 140c fbf0 fb02 626a cc96 ."..........jb.. 803ec28: 6a54 a66d 3393 2fa5 9999 e9aa 22a4 d355 Tjm..3./....."U. 803ec38: 7a65 24c1 41b5 80ac 86a1 1a23 aebd 77e1 ez.$.A....#....w 803ec48: 108a 6b2d 1cf2 3e36 4eaf 2246 512f e1cf ..-k..6>.NF"/Q.. 803ec58: c099 e5c5 7f69 c792 26ac 8ed9 279a 6d15 ....i....&...'.m 803ec68: ce2f 3ca9 2685 470a 0914 8188 2bf6 e078 /..<.&.G.....+x. 803ec78: 9d8a d5e9 b6e9 f55a 65ca 7d0f 6fc0 c5cb ......Z..e.}.o.. 803ec88: 3ae2 1625 4b0f 53f8 e408 7403 130c a143 .:%..K.S...t..C. 803ec98: 1a66 2d5c f06f 902f d64f fd2f b29d d0ca f.\-o./.O./..... 803eca8: 82b4 54d4 f7cb f84b 9553 17f9 ff3f fe34 ...T..K.S...?.4. 803ecb8: 9079 cb9e 10c8 3ef0 3723 b1f3 ef9a 90c0 y......>#7...... 803ecc8: 3f7e 675f c387 7eaf 3f0d 1f7b 4cfc a874 ~?_g...~.?{..Lt. 803ecd8: 7bc0 773f 2a33 0ccb 7994 6cd9 66c5 ff26 .{?w3*...y.l.f&. 803ece8: a535 aa77 0045 2ba5 aba9 f520 ec1c 5c1c 5.w.E..+.. ....\ 803ecf8: 6cc2 b093 9c67 3880 4286 22ff cc2f 09ba .l..g..8.B."/... 803ed08: 5ff6 29d0 23a5 4bdd 960e 39a3 5c50 13a9 ._.).#.K...9P\.. 803ed18: 8d70 7a9a eb6c 4133 14e0 95db 43b0 29f0 p..zl.3A.....C.) 803ed28: 26b7 7f6a 7c30 fde3 e0d5 4065 e16f 6f9f .&j.0|....e@o..o 803ed38: 45f2 7591 77c0 e79d 0edb 96d8 b79d 4a7e .E.u.w........~J 803ed48: bbba 8305 faff 4328 40cb 9c6d 70b1 e5d9 ......(C.@m..p.. 803ed58: f8db 3e22 f252 abb8 54df 7076 09d0 188f ..">R....Tvp.... 803ed68: 1780 f715 d836 0e79 aa16 00cc 030d e3c4 ....6.y......... 803ed78: 24f0 2d7a 319c 4555 bac2 594f 0520 cb2d .$z-.1UE..OY .-. 803ed88: 5955 15b4 b152 414d abaa 0488 5724 0da8 UY..R.MA....$W.. 803ed98: eb92 a75e 1234 5c90 55a1 2f72 ee26 2173 ..^.4..\.Ur/&.s! 803eda8: 29d8 990c dc22 51f4 c8a7 b515 b24c 5673 .).."..Q....L.sV 803edb8: c323 3552 df57 d35a 6a71 ddf1 bf35 4db9 #.R5W.Z.qj..5..M 803edc8: d3c7 6e6f d5d3 da0c 79d4 ad98 d57e b59e ..on.....y..~... 803edd8: 4cce 6bf1 0531 2555 cbe6 3237 dbfa 1a2a .L.k1.U%..72..*. 803ede8: 7f3e c567 37d5 eaa2 f578 34ad 8aba 45b6 >.g..7..x..4...E 803edf8: 31e5 1e2f 879a 9d7a 06c9 336d 5ea3 3bd0 .1/...z...m3.^.; 803ee08: c541 81e6 5a6c 2614 1507 079b 99f7 d18a A...lZ.&........ 803ee18: 0f04 1843 9bb6 29c0 7b0e a41e 59d9 0f0f ..C....).{...Y.. 803ee28: e174 96e1 b89b 4979 1186 7a0e 4cf2 431e t.....yI...z.L.C 803ee38: 893d 8b2b 1afa b607 d0d7 413b b0fb 8eb8 =.+.......;A.... 803ee48: 0362 acc5 bdfb 0cc3 ab77 5cda c318 6b9b b.......w..\...k 803ee58: 7480 90be d7a0 6da3 2ec5 0ae3 40ce 4fdc .t.....m.....@.O 803ee68: ab26 25dc 7fb1 a615 726a daf8 1122 4a69 &..%....jr..".iJ 803ee78: 7831 6015 060f 1ff6 d375 1704 1d9e a09a 1x.`....u....... 803ee88: 4498 bde0 bcdb 53ac 2d0a 8ee1 77ef 2159 .D.....S.-...wY! 803ee98: 864c f022 5fd4 cbec 781d b67b f71d fc0b L.".._...x{..... 803eea8: cf08 10cf 2144 2d25 ccf5 a78a 6d3e 0673 ....D!%-....>ms. 803eeb8: 2405 29ed 530b cfa3 3d44 824a 3425 a4d3 .$.).S..D=J.%4.. 803eec8: 73db 6db6 21e5 332d b722 768b 4a11 f836 .s.m.!-3"..v.J6. 803eed8: 138b f4ec 522e 1ae1 71da c960 9f09 eb53 .....R...q`...S. 803eee8: ea41 db4e 1d8b e9d3 083d d838 d05c b5f3 A.N.....=.8.\... 803eef8: 473a 5169 13ec 6fe8 081d dc3d 7b90 b839 :GiQ...o..=..{9. 803ef08: 60f1 b69b 4eb3 a40d bccd 2500 bc5b 9615 .`...N.....%[... 803ef18: caa2 f71c ea9c 0ce1 d8a2 5382 30d6 fd91 ...........S.0.. 803ef28: 26bd 7a4f a026 6bc5 7af6 3ef3 12ef 7c4a .&Oz&..k.z.>..J| 803ef38: 36e9 4a48 7387 0570 ab83 b286 c392 63c5 .6HJ.sp........c 803ef48: 1d62 3c41 65da bf04 4913 0d4d 3afe c66a b.A<.e...IM..:j. 803ef58: a019 01b8 838f 9c96 6050 cd06 ca26 5054 ........P`..&.TP 803ef68: 5e1e 68f7 2cbb 3af8 1ce8 be52 c5e0 8848 .^.h.,.:..R...H. 803ef78: 16be 6532 de69 17d8 d864 dcb9 3306 474f ..2ei...d....3OG 803ef88: f2ae efdf 44df f4cc 23dc 1d48 b6dd e661 .....D...#H...a. 803ef98: d18a 4e98 5bad 5a8c b54e 6e81 a045 aff9 ...N.[.ZN..nE... 803efa8: 519e 8532 df50 8846 87a0 1de1 ef5b 388e .Q2.P.F.....[..8 803efb8: 6fee 6393 749a 0885 ed6f 2c14 e61b 2a98 .o.c.t..o..,...* 803efc8: 90b6 8211 a2da b442 0110 db66 8ed7 585f ......B...f..._X 803efd8: dac1 584f 860f 5e0d c350 e04d cc34 231d ..OX...^P.M.4..# 803efe8: 836c 987e 7b61 abfe 39a9 225f ef2e ab1a l.~.a{...9_".... 803eff8: 6c4d e457 b33d 1ad4 c566 2412 d443 4aa9 MlW.=...f..$C..J 803f008: 889e 52a3 9aec 6ee4 89a3 c3ba 1472 7315 ...R...n....r..s 803f018: 2d23 bf52 530c 48ea 696f 6455 9795 a09a #-R..S.HoiUd.... 803f028: 4ea4 daa9 2aa7 c2f4 64d8 9559 2f05 7eff .N...*...dY../.~ 803f038: 4ae0 5e7f cf58 a90b 8fb6 7aa8 c943 3970 .J.^X......zC.p9 803f048: 2884 a733 f257 6f11 0f85 1fb2 231e b9ac .(3.W..o.....#.. 803f058: f128 70da 0f5b 1eeb 968f 3995 8bd9 1680 (..p[......9.... 803f068: 1278 aabd 9286 1414 2793 e4e1 6cb9 6f56 x........'...lVo 803f078: 1f00 a593 5bad 50b2 5f1f 6e8a 0fa7 7abb .....[.P._.n...z 803f088: b9cf 5a6e 07b0 612a 42d3 9e94 878a 316c ..nZ..*a.B....l1 803f098: cb68 2ddc e097 ecc5 500e 38c3 d848 b16f h..-.....P.8H.o. 803f0a8: 160e 2e0a db34 5ecb eb15 3666 6095 1c4b ....4..^..f6.`K. 803f0b8: feb6 fdd0 b9d1 4b45 e79c 0785 4dfa 029b ......EK.....M.. 803f0c8: 811c 25c8 8558 c042 4a08 442b 5226 a9fc ...%X.B..J+D&R.. 803f0d8: 160e 011d 15d6 2ec4 b624 8ce2 28b3 b872 ........$....(r. 803f0e8: cfb3 d4fe 4217 103a d796 56e4 81ab 3e92 .....B:....V...> 803f0f8: 9bba dddc 83dc 50ab 6840 a7c7 7b5c 6c97 .......P@h..\{.l 803f108: c27b a19a 0b06 2a36 b821 9651 dd49 25b8 {.....6*!.Q.I..% 803f118: afe3 e550 9b27 1c82 28c4 01c2 e1fe 1f53 ..P.'....(....S. 803f128: 5cfc 6e10 5c87 643c 009f b562 7835 6f42 .\.n.\..i.....3..SP 803f238: e939 edec ef4c 616e 4fc3 bdbd 9d16 1f66 9...L.na.O....f. 803f248: b87e 8b27 bd91 653e 87d8 dee0 9c94 80d8 ~.'...>e........ 803f258: d3e7 7cd5 e185 7ff3 ce07 cffa 7b20 f85d ...|........ {]. 803f268: 6886 dfca 16ee 09b0 898b abdd 1e3d 0012 .h..........=... 803f278: c7af f0fe b973 6085 eedb cbd5 a20e 165b ....s..`......[. 803f288: 0bff b936 7961 a07f ddd8 e0e1 1f8d ba18 ..6.ay.......... 803f298: 7ca5 2f9e ee8f 80c0 a2db e5d6 582d 6e2e .|./........-X.n 803f2a8: 8b59 c771 31ce 8302 f754 6524 dc23 01ab Y.q..1..T.$e#... 803f2b8: e0da 1a36 06fd cda2 2efd 8c34 d853 c6d4 ..6.......4.S... 803f2c8: 0c28 dbde bd76 2eb5 f558 ac72 aa95 0a6f (...v...X.r...o. 803f2d8: c1e1 2f21 8a83 0f26 9e87 7583 df6e 583c ..!/..&....un........... 803f3a8: 8ea0 da9c 4a09 5a4b 2e50 c73e 5413 3388 .....JKZP.>..T.3 803f3b8: 9a83 59f1 a09f 9c66 6b69 82da bd2e e5dc ...Y..f.ik...... 803f3c8: ef5b 147e 63a7 d0fa 4b52 3d51 d4ca 245c [.~..c..RKQ=..\$ 803f3d8: 58e0 dfb7 505c d598 2456 4f66 d95b 2198 .X..\P..V$fO[..! 803f3e8: 42d6 2a7e d0f0 0713 a3bd fb61 3a21 650e .B~*......a.!:.e 803f3f8: bfac 9c1e 7ac5 9396 b24f 4a21 6cb3 5130 .....z..O.!J.l0Q 803f408: ac42 22df 04ff e3e7 9b78 e75d bf4b 1a67 B.."....x.].K.g. 803f418: 42e6 11d0 4c84 735d 8436 c358 2eb6 3319 .B...L]s6.X....3 803f428: 501d db9b 01c5 2fbc 64b9 5c6a 462f 0a13 .P...../.dj\/F.. 803f438: 5d8c 0af1 c4c1 d274 3a6c 2984 7419 a811 .]....t.l:.).t.. 803f448: bb28 78d6 b980 8cfa 0a12 a662 6c30 ec14 (..x......b.0l.. 803f458: 17bc af3c 01a5 63fe ca98 acec b9c9 1a14 ..<....c........ 803f468: 5358 18cc 2054 d383 422f ebba 966c a3db XS..T ../B..l... 803f478: fd38 5007 6172 1b84 6c1f fb52 d823 665c 8..Pra...lR.#.\f 803f488: 8373 670d b335 bfe5 b113 a299 0f39 7217 s..g5.......9..r 803f498: 056e 75e4 10e5 0bb0 9522 fd46 04c9 8130 n..u....".F...0. 803f4a8: 54a5 f0fd 589a d6c2 9e44 e7cf 5d3a 99e0 .T...X..D...:].. 803f4b8: 3f2e e899 cf8a ff4f 47ec 7e34 453c 26a7 .?....O..G4~3...m 803f728: caad 3698 b588 a472 ec49 5f35 3f71 4603 ...6..r.I.5_q?.F 803f738: ea04 294c e6a5 315c eb26 295c cfa2 f42e ..L)..\1&.\).... 803f748: 8c44 3d8c 30df e224 25dd fff4 7f39 2ea0 D..=.0$..%..9... 803f758: 540b f565 5964 e3ab c090 4a27 69e3 48ad .Te.dY....'J.i.H 803f768: c7a0 3e0b 85c2 aa43 bbc5 4760 ca63 a0e1 ...>..C...`Gc... 803f778: a669 35b7 ece9 9468 ed82 8fc8 3060 b066 i..5..h.....`0f. 803f788: a09c 01fd 7fa5 f3f4 fdcd b83d 2dbf 3af2 ..........=..-.: 803f798: 587c 05d0 1bb6 2a37 c92b 092a 5d22 9545 |X....7*+.*."]E. 803f7a8: 648b ab45 e284 7916 0992 f1b0 a3a3 3921 .dE....y......!9 803f7b8: a585 94af d340 a667 34f0 f5b9 31fe ed99 ....@.g..4...1.. 803f7c8: 51a3 6b08 8d1c b84a 9f4c 434d 8b43 0fb5 .Q.k..J.L.MCC... 803f7d8: 2920 d4a5 019c fc26 573f 69aa ca34 bf61 )....&.?W.i4.a. 803f7e8: b650 0312 1a23 5a93 36ad 60d0 05f8 0932 P...#..Z.6.`..2. 803f7f8: c0c7 ef70 f733 26e7 d069 07d5 6274 2355 ..p.3..&i...tbU# 803f808: 21ea 8d81 9a83 1692 599f 71ef a797 b5dc .!.......Y.q.... 803f818: ed32 db33 5e2a a63a b41d ce3f 76e0 5ae0 2.3.*^:...?..v.Z 803f828: 7649 3564 001b 5e22 9e0e d155 17c6 6497 Ivd5.."^..U....d 803f838: 538c c109 75e0 5ca0 2b76 be8e 0b54 5d9b .S...u.\v+..T..] 803f848: 4721 5191 f574 1306 285a 4851 2eba c905 !G.Qt...Z(QH.... 803f858: 82ab 6934 bf3e 3695 ac53 3885 aa5f 3a95 ..4i>..6S..8_..: 803f868: ec53 6032 2917 c731 7397 ccda 5415 cf8a S.2`.)1..s...T.. 803f878: 18e8 9e5f bdb1 b8b4 e0f2 f2e2 08df 3ffe .._............? 803f888: faab 5d1c acdf 6303 ba77 826a 3cc9 27cb ...]...cw.j..<.' 803f898: f0e0 b58b b367 e40e ac1a 6359 daa8 343d ....g.....Yc..=4 803f8a8: 6b62 4699 e272 653c b27c 1da2 b551 678a bk.Fr.........~.}.. 803f948: 1aa2 9009 31da 5634 c683 d0ec 320a d994 .....14V.....2.. 803f958: 2af5 0876 5585 6ace a09d d2b8 5699 e339 .*v..U.j.....V9. 803f968: 6ce1 a8b0 a9ad 1f6e 99b2 67b8 5802 e86e .l....n....g.Xn. 803f978: a0f2 e74c 70b5 a521 d269 9a40 e2f9 6870 ..L..p!.i.@...ph 803f988: 9064 612f 4c14 8cd0 c91f 4209 667c 2533 d./a.L.....B|f3% 803f998: 8ca6 0551 6d0d d334 c1e2 1234 8a63 abb4 ..Q..m4...4.c... 803f9a8: a093 46f1 125d 5294 9afa 7a46 b858 8b5d ...F]..R..FzX.]. 803f9b8: 6504 e295 008b d19f 211f 46e0 31e5 0f9b .e.......!.F.1.. 803f9c8: ee16 07f6 1e55 034d d635 521c 59b9 c473 ....U.M.5..R.Ys. 803f9d8: fc9b a83a 3cf2 8d1b 41c1 d718 b66c b860 ..:..<...A..l.`. 803f9e8: 2b06 188f f6aa 2907 5a83 11a6 38b4 f94f .+.....).Z...8O. 803f9f8: ac9d 4568 56ab acf1 892e 286b 69e5 9275 ..hE.V....k(.iu. 803fa08: 1fcf 86ee a61a 2ea6 c59a fdcd 90cd 6ac3 ...............j 803fa18: 317a 3738 7956 3620 b766 26b3 57a5 411a z187Vy 6f..&.W.A 803fa28: 32b5 e1cb c6d3 5f35 28c8 b898 3f3d d370 .2....5_.(..=?p. 803fa38: f9a4 56fc 4cda 16b1 f001 5aa5 33a9 2ec5 ...V.L.....Z.3.. 803fa48: d603 72ae 9262 b51b 5c4e 2950 d26e b50f ...rb...N\P)n... 803fa58: edf2 27ba ae2e b83c fc14 0d19 0354 a4df ...'..<.....T... 803fa68: 9684 6c83 8931 5095 80db f48f d690 b58f ...l1..P........ 803fa78: b789 a260 33a0 8c1d c98b 3978 26fe 861b ..`..3....x9.&.. 803fa88: b06b 8a1a 6a80 90e7 8932 8cf3 44d8 ca59 k....j..2....DY. 803fa98: 54f4 3b35 e298 676a 5035 4154 4e69 a02b .T5;..jg5PTAiN+. 803faa8: c3f9 3078 8d8a 6cc8 7a3e e918 5576 d214 ..x0...l>z..vU.. 803fab8: aaa7 0783 d469 1b96 ade8 513c d610 6bc8 ....i.......xh\......#..Z 803fba8: d083 10a8 4a04 59c0 e1ab 586a 36e4 d2d4 .....J.Y..jX.6.. 803fbb8: d99f d381 2847 145e c5c7 2caa 430c f7f7 ....G(^....,.C.. 803fbc8: e91e 0b5b a08f e98b 06f9 e91b be9f ce29 ..[...........). 803fbd8: 0ec0 d2e3 4b4d 30f5 1f1f 9462 3c68 b88a ....MK.0..b.h<.. 803fbe8: c463 d461 db55 f877 032f 27d8 a8d6 2ca3 c.a.U.w./..'..., 803fbf8: 4d4e 32d6 8959 1eba aa3f 47ac e8f4 741c NM.2Y...?..G...t 803fc08: 420f 991b 896a 0c2b a973 903b 92df 886b .B..j.+.s.;...k. 803fc18: 29b7 51b6 6e97 10e2 a003 a60e c58f a1b3 .).Q.n.......... 803fc28: 866b 7823 5220 58e3 916d 1c00 ba9c 0270 k.#x R.Xm.....p. 803fc38: bb51 22c8 d518 1ed4 8105 cad7 48f9 031e Q..".........H.. 803fc48: 888d 177d 56c7 7139 e3e5 7835 a119 5144 ..}..V9q..5x..DQ 803fc58: 0c52 5e2e 18b8 e8c3 9fad 81cf e0a1 00cb R..^............ 803fc68: a60e 4018 780d 3427 b9de 2258 2cd8 f777 ...@.x'4..X".,w. 803fc78: 9c9f 7b2b 0116 3de2 89aa 0263 5493 90b0 ..+{...=..c..T.. 803fc88: d881 6c3b 3c8c 361d 59ca 653c 374d f281 ..;l.<.6.Y... v.C.). 803fcc8: 1138 dcfe a670 ef15 ffbe 7ca9 9ab5 9dcd 8...p......|.... 803fcd8: 6af4 5757 1a2a cf12 634c a048 4bf1 1604 .jWW*...LcH..K.. 803fce8: 2aa6 be3c 99ab 94e2 eee9 fe9c 16e0 8e5f .*<..........._. 803fcf8: 58d0 7ce8 7f80 ec09 5995 ca20 b81d cd69 .X.|.....Y ...i. 803fd08: 0b32 796f 2516 2e7e 3b8c 648e 084f 8a88 2.oy.%~..;.dO... 803fd18: f61f 324a 3ac6 aa21 654d 9f5d 3f31 5a78 ..J2.:!.Me].1?xZ 803fd28: 863c f79b b7b7 32d9 d07f 4070 8db8 3be8 <......2..p@...; 803fd38: ea70 91c2 0edc 8672 f9e2 38e0 7745 7778 p.....r....8Ewxw 803fd48: 1dd3 c78d fedd 706d d0b7 e239 015a d445 ......mp..9.Z.E. 803fd58: 49f8 6cdd c349 bff1 fe01 b2b9 b4b1 d93a .I.lI.........:. 803fd68: a772 4308 90c9 bd33 c720 e01a 3f0f 6399 r..C..3. ....?.c 803fd78: 3970 4a6f bc56 05f5 f38d fbb1 a8e8 1d2b p9oJV.........+. 803fd88: 332c aaaf 69b8 43be 0216 a39c 6990 b61f ,3...i.C.....i.. 803fd98: d10e e85a 71f6 96f8 4b9a 921f 3355 7533 ..Z..q...K..U33u 803fda8: d010 45cc 4557 8d45 9787 7949 c8c6 1d63 ...EWEE...Iy..c. 803fdb8: 28ba f0fb 6e0e f5da 3ae3 4b99 1245 d6cc .(...n...:.KE... 803fdc8: 4a00 a5ba 1f50 4232 77c6 9802 ddbf f7d1 .J..P.2B.w...... 803fdd8: c531 3870 a765 c70c 4d87 0814 17a8 529e 1.p8e....M.....R 803fde8: de3c f708 d448 1a4a 878c e0df 3433 9ef5 <...H.J.....34.. 803fdf8: 5735 ca2e 4d41 c51d c474 0d43 fea8 1c0d 5W..AM..t.C..... 803fe08: 3985 a865 8fb6 c554 a0d8 c764 87bd 7c37 .9e...T...d...7| 803fe18: 5ff2 8bcb fa26 88ba 493e c782 e0e3 108e ._..&...>I...... 803fe28: e6ba 5f8b a223 8313 2c8f 9348 1001 81b6 ..._#....,H..... 803fe38: 42d3 39fc 3784 f08d 7d0e 81ac 5457 5e38 .B.9.7...}..WT8^ 803fe48: b4d0 1fe0 d25b 93e9 606e 17b6 5961 2205 ....[...n`..aY." 803fe58: 2787 fcbd 23a9 9691 7efc 4b42 5c5f 278e .'...#...~BK_\.' 803fe68: c3f8 7da3 95f6 b0a8 f48f 483e 477d 50c7 ...}......>H}G.P 803fe78: 6fc0 8024 41b3 425e d3f8 eced 7bb0 e1fc .o$..A^B.....{.. 803fe88: 1e91 2990 78d6 5de6 df1e e7f1 c42e c156 ...).x.]......V. 803fe98: fc83 fb70 37bf 2016 6e81 369c f2bc e095 ..p..7. .n.6.... 803fea8: 86b0 16e3 130f 5c77 8c77 5e67 a381 5e70 ......w\w.g^..p^ 803feb8: c0ea 3a67 dd52 f758 eb3e 9570 8de1 545a ..g:R.X.>.p...ZT 803fec8: d7ce 6b08 5c55 75fc ee64 8842 a51e 55e1 ...kU\.ud.B....U 803fed8: 8c04 ca2d a3fe 4113 7137 64e1 7008 0463 ..-....A7q.d.pc. 803fee8: 68a7 181e 137e 53d6 99e4 7d09 bfba bfc5 .h..~..S...}.... 803fef8: d55a 65a6 f42e 5c7a 9656 7f98 cd9f 0d92 Z..e..z\V....... 803ff08: ec9a e9a8 78b6 0d2d 942c d769 ed70 b952 .....x-.,.i.p.R. 803ff18: 1d73 d437 66b3 1c17 1be1 c1df 2f04 f0c7 s.7..f......./.. 803ff28: daf0 f0d3 df08 5f2d ea7f c0e5 0ac9 608d ......-_.......` 803ff38: b023 832e 012d 7be9 7f1a aaa1 0ec4 b1d6 #...-..{........ 803ff48: a38a 48db 9825 aa0f 02a1 e34b 647e b68f ...H%.....K.~d.. 803ff58: 1337 4357 ce5f 5ff3 30e1 07c2 bac3 7082 7.WC_.._.0.....p 803ff68: eed4 9d1f d73c 2b20 7b3e 1da8 fb8e 320b ....<. +>{.....2 803ff78: a566 aba5 e90c 9a7b 026f 9155 45ac 6d16 f.....{.o.U..E.m 803ff88: 2760 f18e 099e 5d1d b4ce 0e15 91c3 37ba `'.....].......7 803ff98: 0e1e f657 7fcc 5e94 91c2 ed45 bd87 9746 ..W....^..E...F. 803ffa8: 191d fdd4 496a 34a6 537a 0e8f 4a99 468f ....jI.4zS...J.F 803ffb8: 6017 d1bc 7806 41e2 12ab fbba 209b 91e2 .`...x.A..... .. 803ffc8: 9d41 f05c 3b11 34a7 a448 a092 ee02 fa8c A.\..;.4H....... 803ffd8: 78f7 9224 9e69 df8c 0220 e5e7 f1cd 0d13 .x$.i... ....... 803ffe8: 01b1 a1d5 7de7 1ba4 fc8d 839a 00a4 76b9 .....}.........v 803fff8: 36f6 db4c 75c9 1f0f c004 4dfd e320 eb2f .6L..u.....M ./. 8040008: 4fab 3620 0770 dc04 01fe bf77 babc 45f1 .O 6p.....w....E 8040018: 4a43 98fb 25b4 baf5 ae9f 64a6 8e2d 37c6 CJ...%.....d-..7 8040028: dbdd fc07 ff7f 6d1e e8c5 cb46 cca8 5af0 .......m..F....Z 8040038: 6d4d 7754 49e0 1786 948d 1540 c0c4 61a7 MmTw.I....@....a 8040048: 4704 7171 fb07 81cc b47f d1e1 f2f4 1a8e .Gqq............ 8040058: 7f77 79fe ded3 067b 407d 9d64 2b92 687b w..y..{.}@d..+{h 8040068: 0e53 7de0 b18f 900d 6b6b 5455 f8c2 3d8f S..}....kkUT...= 8040078: 834f 3207 0e43 77fd ffb7 e461 6cbc 05ab O..2C..w..a..l.. 8040088: 3fad 62ab d247 9866 6cd1 04e7 0272 924f .?.bG.f..l..r.O. 8040098: 23e1 e07e 9afe abe7 0d72 463e 5eb0 02e8 .#~.....r.>F.^.. 80400a8: 87d1 5807 c907 3d45 88c3 7875 93e4 37bd ...X..E=..ux...7 80400b8: 8ae9 7151 c0f3 9c1b 6f6c ac68 0756 c8da ..Qq....loh.V... 80400c8: c15f 5c2e 2318 8c5b e33a 5556 02d1 d7fb _..\.#[.:.VU.... 80400d8: ffca 907b 797f 2f15 874c 0777 3817 a6c1 ..{..y./L.w..8.. 80400e8: 450f 1059 66f5 e0af 9146 9e26 0698 fe53 .EY..f..F.&...S. 80400f8: 00d4 fd70 d588 7509 be30 1889 ab20 dde7 ..p....u0... ... 8040108: 2969 8a01 7128 b9e7 4fae aad1 9c4e 1fc1 i)..(q...O..N... 8040118: 1f5c 0543 d786 54d3 26c5 c1ef b54b fad9 \.C....T.&..K... 8040128: d043 375c 0a2c 2cef ab56 12d6 ac08 00b5 C.\7,..,V....... 8040138: 14b6 4016 f074 567f 8cbd 88f1 77bf caf7 ...@t..V.....w.. 8040148: cf82 612f fd9c 3aa8 8d8d 3315 a1f5 d542 ../a...:...3..B. 8040158: 4a99 312d 5834 5adc 5832 f23d bd87 8094 .J-14X.Z2X=..... 8040168: 49e6 d85f 024c 18ba 4b85 f418 2ca7 ed3e .I_.L....K...,>. 8040178: a154 5059 178a 06ab 2502 4668 2ea2 7be7 T.YP.....%hF...{ 8040188: dd6a dc52 07d0 fa0c 0fdf 204a 65bb 9443 j.R.......J .eC. 8040198: 39df 04ec 7783 c88c 00d1 f7c1 3cc5 0447 .9...w.........j.......>.. 8040228: 31ae 2449 0644 00f8 4c2e 6be0 e04d 627d .1I$D....L.kM.}b 8040238: a138 f7ca c1af 54d5 dc25 f5ba a685 84c3 8......T%....... 8040248: c3b9 08ee 83eb 09ba a39f 6790 782c ed76 ...........g,xv. 8040258: 45e1 4747 3b55 c36c dde9 f016 25de 8d1c .EGGU;l......%.. 8040268: ff65 7b2e c460 4546 46b7 f160 237a a64f e..{`.FE.F`.z#O. 8040278: 6b2f 8098 a799 0897 c541 9a21 32fa 37ad /k......A.!..2.7 8040288: ebb4 2646 eb2d 22ed 9085 5899 9b13 e1d7 ..F&-.."...X.... 8040298: 12f2 3e35 a716 25b3 1c3d cb27 b6fb 1200 ..5>...%=.'..... 80402a8: db83 3dc8 c18f 700f 4658 cf73 c780 6682 ...=...pXFs....f 80402b8: 54aa 84bf 04c4 8de5 022b d5ae b87b 36b5 .T......+...{..6 80402c8: 15ed 36bc 0f09 5616 ca9f 3575 2b84 fcd5 ...6...V..u5.+.. 80402d8: 28d7 1af8 5f07 f893 f1a1 f861 f8ce e11f .(..._....a..... 80402e8: b6ee 4cb4 e99c b81b 514b 5884 2558 3312 ...L....KQ.XX%.3 80402f8: 9ba6 d506 b722 84fd 41ab a6e9 48b6 6b65 ...."....A...Hek 8040308: 3705 7e1a 2fa6 f3fd dcdf 3597 4486 d537 .7.~./.....5.D7. 8040318: 42c9 60c4 3ec3 b811 ba74 fd84 b837 75ff .B.`.>..t...7..u 8040328: 91bf 46a9 5329 686a c399 f103 af0e f492 ...F)Sjh........ 8040338: ec15 ea04 55d6 86dd 7602 8a8d 6642 6d56 .....U...v..BfVm 8040348: 178d e91f 650b e37a d1d1 e6c2 68ed 21a3 .....ez......h.! 8040358: ed42 7342 1fe5 5701 0654 d71e 8548 d991 B.Bs...WT...H... 8040368: 8ca2 2ba2 9888 eed1 8d92 7626 53e9 06d1 ...+......&v.S.. 8040378: 0b7d 9e06 fcba 7bdc 4018 e88f 6d1b ec0f }......{.@...m.. 8040388: 8569 d70b e7cb 7a52 554a 3c2b 1f5c 86df i.....RzJU+<\... 8040398: ef84 59d4 ad0b f0ff 6ee0 7c62 71bb dc0e ...Y.....nb|.q.. 80403a8: 7b87 b230 96e0 f0a7 25fe 11bb 578b b7fe .{0......%...W.. 80403b8: cae5 0a4d c56a e446 43cb 1ca6 8150 14d3 ..M.j.F..C..P... 80403c8: 83de 2a2f f3cc 2f88 4511 bf63 5f37 f317 ../*.../.Ec.7_.. 80403d8: 5d8f b3f4 e877 d166 8933 8f7a f043 b6ac .]..w.f.3.z.C... 80403e8: 9faa fdc1 bccf 15f3 c039 7db5 8699 f416 ........9..}.... 80403f8: 1f64 37ad a0af 5c0a 298b 316b fee7 0674 d..7...\.)k1..t. 8040408: d79d b7f3 e168 df68 ee8c 3150 ff6b 4c91 ....h.h...P1k..L 8040418: 19f8 6f83 7470 f1fc 6b8b 7520 9537 384a ...opt...k u7.J8 8040428: 19d9 8a2d 886c 62f2 0247 bf2e aa1d 987d ..-.l..bG.....}. 8040438: 54c4 7026 233e ae6f 25cf 8fd7 1be6 4c8b .T&p>#o..%.....L 8040448: ed08 2333 00b4 6002 4d8b b1f3 e68a f552 ..3#...`.M....R. 8040458: 3e10 1b3f 5471 d1fa 635f 8a9e fe85 1c8e .>?.qT.._c...... 8040468: 9e13 ce37 7fc3 84b7 a8bf 8c5f 3627 e19f ..7......._.'6.. 8040478: e69f 1cab 0239 65c9 f702 385f 1e14 0504 ....9..e.._8.... 8040488: e257 9fa9 61ed 81ea 6e37 6fb8 5be5 fdbc W....a..7n.o.[.. 8040498: 8ef5 c9d6 d781 3c29 0748 126a 0138 75e6 ......)..QK.6... 8040518: be82 d136 b289 0541 053e 6215 888f 4e70 ..6...A.>..b..pN 8040528: 41d0 6464 f0e6 5db2 cd6f c3dc d8da e584 .Add...]o....... 8040538: 11d6 9bda 25e2 02ac 34d4 3983 a501 2f54 .....%...4.9..T/ 8040548: ab41 6f4d 16a0 d7a1 b569 8488 d2d4 65c8 A.Mo....i......e 8040558: 109c 5523 78d7 9ae9 c022 1edb cbc4 7434 ..#U.x..".....4t 8040568: 9c66 aaf6 86a7 4528 4392 9a76 a076 22ac f.....(E.Cv.v.." 8040578: 4dab 3033 db6d 7474 1190 ef51 357b 45c0 .M30m.tt..Q.{5.E 8040588: 4548 0c8c a5bb d003 60c1 4864 b4c7 0524 HE.......`dH..$. 8040598: 71ad b5e0 0e0a b7d6 22c4 c485 e960 a144 .q......."..`.D. 80405a8: f3d6 6021 d46a 710e f8d4 a4e7 49ac 246e ..!`j..q.....In$ 80405b8: e0d5 8421 1632 5fcc 5a19 4a86 9e96 f696 ..!.2.._.Z.J.... 80405c8: e5c9 0aac 9691 c18c cf3a 8829 be27 3ace ........:.).'..: 80405d8: 54c8 d6c7 9618 4675 a9c5 91eb 67af 8dd7 .T....uF.....g.. 80405e8: d974 fe5b c9d6 8058 6684 bb9d be92 e557 t.[...X..f....W. 80405f8: bb07 258b 0b9d 8dd3 97b0 d8e4 b74d 2bd3 ...%........M..+ 8040608: bf35 6343 8384 1095 1056 4ac0 2609 196c 5.Cc....V..J.&l. 8040618: 83bf 3348 884a 700b 7308 25cb 58a4 794b ..H3J..p.s.%.XKy 8040628: e214 23a7 7920 f818 87af d7f8 aa82 ad43 ...# y........C. 8040638: e2f9 6a03 4cda debd 6fb7 c2e0 44d4 573e ...j.L...o...D>W 8040648: d08e 2ac3 6dce 6750 168f c106 bbd0 a8c0 ...*.mPg........ 8040658: 5c53 8715 8515 5a17 3660 35a2 c568 99de S\.....Z`6.5h... 8040668: 1982 2fde 51e1 69f2 9c35 564c 9484 a9cf .../.Q.i5.LV.... 8040678: 6561 9ab2 712b 26d7 36fc 1e14 a887 0636 ae..+q.&.6....6. 8040688: 1335 6781 46ee 32a1 7adc 1b5b 7b8a 996b 5..g.F.2.z[..{k. 8040698: c00b 6d34 cfba f887 7aa7 0652 1e92 7dc6 ..4m.....zR....} 80406a8: ffde 37f4 a5c6 c3ee 6883 e1bb 9f79 017f ...7.....h..y... 80406b8: 2249 c70b 302f 0582 5e12 167d 9b05 ede1 I"../0...^}..... 80406c8: d6a3 7397 be07 bb1c 196e d1da f75c 2497 ...s....n...\..$ 80406d8: 98dd 2181 5bcd f421 0902 36e1 37cd eabb ...!.[!....6.7.. 80406e8: 51cb 306d 4eda 2ec7 5d84 4261 d9dd de82 .Qm0.N...]aB.... 80406f8: 4013 35d3 39a8 a908 22c1 bb22 c5fa 34ac .@.5.9...""....4 8040708: 873a 8cb0 1c97 1461 f093 9e09 cf49 8fc1 :.....a.....I... 8040718: 6146 fa36 118c 702a 717b aca8 cd8d b5ed Fa6...*p{q...... 8040728: 8863 b9c1 423e c87c ef3a 77fb 7b04 8094 c...>B|.:..w.{.. 8040738: f72f e634 13d0 f4bc f554 b85b d7d9 85cf /.4.....T.[..... 8040748: 6b74 bf1c 5b5f 1803 7b3f fa61 345f 3196 tk.._[..?{a._4.1 8040758: cd7f d932 63ec 8b21 4e7d 3b43 dd70 6c1f ..2..c!.}NC;p..l 8040768: 84eb 02dd 0d1b 8b4c 1674 5712 5b4f 86f1 ......L.t..WO[.. 8040778: ae84 e83e f2f2 58cb 9d30 e0e5 c0f6 5c67 ..>....X0.....g\ 8040788: 6ed8 b3fd ffaf f5f8 c0ff ff3f f5f6 7eff .n........?....~ 8040798: 8ffd 6b3f 7444 f861 ba38 03ae 7ff9 e004 ..?kDta.8....... 80407a8: e95f 7fdf faf8 5f4f 70ff a819 0271 bfd4 _.....O_.p..q... 80407b8: f541 fe7f 4ffa 0197 2498 fc00 d7fb fd7f A....O...$...... 80407c8: effa ff5f ff00 8ffe ffaf 6402 085d 786a .._........d].jx 80407d8: 917d 8d14 2b2e be36 d8ac 5ae4 6fd7 18bc }....+6....Z.o.. 80407e8: 3f00 45e8 307d ba54 c42f 7a59 a2ec aed2 .?.E}0T./.Yz.... 80407f8: 2e53 ed2a c07b 1169 3ae7 eb40 8a6d a9c2 S.*.{.i..:@.m... 8040808: 027e 9226 a3f4 0f28 43bc e411 aadb 19c3 ~.&...(..C...... 8040818: e86c 3336 11a1 bda9 481b 80b4 846d 4f00 l.63.....H..m..O 8040828: aa2a dc33 bba9 dcc8 8402 d18d d460 5a9c *.3.........`..Z 8040838: deb9 e3a9 f1b6 81d9 a489 3b05 a3f8 d86b ...........;..k. 8040848: 6423 24bf 1bfb 1a9b 40a7 f218 2b44 a6b3 #d.$.....@..D+.. 8040858: ac51 5a85 664b a2ad 015e bc98 4422 e9d0 Q..ZKf..^..."D.. 8040868: ad69 7c6a 9420 bc98 36cc fac5 f4cb 6d90 i.j| ....6.....m 8040878: f00f cb64 c0be 8c08 9d62 96ff f91e b048 ..d.....b.....H. 8040888: 8e26 341b d9a5 2a15 f9d4 aeaa 71fb 3075 &..4...*.....qu0 8040898: 6590 6e83 418e 6a82 81ad 94db 6f06 ea49 .e.n.A.j.....oI. 80408a8: ceae a081 914c 14f2 1427 28cd ce1c 5dd9 ....L...'..(...] 80408b8: 9b55 75b5 4acb 6794 5bb0 4394 5618 b5b0 U..u.J.g.[.C.V.. 80408c8: cea4 7548 e152 52f3 3ed9 cedb 29f3 8fd7 ..HuR..R.>...).. 80408d8: f90c b953 f0c3 6f18 9937 6159 4f4a 7191 ..S....o7.YaJO.q 80408e8: 0935 204d 047b c7b6 f9b6 f19e a7a8 c8eb 5.M {........... 80408f8: 9607 5cb0 0bc1 b41c 0922 8902 e0b6 cea4 ...\...."....... 8040908: 9cd6 bc41 d787 364c c339 cf64 83b0 a683 ..A...L69.d..... 8040918: 8d06 e32d 427b 235b 2db0 37fa 2c31 acbb ..-.{B[#.-.71,.. 8040928: 4c51 7d60 1ea5 8d7c 0c23 1097 6a8f b04c QL`}..|.#....jL. 8040938: c8b7 071c 45e2 3915 25a1 68dc 0e84 7557 .....E.9.%.h..Wu 8040948: 9124 8750 6de3 c204 0daa 6ed3 3455 dccc $.P..m.....nU4.. 8040958: d200 3c07 8254 b468 3a0d 1a28 fa74 bd41 ...../Oi.~,..t. 80409e8: 9788 5de6 88f9 8c2c 7e1f b270 2642 d48a ...]..,..~p.B&.. 80409f8: fe39 9652 299b efac bd40 9a86 4c5b c241 9.R..)..@...[LA. 8040a08: 058f 3a65 837c d637 81bf 2bff b4c6 0ae3 ..e:|.7....+.... 8040a18: 76dd 4d5a 6d74 a749 d0ef fe8b d1bb caef .vZMtmI......... 8040a28: efe5 71f4 8a30 86d7 3bd0 1f48 f4da c3c9 ...q0....;H..... 8040a38: d69b 4ee8 a616 6c89 2016 0696 8c19 776e ...N...l. ....nw 8040a48: f100 4d24 55b2 3529 66c6 65f5 8332 a10e ..$M.U)5.f.e2... 8040a58: e9a9 b7b7 21fd 0984 b81a 339a f51e b747 .....!.....3..G. 8040a68: 82df 47ab 0e0d 786f f4d4 8ea3 300e cb91 ...G..ox.....0.. 8040a78: 104d 89d3 4a12 f9c1 9840 faa4 65d1 d2e9 M....J..@....e.. 8040a88: 23a7 26ee 407d 34d2 19a7 8793 48fe a833 .#.&}@.4.....H3. 8040a98: 3403 3463 dfee 1f7f 1359 964b 107e fa59 .4c4....Y.K.~.Y. 8040aa8: 4751 dc19 b867 787a 9b22 de9b 5b0c 43c1 QG..g.zx"....[.C 8040ab8: fd5b b943 74a7 008d 7268 f8db ac83 0e62 [.C..t..hr....b. 8040ac8: aed0 6909 7812 13db 7ed6 8318 8606 aa8c ...i.x...~...... 8040ad8: d645 c663 6313 6d66 d5f1 7075 60d6 fb2d E.c..cfm..up.`-. 8040ae8: ace8 de02 179f a1ed e981 3328 b48f 28e6 ..........(3...( 8040af8: 2070 254e adc0 1fd3 3b07 66c4 153e 07f5 p N%.....;.f>... 8040b08: 2c53 16ac cb01 1acf dfc1 510f d27e 4eb5 S,.........Q~..N 8040b18: b7a4 ebb4 c3a9 71c6 aefc d95f 863c 1c9a .......q.._.<... 8040b28: f215 ffe9 9a03 9fb4 f401 009c 2f00 ............. 08040b35 : 8040b35: 692f 666e 2e6f 7468 6c6d 0000 5448 5054 /info.html..HTTP 8040b45: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8040b55: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8040b65: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8040b75: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8040b85: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8040b95: 6e65 2d74 654c 676e 6874 203a 3031 3839 ent-Length: 1098 8040ba5: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8040bb5: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8040bc5: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 8040bd5: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8040be5: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 8040bf5: 0a04 569d 6edd 36db 7e14 5615 69bb 2881 ...V.n.6.~.V.i.( 8040c05: 766e 6035 8096 2b22 0286 1aeb 1da0 5eb0 nv5`.."+.......^ 8040c15: b40d db44 256c 9352 c728 4bbe adb2 68bb ..D.l%R.(..K...h 8040c25: 0e81 30c1 4114 aed7 827b 6b74 b4b6 d389 ...0.A..{.tk.... 8040c35: a057 68de 21df 272d 9c5e e7ec 3642 c88f W..h.!-'^...B6.. 8040c45: f7f3 ef9d aa1c e57b 3b93 f7eb 6fee 64dc ......{..;...o.d 8040c55: 9343 7167 7e97 c659 20d5 020a 8248 71a7 C.gq.~Y.. ..H..q 8040c65: 1737 b386 c864 4acb 2898 4da8 fc3f 7b08 7...d..J.(.M?..{ 8040c75: edee 98d0 1422 d75f 1472 5f05 5f86 08dc ...."._.r.._._.. 8040c85: 75d7 705e 7b23 0899 a258 1195 2a0a 6eb7 .u^p#{..X....*.n 8040c95: 2246 881d 4956 5cf1 c144 8a48 42cd e697 F"..VI.\D.H..B.. 8040ca5: b9cc 994d 619a 8a94 4c91 e844 1584 a4a9 ..M..a...LD..... 8040cb5: 3c91 ab0b 6784 5a22 c95b 58f9 75e6 973e .<...g"Z[..X.u>. 8040cc5: 4aeb 4e94 70e0 5d19 0b87 4d23 6226 ccfb .J.N.p.]..#M&b.. 8040cd5: 9b4e ed6f b349 8f65 7eed c8f3 361e bb4f N.o.I.e..~...6O. 8040ce5: bf1d cdd7 7aa4 86c8 e8a5 4147 a5ce 4d5a .....z....GA..ZM 8040cf5: 2aaa a560 a2c8 32a0 4c93 4354 0c21 552c .*`....2.LTC!.,U 8040d05: 2949 c30b a4cc b840 8c46 e74d 1f01 ff71 I)....@.F.M...q. 8040d15: 6036 9955 4144 33a9 fab1 c2a0 8ee1 8f7f 6`U.DA.3........ 8040d25: 0785 a7ad 49d3 4ddc 88e5 1925 aaaf 5028 .....I.M..%...(P 8040d35: d47c 25e3 7ff3 2a61 bcfa 4cce f62b 58e5 |..%..a*...L+..X 8040d45: a1a4 05d1 9d2c 09d3 a2c9 fd28 dc56 b3e5 ....,.....(.V... 8040d55: a5d0 c54a 9578 060a bd08 4c8f 340f c2c5 ..J.x......L.4.. 8040d65: c0f1 fb4c 6adb 107c 9930 6722 eaa1 a250 ..L..j|.0."g..P. 8040d75: b33a 75a3 ead6 b823 2236 fd2c 5a69 80c4 :..u..#.6",.iZ.. 8040d85: a96c d8e3 04be 5bba 1f76 1f28 3b34 56cd l......[v.(.4;.V 8040d95: d8f3 a77b 67f3 4075 231d a0d5 f1f2 f6c6 ..{..gu@.#...... 8040da5: a867 936d 3d82 6fb1 3bed b87b 4d5c beaa g.m..=.o.;{.\M.. 8040db5: 4c5e 2791 8e46 a540 05e5 c4a6 eeff 287a ^L.'F.@.......z( 8040dc5: a32b 49cb f9eb e6a7 781b 229d a3e4 9f53 +..I.....x."..S. 8040dd5: 1a9d f7dc 9d90 7f81 e4b3 0145 1de0 336a ..........E...j3 8040de5: 0336 e18b 05da b1de 05d1 8498 88f1 3267 6.............g2 8040df5: 2345 1568 f4f6 8098 0f26 5d7d 6ee6 eefb E#h.....&.}].n.. 8040e05: b7e7 2837 80b7 3e51 455a cb81 1934 80c8 ..7(..Q>ZE..4... 8040e15: b1a1 1a86 3626 dcee 07bd 4345 6ecc e40b ....&6....EC.n.. 8040e25: 5985 735c 9912 e85e e18c 27b0 299f 8969 .Y\s..^....'.)i. 8040e35: cc06 82aa f8c3 c087 0f6b 4f48 8867 d91f ........k.HOg... 8040e45: 9423 0b6b 310d 6444 1a74 d72b c6eb d6f3 #.k..1Ddt.+..... 8040e55: 4819 af5b 2b4a 3481 474a bb42 f80b ec0e .H[.J+.4JGB..... 8040e65: f371 b994 bfc2 9346 50ed 0dd9 8546 aa59 q.....F..P..F.Y. 8040e75: 52e3 0bae 7323 019a a0ee ea73 c4bd 39f6 .R..#s....s....9 8040e85: 7b42 9b03 cd47 b993 4719 9d54 6c8a c6a9 B{..G....GT..l.. 8040e95: a08f 8ecf 67dd bdf6 d063 fda1 fed3 4646 .....g..c.....FF 8040ea5: 5388 ed58 982f 4a29 528d 772c 4bbd 3438 .SX./.)J.R,w.K84 8040eb5: 34db 181e fcb8 4162 bfb1 1239 8565 2cf2 .4....bA..9.e.., 8040ec5: e18b 8df6 0675 bd12 3421 ed9a bd05 279c ....u...!4.....' 8040ed5: 4d3c 61a9 e7cf 8afa da1c 9043 da7e b63c ... 8040f25: 0060 6b07 69d7 9e90 fd8f 6539 800a ec4f `..k.i....9e..O. 8040f35: 3c7b 7847 40fe 5318 7364 cff0 5461 ea93 {..o.K.b....s 8041025: daf5 67c7 09bf e3e8 2fea 307b 75b5 096c ...g...../{0.ul. 8041035: 0000 5448 5054 312f 302e 3220 3030 4f20 ..HTTP/1.0 200 O 8041045: 0d4b 430a 6e6f 6574 746e 542d 7079 3a65 K..Content-Type: 8041055: 6574 7478 682f 6d74 0d6c 0d0a 000a 227b text/html.....{" 8041065: 4341 3a22 0022 2c22 4422 2243 223a 2200 AC":".","DC":"." 8041075: 222c 6e69 665f 6572 2271 223a 2200 222c ,"in_freq":"."," 8041085: 756f 5f74 7266 7165 3a22 0022 2c22 7022 out_freq":".","p 8041095: 7277 3a22 0022 2c22 6c22 6e69 5f65 6166 wr":".","line_fa 80410a5: 6c69 3a22 0022 2c22 6c22 776f 625f 7461 il":".","low_bat 80410b5: 6574 7972 3a22 0022 2c22 6222 7461 635f tery":".","bat_c 80410c5: 7061 3a22 0022 2c22 6922 6e6e 7265 745f ap":".","inner_t 80410d5: 6d65 2270 223a 2200 222c 6162 5f74 6974 emp":".","bat_ti 80410e5: 656d 6c5f 6665 2274 223a 2200 222c 6964 me_left":".","di 80410f5: 2231 223a 2200 222c 6f72 2231 223a 2200 1":".","ro1":"." 8041105: 222c 6f72 2232 223a 2200 222c 6f63 6e6e ,"ro2":".","conn 8041115: 6365 5f74 6f6d 696e 6f74 2272 223a 2200 ect_monitor":"." 8041125: 222c 6c61 7261 226d 223a 2200 222c 656e ,"alarm":".","ne 8041135: 7374 7465 6974 676e 5f73 6863 6e61 6567 tsettings_change 8041145: 2264 223a 2200 007d 227b 6572 6461 635f d":"."}.{"read_c 8041155: 6d6f 756d 696e 7974 3a22 0022 2c22 7722 ommunity":".","w 8041165: 6972 6574 635f 6d6f 756d 696e 7974 3a22 rite_community": 8041175: 0022 2c22 6d22 6e61 6761 7265 5049 3a22 ".","managerIP": 8041185: 0022 2c22 6d22 6e61 6761 7265 5049 2232 ".","managerIP2" 8041195: 223a 2200 222c 616d 616e 6567 4972 3350 :".","managerIP3 80411a5: 3a22 0022 2c22 6d22 6e61 6761 7265 5049 ":".","managerIP 80411b5: 2234 223a 2200 222c 616d 616e 6567 4972 4":".","managerI 80411c5: 3550 3a22 0022 2c22 6922 6170 6464 2272 P5":".","ipaddr" 80411d5: 223a 2200 222c 7767 3a22 0022 2c22 6d22 :".","gw":".","m 80411e5: 7361 226b 223a 2200 222c 6864 7063 3a22 ask":".","dhcp": 80411f5: 2c00 7222 5f73 6573 7672 7265 3a22 0022 .,"rs_server":". 8041205: 2c22 7222 5f73 6f70 7472 3a22 0022 2c22 ","rs_port":".", 8041215: 7222 5f73 7770 2264 223a 2200 222c 7372 "rs_pwd":".","rs 8041225: 6b5f 7965 3a22 0022 2c22 7222 5f73 6e65 _key":".","rs_en 8041235: 6261 656c 2264 003a 222c 6164 6574 3a22 abled":.,"date": 8041245: 0022 2c22 7422 6d69 2265 223a 2200 222c ".","time":"."," 8041255: 746e 2270 223a 2200 222c 746e 7370 7265 ntp":".","ntpser 8041265: 6976 2270 223a 2200 222c 7475 2263 223a vip":".","utc":" 8041275: 2200 222c 7475 226d 223a 2200 222c 616c .","utm":".","la 8041285: 7473 7973 636e 6974 656d 3a22 0022 227b stsynctime":".{" 8041295: 7075 6974 656d 3a22 0022 2c22 6d22 646f uptime":".","mod 80412a5: 6c65 3a22 0022 2c22 7022 6f72 6164 6574 el":".","prodate 80412b5: 3a22 0022 2c22 6622 7677 7265 6973 6e6f ":".","fwversion 80412c5: 3a22 0022 2c22 6d22 6361 6461 7264 3a22 ":".","macaddr": 80412d5: 0022 2c22 7322 7265 6f6e 3a22 0022 2c22 ".","serno":".", 80412e5: 6f22 6e77 7265 3a22 0022 2c22 7322 7379 "owner":".","sys 80412f5: 6f4c 6163 6974 6e6f 3a22 0022 2c22 6322 Location":".","c 8041305: 6d6f 656d 746e 3a22 0022 2c22 7522 7370 omment":".","ups 8041315: 6d5f 646f 6c65 3a22 0022 2c22 7522 7370 _model":".","ups 8041325: 665f 7677 7265 6973 6e6f 3a22 0022 6552 _fwversion":".Re 8041335: 6f62 746f 6154 6b73 7400 7063 7069 745f bootTask.tcpip_t 8041345: 7268 6165 0064 0400 hread.. 0804134c : 804134c: 0004 0006 000c 0005 0019 0010 0006 0008 ................ 804135c: 0014 000a 001e 0032 0005 0009 0032 0019 ......2.....2... 0804136c : 804136c: 001c 0020 0094 001c 0010 0010 002c 0014 .. .........,... 804137c: 0014 0010 0020 0010 0024 0080 0010 0614 .... ...$....... 0804138c : 804138c: 1084 2001 108c 2001 107c 2001 1090 2001 ... ... |.. ... 0804139c : 804139c: 0201 0403 0605 0707 0707 0707 0307 ............. 080413a9 : 80413a9: 0603 180c 6030 ff78 ....0`x 080413b0 : 80413b0: ffff ffff .... 080413b4 : 80413b4: 0000 0000 .... 080413b8 : 80413b8: 0000 0000 .... 080413bc : 80413bc: 1db9 0803 186d 0803 1dfd 0803 1981 0803 ....m........... 80413cc: 0001 0000 .... 080413d0 : 80413d0: 1648 2000 1648 2000 H.. H.. 080413d8 : 80413d8: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 80413e8: 0002 0001 1508 0804 1630 0804 ........0... 080413f4 : 80413f4: 1c00 0804 17c8 0804 1610 2000 1ca4 0804 ........... .... 8041404: 15c8 0804 1798 0804 19f4 0804 1564 0804 ............d... 08041414 : 8041414: 1678 2000 1678 2000 1678 2000 1678 2000 x.. x.. x.. x.. 8041424: 1678 2000 1678 2000 1678 2000 1678 2000 x.. x.. x.. x.. 8041434: 1678 2000 1678 2000 1678 2000 1678 2000 x.. x.. x.. x.. 8041444: 1678 2000 x.. 08041448 : 8041448: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8041458: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041468: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041478: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041488: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041498: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80414a8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80414b8: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80414c8: 0000 0000 .... 080414cc : 80414cc: 5146 4e44 752d 6b6e 0000 0000 FQDN-unk.... 080414d8 : 80414d8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 080414e8 : 80414e8: 14c1 0803 14e1 0803 140f 0803 1413 0803 ................ 80414f8: 0001 0000 .... 080414fc : 80414fc: 0000 0000 .... 08041500 : 8041500: 0001 0000 0002 0000 ........ 08041508 : 8041508: 0001 0000 .... 0804150c : 804150c: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 804151c: 0002 0001 1bfc 0804 19f0 0804 ............ 08041528 : 8041528: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041538: 0005 0000 0006 0000 0007 0000 000b 0000 ................ 08041548 : 8041548: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041558: 0002 0008 1528 0804 13f4 0804 ....(....... 08041564 : 8041564: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041574: 0002 001c 1ae8 0804 1980 0804 ............ 08041580 : 8041580: 1d2d 0803 1765 0803 140f 0803 1413 0803 -...e........... 8041590: 0001 0000 .... 08041594 : 8041594: 16d4 0804 16d4 0804 16d4 0804 16d4 0804 ................ 80415a4: 16d4 0804 16d4 0804 16d4 0804 ............ 080415b0 : 80415b0: 0002 0000 .... 080415b4 : 80415b4: 161c 0804 161c 0804 161c 0804 161c 0804 ................ 80415c4: 162c 2000 ,.. 080415c8 : 80415c8: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 80415d8: 0002 001a 1894 0804 1724 0804 ........$... 080415e4 : 80415e4: 1c41 0803 14f5 0803 15b5 0803 1413 0803 A............... 80415f4: 0001 0000 .... 080415f8 : 80415f8: 0001 0000 0002 0000 ........ 08041600 : 8041600: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041610: 0002 0004 14d8 0804 17b8 0804 ............ 0804161c : 804161c: 1809 0803 1835 0803 140f 0803 1413 0803 ....5........... 804162c: 0001 0000 .... 08041630 : 8041630: 16b8 0804 .... 08041634 : 8041634: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8041644: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041654: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041664: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041674: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041684: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8041694: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80416a4: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 80416b4: 0000 0000 .... 080416b8 : 80416b8: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 80416c8: 0002 0003 1818 0804 1910 0804 ............ 080416d4 : 80416d4: 1415 0803 2099 0803 1ba5 0803 1e45 0803 ..... ......E... 80416e4: 0001 0000 .... 080416e8 : 80416e8: 1580 0804 1580 0804 1580 0804 1580 0804 ................ 80416f8: 1580 0804 1580 0804 1580 0804 1580 0804 ................ 8041708: 1580 0804 1580 0804 1580 0804 1580 0804 ................ 8041718: 1778 2000 1580 0804 1580 0804 x.. ........ 08041724 : 8041724: 1bcc 0804 1bcc 0804 1bcc 0804 1bcc 0804 ................ 8041734: 1bcc 0804 1bcc 0804 1bcc 0804 1bcc 0804 ................ 8041744: 1bcc 0804 1bcc 0804 1bcc 0804 1bcc 0804 ................ 8041754: 1bcc 0804 1bcc 0804 1bcc 0804 1bcc 0804 ................ 8041764: 1bcc 0804 1bcc 0804 1bcc 0804 1bcc 0804 ................ 8041774: 1bcc 0804 1bcc 0804 1bcc 0804 1bcc 0804 ................ 8041784: 1bcc 0804 1bcc 0804 ........ 0804178c : 804178c: 0004 0000 .... 08041790 : 8041790: 14e8 0804 1818 2000 ....... 08041798 : 8041798: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 80417a8: 0002 000f 1944 0804 16e8 0804 ....D....... 080417b4 : 80417b4: 0000 0000 .... 080417b8 : 80417b8: 18dc 2000 18dc 2000 18dc 2000 18dc 2000 ... ... ... ... 080417c8 : 80417c8: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 80417d8: 0002 0002 1500 0804 1790 0804 ............ 080417e4 : 80417e4: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80417f4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8041804: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8041814: 000d 0000 .... 08041818 : 8041818: 0001 0000 0002 0000 0003 0000 ............ 08041824 : 8041824: 17a0 2000 17a0 2000 17a0 2000 17a0 2000 ... ... ... ... 8041834: 17a0 2000 ... 08041838 : 8041838: 15e4 0804 15e4 0804 15e4 0804 15e4 0804 ................ 8041848: 15e4 0804 15e4 0804 15e4 0804 15e4 0804 ................ 8041858: 15e4 0804 15e4 0804 15e4 0804 15e4 0804 ................ 8041868: 15e4 0804 15e4 0804 15e4 0804 15e4 0804 ................ 8041878: 15e4 0804 15e4 0804 15e4 0804 17cc 2000 ............... 8041888: 1834 2000 15f4 2000 15e4 0804 4.. ... .... 08041894 : 8041894: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80418a4: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80418b4: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80418c4: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80418d4: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 80418e4: 0015 0000 0016 0000 0017 0000 0018 0000 ................ 80418f4: 0019 0000 001a 0000 ........ 080418fc : 80418fc: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 804190c: 0005 0000 .... 08041910 : 8041910: 17ec 2000 17ec 2000 17ec 2000 ... ... ... 0804191c : 804191c: 1748 2000 1748 2000 1748 2000 1748 2000 H.. H.. H.. H.. 804192c: 1748 2000 H.. 08041930 : 8041930: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041940: 0005 0000 .... 08041944 : 8041944: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041954: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8041964: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8041974: 000d 0000 000e 0000 000f 0000 ............ 08041980 : 8041980: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 8041990: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 80419a0: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 80419b0: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 80419c0: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 80419d0: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 80419e0: 13bc 0804 13bc 0804 13bc 0804 13bc 0804 ................ 080419f0 : 80419f0: 1548 0804 H... 080419f4 : 80419f4: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041a04: 0002 0005 18fc 0804 15b4 0804 ............ 08041a10 : 8041a10: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041a20: 0002 000d 17e4 0804 1414 0804 ............ 08041a2c : 8041a2c: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041a3c: 0002 0016 1b74 0804 1c4c 0804 ....t...L... 08041a48 : 8041a48: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041a58: 0002 0002 15f8 0804 13d0 0804 ............ 08041a64 : 8041a64: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041a74: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8041a84: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8041a94: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8041aa4: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8041ab4: 0015 0000 0016 0000 0017 0000 ............ 08041ac0 : 8041ac0: 776c 5049 0800 lwIP. 08041ac5 : 8041ac5: 0008 0700 ... 08041ac8 : 8041ac8: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041ad8: 0002 0005 1c38 0804 1824 0804 ....8...$... 08041ae4 : 8041ae4: 0000 0000 .... 08041ae8 : 8041ae8: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041af8: 0005 0000 0006 0000 0008 0000 0009 0000 ................ 8041b08: 000a 0000 000b 0000 000c 0000 000d 0000 ................ 8041b18: 000e 0000 000f 0000 0010 0000 0011 0000 ................ 8041b28: 0012 0000 0013 0000 0014 0000 0015 0000 ................ 8041b38: 0016 0000 0018 0000 0019 0000 001a 0000 ................ 8041b48: 001b 0000 001c 0000 001d 0000 001e 0000 ................ 08041b58 : 8041b58: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041b68: 0005 0000 0006 0000 0007 0000 ............ 08041b74 : 8041b74: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041b84: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8041b94: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8041ba4: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8041bb4: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8041bc4: 0015 0000 0016 0000 ........ 08041bcc : 8041bcc: 163d 0803 1669 0803 140f 0803 1413 0803 =...i........... 8041bdc: 0001 0000 .... 08041be0 : 8041be0: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041bf0: 0002 0002 17c0 2000 1cc0 0804 ....... .... 08041bfc : 8041bfc: 0001 0000 .... 08041c00 : 8041c00: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041c10: 0002 0007 1b58 0804 1594 0804 ....X....... 08041c1c : 8041c1c: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041c2c: 0002 0005 1930 0804 191c 0804 ....0....... 08041c38 : 8041c38: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041c48: 0005 0000 .... 08041c4c : 8041c4c: 16a0 2000 16a0 2000 16a0 2000 16a0 2000 ... ... ... ... 8041c5c: 16a0 2000 16a0 2000 16a0 2000 16a0 2000 ... ... ... ... 8041c6c: 16a0 2000 16a0 2000 16a0 2000 16a0 2000 ... ... ... ... 8041c7c: 16a0 2000 16a0 2000 16a0 2000 16a0 2000 ... ... ... ... 8041c8c: 16a0 2000 16a0 2000 16a0 2000 16a0 2000 ... ... ... ... 8041c9c: 16a0 2000 16a0 2000 ... ... 08041ca4 : 8041ca4: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041cb4: 0002 0017 1a64 0804 1838 0804 ....d...8... 08041cc0 : 8041cc0: 150c 0804 1d70 0804 ....p... 08041cc8 : 8041cc8: 0001 0000 0003 0000 0006 0000 0001 0000 ................ 08041cd8 : 8041cd8: 0000 0000 .... 08041cdc : 8041cdc: 7570 6c62 6369 ff00 public. 08041ce3 : 8041ce3: ffff ffff ffff ...... 08041ce9 : 8041ce9: 0000 0000 0000 7445 5f68 6669 2000 7325 ......Eth_if. %s 8041cf9: 0d0a 4400 4348 4350 696c 6e65 0074 6577 ...DHCPClient.we 8041d09: 5262 6965 696e 0074 6552 6e69 7469 6557 bReinit.ReinitWe 8041d19: 0062 2000 b.. 08041d1c : 8041d1c: 1e20 0804 ... 08041d20 : 8041d20: 1dac 0804 .... 08041d24 : 8041d24: 1e40 0804 1e40 0804 1e40 0804 1e40 0804 @...@...@...@... 8041d34: 1e40 0804 1e40 0804 1e40 0804 1e40 0804 @...@...@...@... 8041d44: 1e40 0804 1e40 0804 1e40 0804 1e40 0804 @...@...@...@... 8041d54: 1e40 0804 1e40 0804 1e40 0804 1e40 0804 @...@...@...@... 8041d64: 1e40 0804 1e40 0804 @...@... 08041d6c : 8041d6c: 038f 0000 .... 08041d70 : 8041d70: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041d80: 0002 0001 1e1c 0804 1d1c 0804 ............ 08041d8c : 8041d8c: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041d9c: 0002 0001 1e18 0804 1d20 0804 ........ ... 08041da8 : 8041da8: 1e74 0804 t... 08041dac : 8041dac: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041dbc: 0002 0012 1dd0 0804 1d24 0804 ........$... 08041dc8 : 8041dc8: a318 0000 .... 08041dcc : 8041dcc: 1e58 0804 X... 08041dd0 : 8041dd0: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8041de0: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8041df0: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8041e00: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8041e10: 0011 0000 0012 0000 ........ 08041e18 : 8041e18: 0001 0000 .... 08041e1c : 8041e1c: 0001 0000 .... 08041e20 : 8041e20: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041e30: 0002 0001 1dc8 0804 1da8 0804 ............ 08041e3c : 8041e3c: 0003 0000 .... 08041e40 : 8041e40: 5779 0803 5739 0803 5909 0803 5895 0803 yW..9W...Y...X.. 8041e50: 0001 0000 .... 08041e54 : 8041e54: 1d8c 0804 .... 08041e58 : 8041e58: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041e68: 0002 0001 1e3c 0804 1e54 0804 ....<...T... 08041e74 : 8041e74: 1407 0803 140d 0803 140f 0803 1413 0803 ................ 8041e84: 0002 0001 1d6c 0804 1dcc 0804 3025 6432 ....l.......%02d 8041e94: 252e 3230 2e64 3025 6432 2520 3230 3a64 .%02d.%02d %02d: 8041ea4: 3025 6432 253a 3230 0064 6425 252e 2e64 %02d:%02d.%d.%d. 8041eb4: 6425 2520 3a64 6425 253a 2064 0d0a 0000 %d %d:%d:%d .... 8041ec4: 666e 0000 6e69 7469 0079 0000 6e61 0000 nf..inity...an.. 8041ed4: 4241 4443 4645 0000 6261 6463 6665 0000 ABCDEF..abcdef.. 8041ee4: 3130 3332 3534 3736 3938 0000 0043 0000 0123456789..C... 8041ef4: 4f50 4953 0058 0000 0000 0000 002e 0000 POSIX........... 08041f04 <_init>: 8041f04: b5f8 push {r3, r4, r5, r6, r7, lr} 8041f06: bf00 nop 8041f08: bcf8 pop {r3, r4, r5, r6, r7} 8041f0a: bc08 pop {r3} 8041f0c: 469e mov lr, r3 8041f0e: 4770 bx lr 08041f10 <_fini>: 8041f10: b5f8 push {r3, r4, r5, r6, r7, lr} 8041f12: bf00 nop 8041f14: bcf8 pop {r3, r4, r5, r6, r7} 8041f16: bc08 pop {r3} 8041f18: 469e mov lr, r3 8041f1a: 4770 bx lr