⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radiocontrol.lst

📁 adhoc汇聚节点程序源代码(点对多点)——for atmega128
💻 LST
📖 第 1 页 / 共 3 页
字号:
 251:radiocontrol.c **** 		}
 252:radiocontrol.c **** 		if (carrSenTime > 0)								// 调用ADC采集监听数据
 540               	.LM85:
 541 01f8 8091 0000 		lds r24,carrSenTime
 542 01fc 9091 0000 		lds r25,(carrSenTime)+1
 543 0200 892B      		or r24,r25
 544 0202 09F4      		brne .+2
 545 0204 83C0      		rjmp .L21
 253:radiocontrol.c **** 			ADCGetData(OS_ADC_CC_RSSI_PORT);				
 547               	.LM86:
 548 0206 80E0      		ldi r24,lo8(0)
 549 0208 0E94 0000 		call ADCGetData
 550 020c 7FC0      		rjmp .L21
 551               	.L29:
 254:radiocontrol.c **** 	} else if (state == SYNC_START) {						// 接收同步字
 553               	.LM87:
 554 020e 8330      		cpi r24,lo8(3)
 555 0210 09F0      		breq .+2
 556 0212 61C0      		rjmp .L37
 557               	.LBB2:
 255:radiocontrol.c **** 		uint8_t i;
 256:radiocontrol.c **** 		if (data == 0xaa || data == 0x55) {
 559               	.LM88:
 560 0214 2A3A      		cpi r18,lo8(-86)
 561 0216 11F0      		breq .L39
 562 0218 2535      		cpi r18,lo8(85)
 563 021a 19F4      		brne .L38
 564               	.L39:
 257:radiocontrol.c **** 			SOFCount = 0;									// 再收到同步字节则丢弃
 566               	.LM89:
 567 021c 1092 0000 		sts SOFCount,__zero_reg__
 568 0220 75C0      		rjmp .L21
 569               	.L38:
 570               	.LBB3:
 258:radiocontrol.c **** 		} else {											// 进行同步
 259:radiocontrol.c ****             uint8_t usTmp;
 260:radiocontrol.c ****             SOFCount++;
 572               	.LM90:
 573 0222 8091 0000 		lds r24,SOFCount
 574 0226 8F5F      		subi r24,lo8(-(1))
 575 0228 8093 0000 		sts SOFCount,r24
 261:radiocontrol.c ****             switch (SOFCount) {
 577               	.LM91:
 578 022c 9927      		clr r25
 579 022e 8230      		cpi r24,2
 580 0230 9105      		cpc r25,__zero_reg__
 581 0232 61F0      		breq .L43
 582 0234 8330      		cpi r24,3
 583 0236 9105      		cpc r25,__zero_reg__
 584 0238 1CF4      		brge .L55
 585 023a 0197      		sbiw r24,1
 586 023c 21F0      		breq .L42
 587 023e 48C0      		rjmp .L54
 588               	.L55:
 589 0240 0397      		sbiw r24,3
 590 0242 C9F0      		breq .L46
 591 0244 45C0      		rjmp .L54
 592               	.L42:
 262:radiocontrol.c ****             case 1:
 263:radiocontrol.c **** 				RxShiftBuf.MSB = data;
 594               	.LM92:
 595 0246 2093 0000 		sts RxShiftBuf+1,r18
 264:radiocontrol.c **** 				break;
 597               	.LM93:
 598 024a 60C0      		rjmp .L21
 599               	.L43:
 265:radiocontrol.c ****             case 2:
 266:radiocontrol.c **** 				RxShiftBuf.LSB = data;
 601               	.LM94:
 602 024c 2093 0000 		sts RxShiftBuf,r18
 267:radiocontrol.c **** 				if (RxShiftBuf.W == SYNC_WORD) {
 604               	.LM95:
 605 0250 8091 0000 		lds r24,RxShiftBuf
 606 0254 9091 0000 		lds r25,(RxShiftBuf)+1
 607 0258 8C5C      		subi r24,lo8(13260)
 608 025a 9343      		sbci r25,hi8(13260)
 609 025c 09F0      		breq .+2
 610 025e 56C0      		rjmp .L21
 268:radiocontrol.c **** 					state = RECEIVE;
 612               	.LM96:
 613 0260 84E0      		ldi r24,lo8(4)
 614 0262 8093 0000 		sts state,r24
 269:radiocontrol.c **** 					RxBitOffset = 0;						// 通知上层检测到起始符号且同步完成
 616               	.LM97:
 617 0266 1092 0000 		sts RxBitOffset,__zero_reg__
 270:radiocontrol.c **** 					if (PhysicalStartSymDetected() == FAIL) {
 619               	.LM98:
 620 026a 0E94 0000 		call PhysicalStartSymDetected
 621 026e 8823      		tst r24
 622 0270 09F0      		breq .+2
 623 0272 4CC0      		rjmp .L21
 624 0274 2DC0      		rjmp .L54
 625               	.L46:
 271:radiocontrol.c **** 						RadiocontrolIdle();
 272:radiocontrol.c **** 					}
 273:radiocontrol.c **** 				} 
 274:radiocontrol.c **** 				break;            
 275:radiocontrol.c ****             case 3: 
 276:radiocontrol.c **** 				usTmp = data;
 627               	.LM99:
 628 0276 322F      		mov r19,r18
 277:radiocontrol.c **** 				for(i = 0; i < 8; i++) {
 630               	.LM100:
 631 0278 40E0      		ldi r20,lo8(0)
 632               	.L53:
 278:radiocontrol.c **** 					RxShiftBuf.W <<= 1;
 634               	.LM101:
 635 027a 8091 0000 		lds r24,RxShiftBuf
 636 027e 9091 0000 		lds r25,(RxShiftBuf)+1
 637 0282 880F      		lsl r24
 638 0284 991F      		rol r25
 639 0286 9093 0000 		sts (RxShiftBuf)+1,r25
 640 028a 8093 0000 		sts RxShiftBuf,r24
 279:radiocontrol.c **** 					if(usTmp & 0x80)
 642               	.LM102:
 643 028e 37FF      		sbrs r19,7
 644 0290 05C0      		rjmp .L50
 280:radiocontrol.c **** 						RxShiftBuf.W |= 0x1;
 646               	.LM103:
 647 0292 8160      		ori r24,lo8(1)
 648 0294 9093 0000 		sts (RxShiftBuf)+1,r25
 649 0298 8093 0000 		sts RxShiftBuf,r24
 650               	.L50:
 281:radiocontrol.c **** 					usTmp <<= 1;
 652               	.LM104:
 653 029c 330F      		lsl r19
 282:radiocontrol.c **** 					if (RxShiftBuf.W == SYNC_WORD) {
 655               	.LM105:
 656 029e 8091 0000 		lds r24,RxShiftBuf
 657 02a2 9091 0000 		lds r25,(RxShiftBuf)+1
 658 02a6 8C5C      		subi r24,lo8(13260)
 659 02a8 9343      		sbci r25,hi8(13260)
 660 02aa 71F4      		brne .L49
 283:radiocontrol.c **** 						state = RECEIVE;
 662               	.LM106:
 663 02ac 84E0      		ldi r24,lo8(4)
 664 02ae 8093 0000 		sts state,r24
 284:radiocontrol.c **** 						RxBitOffset = 7-i;
 666               	.LM107:
 667 02b2 87E0      		ldi r24,lo8(7)
 668 02b4 841B      		sub r24,r20
 669 02b6 8093 0000 		sts RxBitOffset,r24
 285:radiocontrol.c **** 						RxShiftBuf.LSB = data;				// 通知上层检测到起始符号且同步完成
 671               	.LM108:
 672 02ba 2093 0000 		sts RxShiftBuf,r18
 286:radiocontrol.c **** 						if (PhysicalStartSymDetected() == FAIL) {
 674               	.LM109:
 675 02be 0E94 0000 		call PhysicalStartSymDetected
 676 02c2 8823      		tst r24
 677 02c4 19F5      		brne .L21
 678 02c6 04C0      		rjmp .L54
 679               	.L49:
 681               	.LM110:
 682 02c8 4F5F      		subi r20,lo8(-(1))
 683 02ca 4830      		cpi r20,lo8(8)
 684 02cc B0F2      		brlo .L53
 287:radiocontrol.c **** 							RadiocontrolIdle();
 288:radiocontrol.c **** 						}
 289:radiocontrol.c **** 						break;
 290:radiocontrol.c **** 					}
 291:radiocontrol.c **** 				}
 292:radiocontrol.c **** 				break;
 686               	.LM111:
 687 02ce 1EC0      		rjmp .L21
 688               	.L54:
 293:radiocontrol.c ****             default:
 294:radiocontrol.c **** 				RadiocontrolIdle();
 690               	.LM112:
 691 02d0 0E94 0000 		call RadiocontrolIdle
 692               	.LBE3:
 693               	.LBE2:
 295:radiocontrol.c **** 				break;
 695               	.LM113:
 696 02d4 1BC0      		rjmp .L21
 697               	.L37:
 296:radiocontrol.c ****             }
 297:radiocontrol.c **** 		}
 298:radiocontrol.c **** 	}else if (state == RECEIVE) {							// 根据偏移量接收数据
 699               	.LM114:
 700 02d6 8430      		cpi r24,lo8(4)
 701 02d8 C9F4      		brne .L21
 702               	.LBB4:
 299:radiocontrol.c **** 		char Byte;
 300:radiocontrol.c **** 		RxShiftBuf.W <<=8;									// 移去已经接收的字节
 704               	.LM115:
 705 02da 8091 0000 		lds r24,RxShiftBuf
 706 02de 9091 0000 		lds r25,(RxShiftBuf)+1
 707 02e2 982F      		mov r25,r24
 708 02e4 8827      		clr r24
 709 02e6 9093 0000 		sts (RxShiftBuf)+1,r25
 710 02ea 8093 0000 		sts RxShiftBuf,r24
 301:radiocontrol.c **** 		RxShiftBuf.LSB = data;								// 存入刚刚收到的字节到低八位
 712               	.LM116:
 713 02ee 2093 0000 		sts RxShiftBuf,r18
 302:radiocontrol.c **** 		Byte = (RxShiftBuf.W >> RxBitOffset);				// 根据偏移量取出字节
 715               	.LM117:
 716 02f2 8091 0000 		lds r24,RxShiftBuf
 717 02f6 9091 0000 		lds r25,(RxShiftBuf)+1
 718 02fa 0090 0000 		lds r0,RxBitOffset
 719 02fe 02C0      		rjmp 2f
 720 0300 9695      	1:	lsr r25
 721 0302 8795      		ror r24
 722 0304 0A94      	2:	dec r0
 723 0306 E2F7      		brpl 1b
 303:radiocontrol.c **** 
 304:radiocontrol.c **** 		PhysicalRxByteDone(Byte);							// 通知上层处理接收到的字节
 725               	.LM118:
 726 0308 0E94 0000 		call PhysicalRxByteDone
 727               	.L21:
 728               	.LBE4:
 729               	/* epilogue: frame size=0 */
 730 030c FF91      		pop r31
 731 030e EF91      		pop r30
 732 0310 BF91      		pop r27
 733 0312 AF91      		pop r26
 734 0314 9F91      		pop r25
 735 0316 8F91      		pop r24
 736 0318 7F91      		pop r23
 737 031a 6F91      		pop r22
 738 031c 5F91      		pop r21
 739 031e 4F91      		pop r20
 740 0320 3F91      		pop r19
 741 0322 2F91      		pop r18
 742 0324 0F90      		pop __tmp_reg__
 743 0326 0FBE      		out __SREG__,__tmp_reg__
 744 0328 0F90      		pop __tmp_reg__
 745 032a 1F90      		pop __zero_reg__
 746 032c 1895      		reti
 747               	/* epilogue end (size=17) */
 748               	/* function __vector_17 size 248 (214) */
 757               		.comm state,1,1
 758               		.comm carrSenTime,2,1
 759               		.comm csVal1,2,1
 760               		.comm csValAve,2,1
 761               		.comm extFlag,1,1
 762               		.comm nextByte,1,1
 763               		.lcomm txCount,1
 764               		.comm bManchesterBad,1,1
 765               		.comm bInvertRxData,1,1
 766               		.comm bRSSIEnable,1,1
 767               		.comm PreambleCount,1,1
 768               		.comm SOFCount,1,1
 769               		.comm RxShiftBuf,2,1
 770               		.comm RxBitOffset,1,1
 771               		.comm LocalAddr,2,1
 788               		.text
 790               	Letext:
 791               	/* File "radiocontrol.c": code  412 = 0x019c ( 371), prologues  17, epilogues  24 */
DEFINED SYMBOLS
                            *ABS*:00000000 radiocontrol.c
                            *ABS*:0000003f __SREG__
                            *ABS*:0000003e __SP_H__
                            *ABS*:0000003d __SP_L__
                            *ABS*:00000000 __tmp_reg__
                            *ABS*:00000001 __zero_reg__
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:79     .data:00000000 start
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:86     .text:00000000 RadiocontrolIdle
                            *COM*:00000001 state
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:144    .text:00000034 RadiocontrolInit
                            *COM*:00000001 bInvertRxData
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:189    .text:00000064 RadiocontrolSleep
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:223    .text:0000007e RadiocontrolCarrierSenseStart
                            *COM*:00000001 extFlag
                            *COM*:00000002 carrSenTime
                            *COM*:00000002 csVal1
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:274    .text:000000b8 RadiocontrolRSSIADCDataReady
                            *COM*:00000002 csValAve
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:331    .text:00000104 RadiocontrolStartTx
                            *COM*:00000001 nextByte
                             .bss:00000000 txCount
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:393    .text:0000013e RadiocontrolTxNextByte
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:413    .text:00000148 __vector_17
                            *COM*:00000001 bManchesterBad
                            *COM*:00000001 PreambleCount
                            *COM*:00000001 SOFCount
                            *COM*:00000002 RxShiftBuf
                            *COM*:00000001 RxBitOffset
                            *COM*:00000001 bRSSIEnable
                            *COM*:00000002 LocalAddr
C:\DOCUME~1\xiapeng\LOCALS~1\Temp/ccwnbaaa.s:790    .text:0000032e Letext

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
CC1000ControlStdControlStart
CC1000ControlRxMode
OSH_MAKE_MISO_INPUT
OSH_MAKE_MOSI_INPUT
OSH_MAKE_SPI_SCK_INPUT
CC1000ControlStdControlInit
CC1000ControlSelectLock
CC1000ControlGetLOStatus
ADCBindPort
ADCControlInit
CC1000ControlStdControlStop
MACChannelBusy
MACChannelIdle
CC1000ControlTxMode
OSH_MAKE_MISO_OUTPUT
OSH_MAKE_MOSI_OUTPUT
PhysicalTxByteReady
ADCGetData
PhysicalStartSymDetected
PhysicalRxByteDone

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -