PDK Documentation
csl_mdio.h File Reference

Introduction

Header file for functional layer of CSL MDIO Version 5.

It contains the various enumerations, structure definitions and function declarations



(C) Copyright 2018-2019, Texas Instruments, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Go to the source code of this file.

Typedefs

typedef volatile CSL_MdioRegs * CSL_mdioHandle
 

Functions

void CSL_MDIO_getVersionInfo (CSL_mdioHandle hMdioRegs, CSL_MDIO_VERSION *mdioVersionInfo)
 
uint16_t CSL_MDIO_getClkDivVal (CSL_mdioHandle hMdioRegs)
 
void CSL_MDIO_setClkDivVal (CSL_mdioHandle hMdioRegs, uint16_t clkDivVal)
 
uint32_t CSL_MDIO_isStateMachineEnabled (CSL_mdioHandle hMdioRegs)
 
void CSL_MDIO_enableStateMachine (CSL_mdioHandle hMdioRegs)
 
void CSL_MDIO_disableStateMachine (CSL_mdioHandle hMdioRegs)
 
uint32_t CSL_MDIO_isPhyAlive (CSL_mdioHandle hMdioRegs, uint32_t phyAddr)
 
uint32_t CSL_MDIO_isPhyLinked (CSL_mdioHandle hMdioRegs, uint32_t phyAddr)
 
uint32_t CSL_MDIO_isUnmaskedLinkStatusChangeIntSet (CSL_mdioHandle hMdioRegs, uint32_t index)
 
void CSL_MDIO_clearUnmaskedLinkStatusChangeInt (CSL_mdioHandle hMdioRegs, uint32_t index)
 
uint32_t CSL_MDIO_phyRegRead (uint32_t baseAddr, uint32_t phyAddr, uint32_t regNum, uint16_t *pData)
 
void CSL_MDIO_phyRegWrite (uint32_t baseAddr, uint32_t phyAddr, uint32_t regNum, uint16_t wrVal)
 This API writes a PHY register using MDIO. More...
 
uint32_t CSL_MDIO_phyLinkStatus (uint32_t baseAddr, uint32_t phyAddr)
 This API reads the link status of all PHY connected to this MDIO. The bit corresponding to the PHY address will be set if the PHY link is active. More...
 
void CSL_MDIO_enableLinkStatusChangeInterrupt (CSL_mdioHandle hMdioRegs, Uint32 index, Uint32 phyAddr)
 Enable MDIO link interrupt (MDIO_LINKINT) for PHY monitoring. More...
 
void CSL_MDIO_disableLinkStatusChangeInterrupt (CSL_mdioHandle hMdioRegs, Uint32 index, Uint32 phyAddr)
 Disable MDIO link interrupt (MDIO_LINKINT) for PHY monitoring. More...
 
void CSL_MDIO_enableFaultDetect (CSL_mdioHandle hMdioRegs)
 
void CSL_MDIO_disableFaultDetect (CSL_mdioHandle hMdioRegs)
 
void CSL_MDIO_enablePreamble (CSL_mdioHandle hMdioRegs)
 
void CSL_MDIO_disablePreamble (CSL_mdioHandle hMdioRegs)
 
uint32_t CSL_MDIO_phyRegRead2 (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint32_t phyAddr, uint32_t regNum, uint16_t *pData)
 
void CSL_MDIO_phyRegWrite2 (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint32_t phyAddr, uint32_t regNum, uint16_t wrVal)
 This API writes a PHY register using MDIO. More...
 
void CSL_MDIO_setClause45EnableMask (CSL_mdioHandle hMdioRegs, uint32_t clause45EnableMask)
 Set Clause-45 enable mask. Each bit in the mask is associated with a PHY address, i.e. bit 0 is associated with PHY address 0, etc. More...
 
uint32_t CSL_MDIO_getClause45EnableMask (CSL_mdioHandle hMdioRegs)
 Get Clause-45 enable mask. Each bit in the mask is associated with a PHY address, i.e. bit 0 is associated with PHY address 0, etc. More...
 
