📄 rtl8019as_m128.lis
字号:
.module Rtl8019as_M128.c
.area text(rom, con, rel)
0000 .dbfile E:\__test\_RTL8019_M128_struct_Test\Rtl8019as_M128.c
0000 .dbfunc e Rtl8019as_Init _Rtl8019as_Init fV
.even
0000 _Rtl8019as_Init::
0000 .dbline -1
0000 .dbline 5
0000 ; #include "Rtl8019as_M128.h"
0000 ;
0000 ; //* Initialize the RTL8019AS
0000 ; void Rtl8019as_Init(void)
0000 ; {
0000 .dbline -2
0000 L1:
0000 .dbline 0 ; func end
0000 0895 ret
0002 .dbend
0002 ; /* fromrtl; // PORTA data lines = input
0002 ; PORTA = 0xFF;
0002 ; DDRB = 0xFF;
0002 ; rtladdr = 0x00; // clear address lines
0002 ; DDRC = 0xFF;
0002 ; DDRD = 0xFA; // setup IOW, IOR, EEPROM,RXD,TXD,CTS,LE
0002 ; PORTD = 0x05; // enable pullups on input pins
0002 ;
0002 ; clr_le_pin; //initialize latch enable for HCT573
0002 ; //clr_EEDO;
0002 ; set_iow_pin; // disable IOW
0002 ; set_ior_pin; // disable IOR
0002 ;
0002 ; set_rst_pin; // put NIC in reset
0002 ; delay_ms(2); // delay at least 1.6ms
0002 ; clr_rst_pin; // disable reset line
0002 ;
0002 ; read_rtl(RSTPORT); // read contents of reset port
0002 ; write_rtl(RSTPORT,byte_read); // do soft reset
0002 ; delay_ms(10); // give it time
0002 ; read_rtl(ISR); // check for good soft reset
0002 ; if(!(byte_read & RST))
0002 ; {
0002 ; while(1){
0002 ; //printf("RTL8019AS INIT FAILED!\r\n");
0002 ; delay_ms(1000);
0002 ; }
0002 ; }
0002 ; write_rtl(CR,0x21); // stop the NIC, abort DMA, page 0
0002 ; delay_ms(2); // make sure nothing is coming in or going out
0002 ; write_rtl(DCR,dcrval); // 0x58
0002 ; write_rtl(RBCR0,0x00);
0002 ; write_rtl(RBCR1,0x00);
0002 ; write_rtl(RCR,0x04);
0002 ; write_rtl(TPSR,txstart);
0002 ; write_rtl(TCR,0x02);
0002 ; write_rtl(PSTART,rxstart);
0002 ; write_rtl(BNRY,rxstart);
0002 ; write_rtl(PSTOP,rxstop);
0002 ; write_rtl(CR,0x61);
0002 ; write_rtl(CURR,rxstart);
0002 ; for(i=0;i<6;++i)
0002 ; write_rtl(PAR0+i, MY_MAC[i]);
0002 ;
0002 ; write_rtl(CR,0x22);
0002 ; write_rtl(ISR,0xFF);
0002 ; //write_rtl(IMR,imrval);
0002 ; write_rtl(IMR,0x35);
0002 ; write_rtl(TCR,tcrval);
0002 ; */
0002 ; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -