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

Subversion Repositories amber

[/] [amber/] [trunk/] [sw/] [boot-loader-ethmac/] [ethmac.c] - Diff between revs 80 and 81

Show entire file | Details | Blame | View Log

Rev 80 Rev 81
Line 154... Line 154...
    phy_rst(0);  /* reset is active low */
    phy_rst(0);  /* reset is active low */
 
 
}
}
 
 
 
 
void tx_packet(int len)
void ethmac_tx_packet(char* buf, int len)
{
{
    unsigned int status = 0;
    unsigned int status = 0;
 
 
 
    /* copy the packet into the tx buffer */
 
    strncpy((char*)ETHMAC_TX_BUFFER, buf, len);
 
 
 
 
    /* Poll the ready bit.
    /* Poll the ready bit.
       Wait until the ready bit is cleared by the ethmac hardware
       Wait until the ready bit is cleared by the ethmac hardware
       This holds everything up while the packet is being transmitted, but
       This holds everything up while the packet is being transmitted, but
       it keeps things simple. */
       it keeps things simple. */
Line 182... Line 185...
    */
    */
    *(unsigned int *) ( ADR_ETHMAC_BDBASE + 0 ) = len<<16 | 0xf800;
    *(unsigned int *) ( ADR_ETHMAC_BDBASE + 0 ) = len<<16 | 0xf800;
}
}
 
 
 
 
 
 
/* returns 1 if link comes up */
/* returns 1 if link comes up */
int init_phy (void)
int init_phy (void)
{
{
    int addr;
    int addr;
    int bmcr;
    int bmcr;

powered by: WebSVN 2.1.0

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