Intel Ethernet i217: Difference between revisions

Jump to navigation Jump to search
no edit summary
[unchecked revision][unchecked revision]
No edit summary
No edit summary
Line 142:
#define mmio_read8(p) (*((volatile uint8_t*)(p)))
#define mmio_write8(p,v) ((*((volatile uint8_t*)(p)))=(v))
</source>
 
 
== The Driver Class Interface Prototypes==
 
 
<source lang="c">
class E1000 : public NetworkDriver
{
private:
uint8_t bar_type;
uint16_t io_base;
uint64_t mem_base;
bool eerprom_exists;
uint8_t mac [6];
uint8_t *rx_free;
uint8_t *tx_free;
struct e1000_rx_desc *rx_descs[E1000_NUM_RX_DESC];
struct e1000_tx_desc *tx_descs[E1000_NUM_TX_DESC];
uint16_t rx_cur;
uint16_t tx_cur;
char * buffer;
void writeCommand( uint16_t p_address, uint32_t p_value);
uint32_t readCommand(uint16_t p_address);
void eepromGetType();
uint32_t eepromRead( uint8_t addr);
bool getMACAddress();
void startLink ();
void rxinit();
void txinit();
void enableInterrupt();
void handleReceive();
public:
E1000(PCIConfigHeader * _pciConfigHeader,IPIOEController * p_ipioeController);
void start ();
void fire (InterruptContext * p_interruptContext);
void printMac();
uint8_t * getMacAddress ();
int sendPacket(const void * p_data, uint16_t p_len);
~E1000();
};
</source>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu