📄 board.s
字号:
; EN_RX(); //使能串口接收
lds R24,193
ori R24,16
sts 193,R24
.dbline 528
; EN_RX_INT(); //使能串口接收中断
lds R24,193
ori R24,128
sts 193,R24
.dbline -2
L84:
adiw R28,1
rcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r size 22 c
.dbsym r txBuffer 20 pc
.dbend
.dbfunc e Uart_SendPacket _Uart_SendPacket fV
.even
_Uart_SendPacket::
.dbline -1
.dbline 541
; }
;
;
; /*
; ************************************************************
; *Description:启动串口发送中断函数
; *Arguments :none
; *Returns :none
; *Notes :
; ************************************************************
; */
; void Uart_SendPacket (void)
; {
.dbline 542
; EN_TX_INT();
lds R24,193
ori R24,32
sts 193,R24
.dbline 544
;
; RF_Sts_ToRX();
rcall _RF_Sts_ToRX
.dbline -2
L85:
.dbline 0 ; func end
ret
.dbend
.dbfunc e PrintSysInfo _PrintSysInfo fV
.even
_PrintSysInfo::
.dbline -1
.dbline 555
; }
; /*
; ************************************************************
; *Description:打印系统信息
; *Arguments :none
; *Returns :none
; *Notes :
; ************************************************************
; */
; void PrintSysInfo(void)
; {
.dbline 556
; printf("**************************\n");
ldi R16,<L87
ldi R17,>L87
rcall _printf
.dbline 557
; printf("*CC1100_TestBoard!\n");
ldi R16,<L88
ldi R17,>L88
rcall _printf
.dbline 558
; printf("*Build date : %s\n",__DATE__);
ldi R18,<L90
ldi R19,>L90
ldi R16,<L89
ldi R17,>L89
rcall _printf
.dbline 559
; printf("*Build time : %s\n",__TIME__);
ldi R18,<L92
ldi R19,>L92
ldi R16,<L91
ldi R17,>L91
rcall _printf
.dbline 560
; printf("*RF : %d MHz\n",RF_CENTER);
ldi R18,429
ldi R19,1
ldi R16,<L93
ldi R17,>L93
rcall _printf
.dbline 561
; printf("*Baud rate : %u BPS\n",Sys_Set[Baud_Set_Num].baud);
lds R2,_Baud_Set_Num
ldi R24,8
mul R24,R2
movw R30,R0
ldi R24,<_Sys_Set+6
ldi R25,>_Sys_Set+6
add R30,R24
adc R31,R25
lpm R18,Z+
lpm R19,Z
ldi R16,<L94
ldi R17,>L94
rcall _printf
.dbline 562
; printf("*Chanel : %d\n",Chno_Set_Num);
lds R18,_Chno_Set_Num
clr R19
ldi R16,<L96
ldi R17,>L96
rcall _printf
.dbline 563
; printf("**************************\n");
ldi R16,<L87
ldi R17,>L87
rcall _printf
.dbline -2
L86:
.dbline 0 ; func end
ret
.dbend
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L98:
.blkb 1
.area idata
.byte 16
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
.area text(rom, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
.dbfunc e Key_Scan _Key_Scan fc
.dbsym s key_old_val L98 c
; key_new_val -> R16
.even
_Key_Scan::
.dbline -1
.dbline 574
; }
; /*
; ************************************************************
; *Description:按键扫描处理
; *Arguments :none
; *Returns :none
; *Notes :
; ************************************************************
; */
; INT8U Key_Scan(void)
; {
.dbline 578
; static INT8U key_old_val=POPE;
; INT8U key_new_val;
;
; key_new_val=KEY_STATUS;
in R16,0x9
andi R16,16
.dbline 580
;
; if(key_new_val!=key_old_val)
lds R2,L98
cp R16,R2
breq L99
.dbline 581
; {
.dbline 582
; key_old_val=key_new_val;
sts L98,R16
.dbline 583
; if(key_new_val==POPE)
cpi R16,16
brne L101
.dbline 584
; return TRUE;
ldi R16,1
rjmp L97
L101:
.dbline 586
; else
; return FALSE;
clr R16
rjmp L97
L99:
.dbline 589
; }
; else
; {
.dbline 590
; return FALSE;
clr R16
.dbline -2
L97:
.dbline 0 ; func end
ret
.dbsym r key_new_val 16 c
.dbend
.dbfunc e InitSys _InitSys fV
; cs_sel -> R22
; work_mode -> R20
.even
_InitSys::
rcall push_gset2
.dbline -1
.dbline 602
; }
; }
; /*
; ************************************************************
; *Description:初始化系统各种参数,变量
; *Arguments :none
; *Returns :none
; *Notes :
; ************************************************************
; */
; void InitSys (void)
; {
.dbline 606
; INT8U work_mode;
; INT8U cs_sel;
;
; port_init();
rcall _port_init
.dbline 608
;
; work_mode=WORK_MODE;
in R20,0x3
andi R20,32
.dbline 609
; cs_sel=CS_SELECT;
in R22,0x3
andi R22,16
.dbline 611
;
; if(work_mode==WORK_TEST)
tst R20
breq X1
rjmp L104
X1:
.dbline 612
; {
.dbline 613
; Chno_Set_Num=CHAN_SET_TEST;
in R24,0x3
andi R24,8
lsl R24
lsl R24
in R25,0x3
andi R25,16
lsl R25
lsl R25
or R25,R24
in R24,0x3
andi R24,4
lsl R24
lsl R24
or R25,R24
in R24,0x3
andi R24,2
lsl R24
lsl R24
or R25,R24
in R24,0x3
andi R24,1
lsl R24
lsl R24
or R25,R24
in R24,0x9
andi R24,128
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
or R25,R24
in R24,0x9
andi R24,64
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
or R25,R24
com R25
andi R25,127
sts _Chno_Set_Num,R25
.dbline 614
; Baud_Set_Num=BAUD_TEST;
ldi R24,3
sts _Baud_Set_Num,R24
.dbline 615
; }
L104:
.dbline 616
; if(work_mode==WORK_DEMO)
cpi R20,32
brne L106
.dbline 617
; {
.dbline 618
; Chno_Set_Num=CHAN_SET_DEMO;
in R24,0x9
andi R24,128
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
in R25,0x3
andi R25,1
lsl R25
lsl R25
or R25,R24
in R24,0x9
andi R24,64
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
lsr R24
or R25,R24
com R25
andi R25,7
sts _Chno_Set_Num,R25
.dbline 619
; Baud_Set_Num=BAUD_SET;
in R24,0x3
andi R24,4
lsr R24
in R25,0x3
andi R25,8
lsr R25
or R25,R24
in R24,0x3
andi R24,2
lsr R24
or R25,R24
com R25
andi R25,7
sts _Baud_Set_Num,R25
.dbline 620
; }
L106:
.dbline 622
;
; uart0_init();
rcall _uart0_init
.dbline 623
; timer0_init();
rcall _timer0_init
.dbline 624
; PrintSysInfo();
rcall _PrintSysInfo
.dbline 626
;
; RFSendCnt = 0; //射频发送(串口接收)计数器,记录串口接收字节数
clr R2
sts _RFSendCnt,R2
.dbline 627
; RFReceiveCnt = 0; //射频接收(串口发送)计数器,记录串口发送字节数
sts _RFReceiveCnt,R2
.dbline 629
;
; RFSendFlg = FALSE; //射频发送标志,串口已经接收完一包数据,准备射频发送
sts _RFSendFlg,R2
.dbline 630
; RFReceiveFlg = FALSE; //射频接收标志,准备把空中数据发送到串口
sts _RFReceiveFlg,R2
.dbline 632
;
; RXOTCnt = 0; //串口接收数据超时计数器
sts _RXOTCnt,R2
.dbline 633
; RXOTFlg = FALSE; //串口接收数据超时标志
sts _RXOTFlg,R2
.dbline 635
;
; CC1100Init(); //初始化CC1100
rcall _CC1100Init
.dbline 637
;
; RFState = CC1100_RX_STATE;
clr R2
sts _RFState,R2
.dbline 638
; CC1100IntLFlg = FALSE;
sts _CC1100IntLFlg,R2
.dbline 639
; CC1100IntHFlg = FALSE;
sts _CC1100IntHFlg,R2
.dbline 641
;
; SEI();
sei
.dbline -2
L103:
rcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r cs_sel 22 c
.dbsym r work_mode 20 c
.dbend
.area bss(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
_Chno_Set_Num::
.blkb 1
.dbsym e Chno_Set_Num _Chno_Set_Num c
_Baud_Set_Num::
.blkb 1
.dbsym e Baud_Set_Num _Baud_Set_Num c
_Beep_Time::
.blkb 2
.dbsym e Beep_Time _Beep_Time i
_Beep_Flag::
.blkb 1
.dbsym e Beep_Flag _Beep_Flag c
_RXOTCnt::
.blkb 1
.dbsym e RXOTCnt _RXOTCnt c
_RXOTFlg::
.blkb 1
.dbsym e RXOTFlg _RXOTFlg c
_RFState::
.blkb 1
.dbsym e RFState _RFState c
_RFReceiveFlg::
.blkb 1
.dbsym e RFReceiveFlg _RFReceiveFlg c
_RFSendFlg::
.blkb 1
.dbsym e RFSendFlg _RFSendFlg c
_RFReceiveLen::
.blkb 1
.dbsym e RFReceiveLen _RFReceiveLen c
_RFReceiveCnt::
.blkb 1
.dbsym e RFReceiveCnt _RFReceiveCnt c
_RFSendCnt::
.blkb 1
.dbsym e RFSendCnt _RFSendCnt c
_RFReceive_Buf::
.blkb 64
.dbsym e RFReceive_Buf _RFReceive_Buf A[64:64]c
_UartReceive_Buf::
.blkb 64
.dbsym e UartReceive_Buf _UartReceive_Buf A[64:64]c
_Test_RFTx_Buf::
.blkb 48
.dbsym e Test_RFTx_Buf _Test_RFTx_Buf A[48:48]c
_CC1100IntLFlg::
.blkb 1
.dbsym e CC1100IntLFlg _CC1100IntLFlg c
_CC1100IntHFlg::
.blkb 1
.dbsym e CC1100IntHFlg _CC1100IntHFlg c
_RFSend_Start::
.blkb 1
.dbsym e RFSend_Start _RFSend_Start c
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L96:
.blkb 18
.area idata
.byte 42,'C,'h,'a,'n,'e,'l,32,32,32,32,32,58,32,37,'d
.byte 10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L94:
.blkb 22
.area idata
.byte 42,'B,'a,'u,'d,32,'r,'a,'t,'e,32,32,58,32,37,'u
.byte 32,'B,'P,'S,10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L93:
.blkb 22
.area idata
.byte 42,'R,'F,32,32,32,32,32,32,32,32,32,58,32,37,'d
.byte 32,'M,'H,'z,10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L92:
.blkb 9
.area idata
.byte 49,57,58,50,49,58,48,48,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L91:
.blkb 18
.area idata
.byte 42,'B,'u,'i,'l,'d,32,'t,'i,'m,'e,32,58,32,37,'s
.byte 10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L90:
.blkb 12
.area idata
.byte 'J,'a,'n,32,49,53,32,50,48,48,56,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L89:
.blkb 18
.area idata
.byte 42,'B,'u,'i,'l,'d,32,'d,'a,'t,'e,32,58,32,37,'s
.byte 10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L88:
.blkb 20
.area idata
.byte 42,'C,'C,49,49,48,48,95,'T,'e,'s,'t,'B,'o,'a,'r
.byte 'd,33,10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
L87:
.blkb 28
.area idata
.byte 42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42
.byte 42,42,42,42,42,42,42,42,42,42,10,0
.area data(ram, con, rel)
.dbfile D:\WIRELE~1\CC1020~1\SoftWare\SoftWare\board.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -