![]() |
xxvethernet
Vitis Drivers API Documentation
|
Data Structures | |
struct | XXxvEthernet_Config |
This typedef contains configuration information for a Xxv Ethernet device. More... | |
struct | XXxvEthernet |
struct XXxvEthernet is the type for Xxv Ethernet driver instance data. More... | |
Macros | |
#define | XXxvEthernet_IsStarted(InstancePtr) (((InstancePtr)->IsStarted == XIL_COMPONENT_IS_STARTED) ? TRUE : FALSE) |
XXxvEthernet_IsStarted reports if the device is in the started or stopped state. More... | |
#define | XXxvEthernet_XxvDevBaseAddress(InstancePtr) ((InstancePtr)->Config.XxvDevBaseAddress) |
XXxvEthernet_XxvDevBaseAddress reports the base address of the core connected to the Xxv Ethernet's Axi4 Stream interface (expected to be MCDMA). More... | |
#define | XXxvEthernet_IsTxErr(InstancePtr) |
XXxvEthernet_IsTxErr determines if there is any TX error reported by device. More... | |
#define | XXxvEthernet_IsRxErr(InstancePtr) |
XXxvEthernet_IsRxErr determines if there is any RX error reported by device. More... | |
#define | XXxvEthernet_GetStatus(InstancePtr) XXxvEthernet_ReadReg((InstancePtr)->Config.BaseAddress, XXE_SR_OFFSET) |
XXxvEthernet_GetStatus returns the contents of status register. More... | |
#define | XXxvEthernet_IsStatsConfigured(InstancePtr) (((InstancePtr)->Config.Stats) ? TRUE : FALSE) |
XXxvEthernet_IsStatsConfigured returns determines if Statistics gathering. More... | |
#define | XXxvEthernet_UsxgmiiLinkSts(InstancePtr) |
XXxvEthernet_UsxgmiiLinkSts returns the USXGMII link status. More... | |
#define | XXxvEthernet_SetUsxgmiiAnEnable(InstancePtr) |
XXxvEthernet_SetUsxgmiiAnEnable enables USXGMII autonegotiation. More... | |
#define | XXxvEthernet_SetUsxgmiiAnBypass(InstancePtr) |
XXxvEthernet_SetUsxgmiiAnBypass bypasses USXGMII autonegotiation. More... | |
#define | XXxvEthernet_GetUsxgmiiAnSts(InstancePtr) |
XXxvEthernet_GetUsxgmiiAnSts returns the contents of USXGMII autonegotiation status register. More... | |
#define | XXxvEthernet_IsMcDma(InstancePtr) (((InstancePtr)->Config.XxvDevType == XPAR_MCDMA) ? TRUE: FALSE) |
XXxvEthernet_IsMcDma reports if the device is currently connected to MCDMA. More... | |
#define | XXxvEthernet_ReadReg(BaseAddress, RegOffset) (Xil_In32(((BaseAddress) + (RegOffset)))) |
XXxvEthernet_ReadReg returns the value read from the register specified by RegOffset. More... | |
#define | XXxvEthernet_WriteReg(BaseAddress, RegOffset, Data) Xil_Out32(((BaseAddress) + (RegOffset)), (Data)) |
XXxvEthernet_WriteReg, writes Data to the register specified by RegOffset. More... | |
Typedefs | |
typedef struct XXxvEthernet_Config | XXxvEthernet_Config |
This typedef contains configuration information for a Xxv Ethernet device. More... | |
typedef struct XXxvEthernet | XXxvEthernet |
struct XXxvEthernet is the type for Xxv Ethernet driver instance data. More... | |
Functions | |
int | XXxvEthernet_CfgInitialize (XXxvEthernet *InstancePtr, XXxvEthernet_Config *CfgPtr, UINTPTR EffectiveAddress) |
XXxvEthernet_CfgInitialize initializes an XXV Ethernet device along with the InstancePtr that references it. More... | |
int | XXxvEthernet_Initialize (XXxvEthernet *InstancePtr, XXxvEthernet_Config *CfgPtr) |
XXxvEthernet_Initialize initializes an XXV Ethernet device along with the InstancePtr that references it. More... | |
int | XXxvEthernet_Start (XXxvEthernet *InstancePtr) |
XXxvEthernet_Start starts the Xxv Ethernet device as follows: More... | |
void | XXxvEthernet_Stop (XXxvEthernet *InstancePtr) |
XXxvEthernet_Stop gracefully stops the Xxv Ethernet device by disabling the receiver. More... | |
void | XXxvEthernet_Reset (XXxvEthernet *InstancePtr) |
XXxvEthernet_Reset does not perform a soft reset of the XxvEthernet core. More... | |
int | XXxvEthernet_SetOptions (XXxvEthernet *InstancePtr, u32 Options) |
XXxvEthernet_SetOptions enables the options, Options for the Xxv Ethernet, specified by InstancePtr. More... | |
int | XXxvEthernet_ClearOptions (XXxvEthernet *InstancePtr, u32 Options) |
XXxvEthernet_ClearOptions clears the options, Options for the Xxv Ethernet, specified by InstancePtr. More... | |
u32 | XXxvEthernet_GetOptions (XXxvEthernet *InstancePtr) |
XXxvEthernet_GetOptions returns the current option settings. More... | |
int | XXxvEthernet_SetUsxgmiiRateAndDuplex (XXxvEthernet *InstancePtr, u32 Rate, u32 SetFD) |
XXxvEthernet_SetUsxgmiiRateAndDuplex sets the speed and duplex ability in USXGMII Autonegotiation register. More... | |
XXxvEthernet_Config * | XXxvEthernet_LookupConfig (u16 DeviceId) |
XXxvEthernet_LookupConfig returns a reference to an XXxvEthernet_Config structure based on an unique device id, DeviceId. More... | |
XXxvEthernet_Config * | XXxvEthernet_LookupConfigBaseAddr (UINTPTR Baseaddr) |
XXxvEthernet_LookupConfigBaseAddr returns a reference to an XXxvEthernet_Config structure based on base address. More... | |
u16 | XXxvEthernet_GetAutoNegSpeed (XXxvEthernet *InstancePtr) |
XXxvEthernet_GetAutoNegSpeed reports the speed (only 10G supported) from the Autonegotiation status register. More... | |
int | XXxvEthernet_SetAutoNegSpeed (XXxvEthernet *InstancePtr) |
XXxvEthernet_SetAutoNegSpeed sets the speed (only 10G supported) in the Autonegotiation control register. More... | |
void | XXxvEthernet_UsxgmiiAnMainReset (XXxvEthernet *InstancePtr) |
XXxvEthernet_UsxgmiiAnMainReset sets the USXGMII AN Main reset. More... | |
void | XXxvEthernet_UsxgmiiAnMainRestart (XXxvEthernet *InstancePtr) |
XXxvEthernet_UsxgmiiAnMainRestart sets the USXGMII AN Main restart. More... | |
Configuration options | |
The following are device configuration options. See the XXxvEthernet_SetOptions, XXxvEthernet_ClearOptions and XXxvEthernet_GetOptions routines for information on how to use options. The default state of the options are also noted below. | |
#define | XXE_FCS_STRIP_OPTION 0x00000010 |
< XXE_FCS_STRIP_OPTION specifies the Xxv Ethernet device to strip FCS and PAD from received frames. More... | |
#define | XXE_FCS_INSERT_OPTION 0x00000020 |
XXE_TRANSMITTER_ENABLE_OPTION specifies the Xxv Ethernet device transmitter to be enabled. More... | |
#define | XXE_TRANSMITTER_ENABLE_OPTION 0x00000080 |
XXE_RECEIVER_ENABLE_OPTION specifies the Xxv Ethernet device receiver to be enabled. More... | |
#define | XXE_RECEIVER_ENABLE_OPTION 0x00000100 |
#define | XXE_DEFAULT_OPTIONS |
XXE_DEFAULT_OPTIONS specify the options set in XXxvEthernet_Reset() and XXxvEthernet_CfgInitialize() More... | |
MODE register masks | |
#define | XXE_MODE_LCLLPBK_MASK 0x80000000 |
TXCFG register masks | |
#define | XXE_TXCFG_TX_MASK 0x00000001 |
#define | XXE_TXCFG_FCS_MASK 0x00000002 |
RXCFG register masks | |
#define | XXE_RXCFG_RX_MASK 0x00000001 |
#define | XXE_RXCFG_DEL_FCS_MASK 0x00000002 |
#define | XXE_RXCFG_IGN_FCS_MASK 0x00000004 |
RXMTU register masks | |
#define | XXE_RXMTU_MIN_JUM_MASK 0x000000FF |
#define | XXE_RXMTU_MAX_JUM_MASK 0x7FFF0000 |
RXBLSR register masks | |
#define | XXE_RXBLKLCK_MASK 0x00000001 |
TICK register masks | |
#define | XXE_TICK_STATEN_MASK 0x00000001 |
AN status register masks | |
#define | XXE_AN_COMP_MASK 0x00000004 |
#define | XXE_USXGMII_AN_COMP_MASK 0x00010000 |
AN ability register masks | |
#define | XXE_ANA_10GKR_MASK 0x00000004 |
Reset and Address Filter (RAF) Register bit definitions. | |
#define | XXE_RAF_STATSRST_MASK 0x00002000 |
Statistics Counter Reset. More... | |
#define | XXE_RAF_RXBADFRMEN_MASK 0x00004000 |
Receive Bad Frame Enable. More... | |
Transmit Inter-Frame Gap Adjustment Register (TFGP) bit definitions | |
#define | XXE_TFGP_IFGP_MASK 0x0000007F |
Transmit inter-frame gap adjustment value. More... | |
Other Constant definitions used in the driver | |
#define | XXE_SPEED_10_GBPS 10 |
Speed of 10 Gbps. More... | |
#define | XXE_LOOPS_TO_COME_OUT_OF_RST 10000 |
Number of loops in the driver API to wait for before returning a failure case. More... | |
#define | XXE_RST_DELAY_LOOPCNT_VAL 10000 |
Timeout in ticks used while checking if the core had come out of reset. More... | |
#define XXE_DEFAULT_OPTIONS |
XXE_DEFAULT_OPTIONS specify the options set in XXxvEthernet_Reset() and XXxvEthernet_CfgInitialize()
Referenced by XXxvEthernet_Reset(), and XXxvEthernet_SetOptions().
#define XXE_FCS_INSERT_OPTION 0x00000020 |
XXE_TRANSMITTER_ENABLE_OPTION specifies the Xxv Ethernet device transmitter to be enabled.
This driver sets this option to enabled (set) by default.
Referenced by XXxvEthernet_ClearOptions(), and XXxvEthernet_SetOptions().
#define XXE_FCS_STRIP_OPTION 0x00000010 |
< XXE_FCS_STRIP_OPTION specifies the Xxv Ethernet device to strip FCS and PAD from received frames.
This driver sets this option to enabled (set) by default.XXE_FCS_INSERT_OPTION specifies the Xxv Ethernet device to generate the FCS field and add PAD automatically for outgoing frames. This driver sets this option to enabled (set) by default.
Referenced by XXxvEthernet_ClearOptions(), and XXxvEthernet_SetOptions().
#define XXE_LOOPS_TO_COME_OUT_OF_RST 10000 |
Number of loops in the driver API to wait for before returning a failure case.
Referenced by XXxvEthernet_Reset().
#define XXE_RAF_RXBADFRMEN_MASK 0x00004000 |
Receive Bad Frame Enable.
#define XXE_RAF_STATSRST_MASK 0x00002000 |
Statistics Counter Reset.
#define XXE_RST_DELAY_LOOPCNT_VAL 10000 |
Timeout in ticks used while checking if the core had come out of reset.
The exact tick time is defined in each case/loop where it will be used
#define XXE_SPEED_10_GBPS 10 |
Speed of 10 Gbps.
Referenced by XXxvEthernet_GetAutoNegSpeed().
#define XXE_TFGP_IFGP_MASK 0x0000007F |
Transmit inter-frame gap adjustment value.
#define XXE_TRANSMITTER_ENABLE_OPTION 0x00000080 |
XXE_RECEIVER_ENABLE_OPTION specifies the Xxv Ethernet device receiver to be enabled.
This driver sets this option to enabled (set) by default.
Referenced by XXxvEthernet_ClearOptions(), XXxvEthernet_SetOptions(), and XXxvEthernet_Start().
#define XXxvEthernet_GetStatus | ( | InstancePtr | ) | XXxvEthernet_ReadReg((InstancePtr)->Config.BaseAddress, XXE_SR_OFFSET) |
XXxvEthernet_GetStatus returns the contents of status register.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_GetUsxgmiiAnSts | ( | InstancePtr | ) |
XXxvEthernet_GetUsxgmiiAnSts returns the contents of USXGMII autonegotiation status register.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
Referenced by XxvEthernetUtilUsxgmiiSetup(), and XxvEthernetUtilUsxgmiiSetupBypassAN().
#define XXxvEthernet_IsMcDma | ( | InstancePtr | ) | (((InstancePtr)->Config.XxvDevType == XPAR_MCDMA) ? TRUE: FALSE) |
XXxvEthernet_IsMcDma reports if the device is currently connected to MCDMA.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_IsRxErr | ( | InstancePtr | ) |
XXxvEthernet_IsRxErr determines if there is any RX error reported by device.
The RX status register is read for this to be determined.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_IsStarted | ( | InstancePtr | ) | (((InstancePtr)->IsStarted == XIL_COMPONENT_IS_STARTED) ? TRUE : FALSE) |
XXxvEthernet_IsStarted reports if the device is in the started or stopped state.
To be in the started state, the calling code must have made a successful call to XXxvEthernet_Start. To be in the stopped state, XXxvEthernet_Stop or XXxvEthernet_CfgInitialize function must have been called.
InstancePtr | is a pointer to the of Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_IsStatsConfigured | ( | InstancePtr | ) | (((InstancePtr)->Config.Stats) ? TRUE : FALSE) |
XXxvEthernet_IsStatsConfigured returns determines if Statistics gathering.
is configured in the harwdare or not.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_IsTxErr | ( | InstancePtr | ) |
XXxvEthernet_IsTxErr determines if there is any TX error reported by device.
The TX status register is read for this to be determined.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_ReadReg | ( | BaseAddress, | |
RegOffset | |||
) | (Xil_In32(((BaseAddress) + (RegOffset)))) |
XXxvEthernet_ReadReg returns the value read from the register specified by RegOffset.
BaseAddress | is the base address of the Xxv Ethernet device. |
RegOffset | is the offset of the register to be read. |
Referenced by XxvEthernetUtilEnterLocalLoopback(), XXxvEthernet_ClearOptions(), XXxvEthernet_GetAutoNegSpeed(), XXxvEthernet_SetOptions(), XXxvEthernet_SetUsxgmiiRateAndDuplex(), XXxvEthernet_Start(), XXxvEthernet_Stop(), XXxvEthernet_UsxgmiiAnMainReset(), and XXxvEthernet_UsxgmiiAnMainRestart().
#define XXxvEthernet_SetUsxgmiiAnBypass | ( | InstancePtr | ) |
XXxvEthernet_SetUsxgmiiAnBypass bypasses USXGMII autonegotiation.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
Referenced by XxvEthernetUtilUsxgmiiSetupBypassAN().
#define XXxvEthernet_SetUsxgmiiAnEnable | ( | InstancePtr | ) |
XXxvEthernet_SetUsxgmiiAnEnable enables USXGMII autonegotiation.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
Referenced by XxvEthernetUtilUsxgmiiSetup().
#define XXxvEthernet_UsxgmiiLinkSts | ( | InstancePtr | ) |
XXxvEthernet_UsxgmiiLinkSts returns the USXGMII link status.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
#define XXxvEthernet_WriteReg | ( | BaseAddress, | |
RegOffset, | |||
Data | |||
) | Xil_Out32(((BaseAddress) + (RegOffset)), (Data)) |
XXxvEthernet_WriteReg, writes Data to the register specified by RegOffset.
BaseAddress | is the base address of the Xxv Ethernet device. |
RegOffset | is the offset of the register to be written. |
Data | is the 32-bit value to write to the register. |
Referenced by XxvEthernetUtilEnterLocalLoopback(), XxvEthernetUtilUsxgmiiSetup(), XxvEthernetUtilUsxgmiiSetupBypassAN(), XXxvEthernet_ClearOptions(), XXxvEthernet_SetAutoNegSpeed(), XXxvEthernet_SetOptions(), XXxvEthernet_SetUsxgmiiRateAndDuplex(), XXxvEthernet_Start(), XXxvEthernet_Stop(), XXxvEthernet_UsxgmiiAnMainReset(), and XXxvEthernet_UsxgmiiAnMainRestart().
#define XXxvEthernet_XxvDevBaseAddress | ( | InstancePtr | ) | ((InstancePtr)->Config.XxvDevBaseAddress) |
XXxvEthernet_XxvDevBaseAddress reports the base address of the core connected to the Xxv Ethernet's Axi4 Stream interface (expected to be MCDMA).
This function is currently not in use because of limitation in exporting target MCDMA information.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
typedef struct XXxvEthernet XXxvEthernet |
struct XXxvEthernet is the type for Xxv Ethernet driver instance data.
The calling code is required to use a unique instance of this structure for every Xxv Ethernet device used in the system. A reference to a structure of this type is then passed to the driver API functions.
typedef struct XXxvEthernet_Config XXxvEthernet_Config |
This typedef contains configuration information for a Xxv Ethernet device.
int XXxvEthernet_CfgInitialize | ( | XXxvEthernet * | InstancePtr, |
XXxvEthernet_Config * | CfgPtr, | ||
UINTPTR | EffectiveAddress | ||
) |
XXxvEthernet_CfgInitialize initializes an XXV Ethernet device along with the InstancePtr that references it.
InstancePtr | references the memory instance to be associated with the XXV Ethernet core instance upon initialization. |
CfgPtr | references the structure holding the hardware configuration for the Xxv Ethernet core to initialize. |
EffectiveAddress | is the processor address used to access the base address of the XXV Ethernet instance. In systems with an MMU and virtual memory, EffectiveAddress is the virtual address mapped to the physical in ConfigPtr->Config.BaseAddress . In systems without an active MMU, EffectiveAddress should be set to the same value as ConfigPtr->Config.BaseAddress . |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, and XXxvEthernet_Reset().
Referenced by XxvEthernetSgDmaIntrExample().
int XXxvEthernet_ClearOptions | ( | XXxvEthernet * | InstancePtr, |
u32 | Options | ||
) |
XXxvEthernet_ClearOptions clears the options, Options for the Xxv Ethernet, specified by InstancePtr.
Xxv Ethernet should be stopped with XXxvEthernet_Stop() before changing options.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
Options | is a bitmask of OR'd XXE_*_OPTION values for options to clear. Options not specified are not affected. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet::IsStarted, XXxvEthernet::Options, XXE_FCS_INSERT_OPTION, XXE_FCS_STRIP_OPTION, XXE_TRANSMITTER_ENABLE_OPTION, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
u16 XXxvEthernet_GetAutoNegSpeed | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_GetAutoNegSpeed reports the speed (only 10G supported) from the Autonegotiation status register.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXE_SPEED_10_GBPS, and XXxvEthernet_ReadReg.
u32 XXxvEthernet_GetOptions | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_GetOptions returns the current option settings.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet::IsReady, and XXxvEthernet::Options.
int XXxvEthernet_Initialize | ( | XXxvEthernet * | InstancePtr, |
XXxvEthernet_Config * | CfgPtr | ||
) |
XXxvEthernet_Initialize initializes an XXV Ethernet device along with the InstancePtr that references it.
The PHY is setup independently from the Ethernet core. Use the MII or whatever other interface may be present for setup.
InstancePtr | references the memory instance to be associated with the AXI Ethernet core instance upon initialization. |
CfgPtr | references the structure holding the hardware configuration for the Axi Ethernet core to initialize. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, and XXxvEthernet::IsReady.
XXxvEthernet_Config * XXxvEthernet_LookupConfig | ( | u16 | DeviceId | ) |
XXxvEthernet_LookupConfig returns a reference to an XXxvEthernet_Config structure based on an unique device id, DeviceId.
The return value will refer to an entry in the device configuration table defined in the xxxvethernet_g.c file.
DeviceId | is the unique ID for the lookup operation. |
Referenced by XxvEthernetSgDmaIntrExample().
XXxvEthernet_Config * XXxvEthernet_LookupConfigBaseAddr | ( | UINTPTR | Baseaddr | ) |
XXxvEthernet_LookupConfigBaseAddr returns a reference to an XXxvEthernet_Config structure based on base address.
The return value will refer to an entry in the device configuration table defined in the xxxvethernet_g.c file.
Baseaddr | is the base address of the device to lookup for. |
void XXxvEthernet_Reset | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_Reset does not perform a soft reset of the XxvEthernet core.
XxvEthernet hardware is reset by the device connected to the AXI4-Stream interface i.e. MCDMA. This function simply disabled TX and RX. This function inserts some delay before proceeding to stop the device.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet::IsReady, XXxvEthernet::Options, XXE_DEFAULT_OPTIONS, XXE_LOOPS_TO_COME_OUT_OF_RST, and XXxvEthernet_Stop().
Referenced by XXxvEthernet_CfgInitialize().
int XXxvEthernet_SetAutoNegSpeed | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_SetAutoNegSpeed sets the speed (only 10G supported) in the Autonegotiation control register.
InstancePtr | references the Xxv Ethernet on which to operate. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, and XXxvEthernet_WriteReg.
int XXxvEthernet_SetOptions | ( | XXxvEthernet * | InstancePtr, |
u32 | Options | ||
) |
XXxvEthernet_SetOptions enables the options, Options for the Xxv Ethernet, specified by InstancePtr.
Xxv Ethernet should be stopped with XXxvEthernet_Stop() before changing options.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
Options | is a bitmask of OR'd XXE_*_OPTION values for options to set. Options not specified are not affected. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet::IsStarted, XXxvEthernet::Options, XXE_DEFAULT_OPTIONS, XXE_FCS_INSERT_OPTION, XXE_FCS_STRIP_OPTION, XXE_TRANSMITTER_ENABLE_OPTION, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
Referenced by XxvEthernetUtilUsxgmiiSetup(), and XxvEthernetUtilUsxgmiiSetupBypassAN().
int XXxvEthernet_SetUsxgmiiRateAndDuplex | ( | XXxvEthernet * | InstancePtr, |
u32 | Rate, | ||
u32 | SetFD | ||
) |
XXxvEthernet_SetUsxgmiiRateAndDuplex sets the speed and duplex ability in USXGMII Autonegotiation register.
InstancePtr | references the Xxv Ethernet on which to operate. |
Rate | to be set - currently only 1G and 2.5G are tested. Pass RATE_1G or RATE_2G5 to the function. |
Set | FD or HD - if 0 Half duplex is set, else Full duplex. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
Referenced by XxvEthernetUtilUsxgmiiSetup(), and XxvEthernetUtilUsxgmiiSetupBypassAN().
int XXxvEthernet_Start | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_Start starts the Xxv Ethernet device as follows:
- Enable transmitter if XXE_TRANSMIT_ENABLE_OPTION is set - Enable receiver if XXE_RECEIVER_ENABLE_OPTION is set - Upon enabling RX, check for RX BLOCK LOCK bit to make sure RX channel is ready.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet::IsStarted, XXxvEthernet::Options, XXE_TRANSMITTER_ENABLE_OPTION, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
Referenced by XxvEthernetSgDmaIntrSingleFrameExample().
void XXxvEthernet_Stop | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_Stop gracefully stops the Xxv Ethernet device by disabling the receiver.
XXxvEthernet_Stop does not modify any of the current device options.
Since the transmitter is not disabled, frames currently in internal buffers or in process by a DMA engine are allowed to be transmitted.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet::IsStarted, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
Referenced by XxvEthernetSgDmaIntrExample(), XxvEthernetSgDmaIntrSingleFrameExample(), and XXxvEthernet_Reset().
void XXxvEthernet_UsxgmiiAnMainReset | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_UsxgmiiAnMainReset sets the USXGMII AN Main reset.
A delay is provided in between setting and clearing the main reset bit.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
void XXxvEthernet_UsxgmiiAnMainRestart | ( | XXxvEthernet * | InstancePtr | ) |
XXxvEthernet_UsxgmiiAnMainRestart sets the USXGMII AN Main restart.
A delay is provided in between setting and clearing this bit as it is not self clearing.
InstancePtr | is a pointer to the Xxv Ethernet instance to be worked on. |
References XXxvEthernet_Config::BaseAddress, XXxvEthernet::Config, XXxvEthernet::IsReady, XXxvEthernet_ReadReg, and XXxvEthernet_WriteReg.
Referenced by XxvEthernetUtilUsxgmiiSetup(), and XxvEthernetUtilUsxgmiiSetupBypassAN().