OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [sw/] [drivers/] [eth.c] - Diff between revs 64 and 80

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 64 Rev 80
Line 1... Line 1...
#include "../../backend/board.h"
#include <board.h>
#include "../support/support.h"
#include <support.h>
#include "eth.h"
#include "eth.h"
 
 
int eth_tx_done;
int eth_tx_done;
int eth_rx_done;
int eth_rx_done;
int eth_rx_len;
int eth_rx_len;
Line 69... Line 69...
int eth_send(int length)
int eth_send(int length)
{
{
        if (!eth_tx_done)       //if previous command not fully processed, bail out
        if (!eth_tx_done)       //if previous command not fully processed, bail out
                return -1;
                return -1;
 
 
        int i;
 
 
 
        eth_tx_done = 0;
        eth_tx_done = 0;
        eth_tx_packet[12] = length >> 8;
        eth_tx_packet[12] = length >> 8;
        eth_tx_packet[13] = length;
        eth_tx_packet[13] = length;
 
 
        REG32(ETH_BASE + ETH_TXBD0L) = (( 0x0000FFFF & ( length + HDR_LEN ) ) << 16) | BD_SND;
        REG32(ETH_BASE + ETH_TXBD0L) = (( 0x0000FFFF & ( length + HDR_LEN ) ) << 16) | BD_SND;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.