RTL8139: Difference between revisions

13 bytes removed ,  16 years ago
no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 4:
 
'''==Programming the RTL8139=='''
* Turning on the deviceRTL8139
* Software Reset!
* Init Recieve buffer
Line 11:
* Enable Reciever and Transmitter
 
----
'''-- Turning on the device --'''
 
'''-- Turning on the deviceRTL8139 --'''
Send 0x00 to the CONFIG_1 register (0x52) to set the LWAKE + LWPTN to active high.
this should essentially *power on* the device.
Line 30 ⟶ 32:
 
ex:
'' char rx_buffer[8139+16]; // declare the local buffer space (8k + header)
outportd(0x30, (unsigned long)rx_buffer); // send dword memory location to RBSTART (0x30)''
 
'''-- Set IMR + ISR --'''
Line 44 ⟶ 46:
 
ex:
'' outportw(0x3C, 0x0005); // Sets the TOK and ROK bits high ''
 
'''-- Enable Recieve and Transmitter --'''
Line 58 ⟶ 60:
 
ex:
'' outportb(0x37, 0x0C); // Sets the RE and TE bits high ''
 
written by: 01000101
--[[User:01000101|01000101]] 19:28, 1 November 2007 (CDT)
 
Anonymous user