int32_t CSL_MDIO_phyInitiateRegWriteC45 (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint32_t phyAddr, uint32_t mmdNum, uint32_t regAddr, uint16_t wrVal)
 Initiate a non-blocking write transaction with PHY using Clause-45 frame. The user should call CSL_MDIO_isPhyRegAccessComplete() to query the transaction status. More...
 
int32_t CSL_MDIO_phyInitiateRegReadC45 (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint32_t phyAddr, uint32_t mmdNum, uint32_t regAddr)
 Initiate a non-blocking register read transaction with PHY using Clause-45 frame. The user should call CSL_MDIO_isPhyRegAccessComplete() to query the transaction status, and once it's complete, get the value read from register via CSL_MDIO_phyGetRegReadVal(). More...
 
int32_t CSL_MDIO_phyRegInitiateWriteC22 (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint32_t phyAddr, uint32_t regAddr, uint16_t wrVal)
 Initiate a non-blocking write transaction with PHY using Clause-22 frame. The user should call CSL_MDIO_isPhyRegAccessComplete() to query the transaction status. More...
 
int32_t CSL_MDIO_phyInitiateRegReadC22 (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint32_t phyAddr, uint32_t regAddr)
 Initiate a non-blocking register read transaction with PHY using Clause-22 frame. The user should call CSL_MDIO_isPhyRegAccessComplete() to query the transaction status, and once it's complete, get the value read from register via CSL_MDIO_phyGetRegReadVal(). More...
 
int32_t CSL_MDIO_phyGetRegReadVal (CSL_mdioHandle hMdioRegs, uint32_t userGroup, uint16_t *pData)
 Get the value read from a PHY register from a transaction previously initiated through either CSL_MDIO_phyInitiateRegReadC22() or CSL_MDIO_phyInitiateRegReadC45(). More...
 
uint32_t CSL_MDIO_isPhyRegAccessComplete (CSL_mdioHandle hMdioRegs, uint32_t userGroup)
 Check if there is a transaction going on in MDIO. More...
 
uint32_t CSL_MDIO_phyLinkStatus2 (CSL_mdioHandle hMdioRegs, uint32_t phyAddr)
 This API reads the link status of all PHY connected to this MDIO. The bit corresponding to the PHY address will be set if the PHY link is active. More...
 
uint32_t CSL_MDIO_isStatusChangeModeInterruptEnabled (CSL_mdioHandle hMdioRegs)
 Check if the MDIO link interrupt (MDIO_LINKINT) is enabled. More...
 
void CSL_MDIO_enableStatusChangeModeInterrupt (CSL_mdioHandle hMdioRegs)
 Enable MDIO link interrupt (MDIO_LINKINT) More...
 
void CSL_MDIO_disableStatusChangeModeInterrupt (CSL_mdioHandle hMdioRegs)
 Disable MDIO link interrupt (MDIO_LINKINT) More...
 
Uint32 CSL_MDIO_getLinkStatusChangePhyAddr (CSL_mdioHandle hMdioRegs, Uint32 index)
 Get the PHY address being monitored. More...
 
uint32_t CSL_MDIO_isStateChangeModeEnabled (CSL_mdioHandle hMdioRegs)
 Checks if the State Change Mode is enabled or not. More...
 
void CSL_MDIO_enableStateChangeMode (CSL_mdioHandle hMdioRegs)
 This function enables the MDIO State Change Mode. More...
 
void CSL_MDIO_disableStateChangeMode (CSL_mdioHandle hMdioRegs)
 This function disables the MDIO State Change Mode. More...
 
void CSL_MDIO_setPollIPG (CSL_mdioHandle hMdioRegs, uint8_t ipgVal)
 Set Polling Inter Packet Gap value. More...
 
uint8_t CSL_MDIO_getPollIPG (CSL_mdioHandle hMdioRegs)
 Get Polling Inter Packet Gap value. More...
 
void CSL_MDIO_setPollEnableMask (CSL_mdioHandle hMdioRegs, uint32_t pollEnableMask)
 Set poll enable mask. More...
 
uint32_t CSL_MDIO_getPollEnableMask (CSL_mdioHandle hMdioRegs)
 Get poll enable mask. More...
 

Typedef Documentation

◆ CSL_mdioHandle

typedef volatile CSL_MdioRegs* CSL_mdioHandle