Skip to content

Commit

Permalink
DP83826 error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
e-mayhew committed Dec 16, 2024
1 parent f072332 commit ff9da6f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions rtos_drivers/include/dp83826.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
* \file dp83826.h
*
* \brief This file contains the type definitions and helper macros for the
* dp83826 Ethernet PHY.
* DP83826 Ethernet PHY.
*/

/*!
* \ingroup DRV_ENETPHY
* \defgroup ENETPHY_dp83826 TI dp83826 PHY
* \defgroup ENETPHY_DP83826 TI DP83826 PHY
*
* TI dp83826 RMII Ethernet PHY.
* TI DP83826 RMII Ethernet PHY.
*
* @{
*/
Expand Down
6 changes: 3 additions & 3 deletions rtos_drivers/include/dp83tg720.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ typedef struct Dp83tg720_Cfg_s
/* ========================================================================== */

/*!
* \brief Initialize DP83TC811 PHY specific config params.
* \brief Initialize DP83TG720 PHY specific config params.
*
* Initializes the DP83TC811 PHY specific configuration parameters.
* Initializes the DP83TG720 PHY specific configuration parameters.
*
* \param cfg DP83TC811 PHY config structure pointer
* \param cfg DP83TG720 PHY config structure pointer
*/
void Dp83tg720_initCfg(Dp83tg720_Cfg *cfg);

Expand Down
4 changes: 2 additions & 2 deletions rtos_drivers/include/phy_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/*!
* \ingroup DRV_ENETPHY
* \defgroup PHY_COMMON_H TI ENET PHY
* \defgroup PHY_COMMON_H TI PHY COMMON
*
* TI PHY COMMON for Ethernet PHY.
*
Expand Down Expand Up @@ -283,7 +283,7 @@ typedef struct
/*!
* \brief PHY bind.
*
* PHY-specific function that binds the driver handle adnd register
* PHY-specific function that binds the driver handle and register
* access functions to specific PHY device.
*
* \param hPhy PHY device handle
Expand Down
12 changes: 6 additions & 6 deletions rtos_drivers/src/dp83826.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,16 @@ static void Dp83826_rmwExtReg(EthPhyDrv_Handle hPhy,
PHYTRACE_VERBOSE("PHY %u: write reg %u mask 0x%04x val 0x%04x\r\n",
PhyPriv_getPhyAddr(hPhy), reg, mask, val);

pRegAccessApi->EnetPhy_writeReg(hPhy, PHY_MMD_CR, devad | MMD_CR_ADDR);
pRegAccessApi->EnetPhy_writeReg(hPhy, PHY_MMD_DR, reg);
pRegAccessApi->EnetPhy_writeReg(hPhy, PHY_MMD_CR, devad | MMD_CR_DATA_NOPOSTINC);
status = pRegAccessApi->EnetPhy_readReg(hPhy, PHY_MMD_DR, &data);
pRegAccessApi->EnetPhy_writeReg(pRegAccessApi->pArgs, PHY_MMD_CR, devad | MMD_CR_ADDR);
pRegAccessApi->EnetPhy_writeReg(pRegAccessApi->pArgs, PHY_MMD_DR, reg);
pRegAccessApi->EnetPhy_writeReg(pRegAccessApi->pArgs, PHY_MMD_CR, devad | MMD_CR_DATA_NOPOSTINC);
status = pRegAccessApi->EnetPhy_readReg(pRegAccessApi->pArgs, PHY_MMD_DR, &data);


if (status == PHY_SOK)
{
data = (data & ~mask) | (val & mask);
pRegAccessApi->EnetPhy_writeReg(hPhy, PHY_MMD_CR, devad | MMD_CR_DATA_NOPOSTINC);
pRegAccessApi->EnetPhy_writeReg(hPhy, PHY_MMD_DR, data);
pRegAccessApi->EnetPhy_writeReg(pRegAccessApi->pArgs, PHY_MMD_CR, devad | MMD_CR_DATA_NOPOSTINC);
pRegAccessApi->EnetPhy_writeReg(pRegAccessApi->pArgs, PHY_MMD_DR, data);
}
}

0 comments on commit ff9da6f

Please sign in to comment.