Ne2000: Difference between revisions

Jump to navigation Jump to search
fixed code
[unchecked revision][unchecked revision]
m (links and minor changes)
(fixed code)
Line 31:
Note that the same register number could have a different meaning depending whether you ''read'' or ''write'' to it. For instance, register 0C on page 0 is the ''receive configuration register'' in ''write'' mode and "receive status register" in ''read'' mode. Most of the ''configuration'' registers can still be read on page 2 though. Each register is a single byte and the page is selected by highest 2 bits of the COMMAND register (which is available in all pages)
 
<pre>
Ne2K_registers (page=0, read) {
: COMMAND=0, //!< the master command register
: CLDA0, COMMAND=0, //!< Currentthe Localmaster DMAcommand Address 0register
: CLDA1 CLDA0, //!< Current Local DMA Address 10
: BNRY, CLDA1, //!< BoundaryCurrent Local PointerDMA (forAddress ringbuffer)1
: TSR, BNRY, //!< TransmitBoundary Pointer Status(for Registerringbuffer)
: NCR TSR, //!< collisionsTransmit Status counterRegister
: FIFO NCR, //!< (for what purposecollisions ??)counter
: ISR, FIFO, //!< Interrupt(for what Statuspurpose Register??)
: CRDA0 ISR, //!< Current Remote DMAInterrupt AddressStatus 0Register
: CRDA1 CRDA0, //!< Current Remote DMA Address 10
: RSR=0x0c CRDA1, //!< ReceiveCurrent Remote DMA StatusAddress Register1
RSR=0x0c, //!< Receive Status Register
};
 
/*Registers that are the same in read & write are omitted.*/
Ne2K_registers (page=0, write) {
: PTART=1, //!< page start (init only)
: PSTOP, //!< page stop (init only)
: TPSR=4, //!< transmit page start address
: TBCR0, //!< transmit byte count (low)
: TBCR1, //!< transmit byte count (high)
: RSAR0=8, //!< remote start address (lo)
: RSAR1, //!< remote start address (hi)
: RBCR0, //!< remote byte count (lo)
: RBCR1, //!< remote byte count (hi)
: RCR, //!< receive config register
: TCR, //!< transmit config register
: DCR, //!< data config register (init)
: IMR, //!< interrupt mask register (init)
};
</pre>
 
=== Sending a Packet ===
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu