Esempio n. 1
0
/******************************************************************************
* Function Name: _phy_write
* Description  : Writes to a PHY register
* Arguments    : reg_addr - address of the PHY register
*              : data - value
* Return Value : none
******************************************************************************/
void  _phy_write( uint16_t reg_addr, uint16_t data )
{
  _phy_preamble();
  _phy_reg_set( reg_addr, PHY_WRITE );
  _phy_ta_10();
  _phy_reg_write( data );
  _phy_ta_z0();
}
Esempio n. 2
0
/******************************************************************************
* Function Name: _phy_write
* Description  : Writes to a PHY register
* Arguments    : reg_addr - address of the PHY register
*              : data - value
* Return Value : none
******************************************************************************/
void  _phy_write( unsigned short reg_addr, unsigned short data )
{
  _phy_preamble();
  _phy_reg_set( reg_addr, PHY_WRITE );
  _phy_ta_10();
  _phy_reg_write( data );
  _phy_ta_z0();
}
Esempio n. 3
0
/******************************************************************************
* Function Name: _phy_read
* Description  : Reads a PHY register
* Arguments    : reg_addr - address of the PHY register
* Return Value : read value
******************************************************************************/
uint16_t _phy_read( uint16_t reg_addr )
{
  uint16_t data;

  _phy_preamble();
  _phy_reg_set( reg_addr, PHY_READ );
  _phy_ta_z0();
  _phy_reg_read( &data );
  _phy_ta_z0();

  return( data );
}
Esempio n. 4
0
/******************************************************************************
* Function Name: _phy_read
* Description  : Reads a PHY register
* Arguments    : reg_addr - address of the PHY register
* Return Value : read value
******************************************************************************/
unsigned short _phy_read( unsigned short reg_addr )
{
  unsigned short data;

  _phy_preamble();
  _phy_reg_set( reg_addr, PHY_READ );
  _phy_ta_z0();
  _phy_reg_read( &data );
  _phy_ta_z0();

  return( data );
}