AM263Px MCU+ SDK: enet_mod_phy.h File Reference

| AM263Px MCU+ SDK 26.00.00 |

Data Structures | Macros | Enumerations
enet_mod_phy.h File Reference

## Introduction

This file contains the type definitions and helper macros for the Ethernet PHY interface.

Go to the source code of this file.

## Data Structures
struct | EnetPhy_GenericInArgs
| Generic input args. More...
struct | EnetPhy_ReadRegInArgs
| Input args for ENET_PHY_IOCTL_READ_EXT_REG command. More...
struct | EnetPhy_WriteRegInArgs
| Input args for ENET_PHY_IOCTL_WRITE_EXT_REG command. More...
struct | EnetPhy_C45ReadRegInArgs
| Input args for ENET_PHY_IOCTL_C45_READ_REG command. More...
struct | EnetPhy_C45WriteRegInArgs
| Input args for ENET_PHY_IOCTL_C45_WRITE_REG command. More...
struct | EnetPhy_PtpPktTimestampInArgs
| Input args for ENET_PHY_IOCTL_GET_PTP_TXTS command. More...
struct | EnetPhy_AdjPtpFreqInArgs
| Input args for ENET_PHY_IOCTL_ADJ_PTP_FREQ command. More...
struct | EnetPhy_AdjPtpPhaseInArgs
| Input args for ENET_PHY_IOCTL_ADJ_PTP_PHASE command. More...
struct | EnetPhy_SetPtpTimeInArgs
| Input args for ENET_PHY_IOCTL_SET_PTP_TIME command. More...
struct | EnetPhy_ProcStatusFrameInArgs
| Input args for ENET_PHY_IOCTL_PROC_STATUS_FRAME command. More...
struct | EnetPhy_ProcStatusFrameOutArgs
| Output args for ENET_PHY_IOCTL_PROC_STATUS_FRAME command. More...
struct | EnetPhy_GetStatusFrameEthdrOutArgs
| Input args for ENET_PHY_IOCTL_GET_STATUS_FRAME_ETHDR command. More...
struct | EnetPhy_EnablePtpInArgs
| Input args for ENET_PHY_IOCTL_ENABLE_PTP command. More...
struct | EnetPhy_EnableEventCaptureInArgs
| Input args for ENET_PHY_IOCTL_ENABLE_EVENT_CAPTURE command. More...
struct | EnetPhy_EnableTriggerOutputInArgs
| Input args for ENET_PHY_IOCTL_ENABLE_TRIGGER_OUTPUT command. More...
struct | EnetPhy_GetEventTimestampOutArgs
| Output args for ENET_PHY_IOCTL_GET_EVENT_TIMESTAMP command. More...
struct | EnetPhy_ConfigMediaClockInArgs
| Input args for ENET_PHY_IOCTL_CONFIG_MEDIA_CLOCK command. More...
struct | EnetPhy_NudgeCodecClockInArgs
| Input args for ENET_PHY_IOCTL_NUDGE_CODEC_CLOCK command. More...

## Macros
#define | ENET_PHY_PUBLIC_IOCTL(x)
| Helper macro to create PHY IOCTL commands. More...

## Enumerations
enum | EnetPhy_Ioctl_e { ENET_PHY_IOCTL_GET_ID = ENET_PHY_PUBLIC_IOCTL(0U), ENET_PHY_IOCTL_GET_SUPPORTED_MODES = ENET_PHY_PUBLIC_IOCTL(1U), ENET_PHY_IOCTL_GET_LOOPBACK_STATE = ENET_PHY_PUBLIC_IOCTL(2U), ENET_PHY_IOCTL_IS_ALIVE = ENET_PHY_PUBLIC_IOCTL(3U), ENET_PHY_IOCTL_IS_LINKED = ENET_PHY_PUBLIC_IOCTL(4U), ENET_PHY_IOCTL_GET_LINK_MODE = ENET_PHY_PUBLIC_IOCTL(5U), ENET_PHY_IOCTL_RESET = ENET_PHY_PUBLIC_IOCTL(6U), ENET_PHY_IOCTL_READ_REG = ENET_PHY_PUBLIC_IOCTL(7U), ENET_PHY_IOCTL_WRITE_REG = ENET_PHY_PUBLIC_IOCTL(8U), ENET_PHY_IOCTL_READ_EXT_REG = ENET_PHY_PUBLIC_IOCTL(9U), ENET_PHY_IOCTL_WRITE_EXT_REG = ENET_PHY_PUBLIC_IOCTL(10U), ENET_PHY_IOCTL_C45_READ_REG = ENET_PHY_PUBLIC_IOCTL(11U), ENET_PHY_IOCTL_C45_WRITE_REG = ENET_PHY_PUBLIC_IOCTL(12U), ENET_PHY_IOCTL_PRINT_REGS = ENET_PHY_PUBLIC_IOCTL(13U), ENET_PHY_IOCTL_ADJ_PTP_FREQ = ENET_PHY_PUBLIC_IOCTL(14U), ENET_PHY_IOCTL_ADJ_PTP_PHASE = ENET_PHY_PUBLIC_IOCTL(15U), ENET_PHY_IOCTL_GET_PTP_TIME = ENET_PHY_PUBLIC_IOCTL(16U), ENET_PHY_IOCTL_SET_PTP_TIME = ENET_PHY_PUBLIC_IOCTL(17U), ENET_PHY_IOCTL_GET_PTP_TXTS = ENET_PHY_PUBLIC_IOCTL(18U), ENET_PHY_IOCTL_GET_PTP_RXTS = ENET_PHY_PUBLIC_IOCTL(19U), ENET_PHY_IOCTL_WAIT_PTP_TXTS = ENET_PHY_PUBLIC_IOCTL(20U), ENET_PHY_IOCTL_PROC_STATUS_FRAME = ENET_PHY_PUBLIC_IOCTL(21U), ENET_PHY_IOCTL_GET_STATUS_FRAME_ETHDR = ENET_PHY_PUBLIC_IOCTL(22U), ENET_PHY_IOCTL_ENABLE_PTP = ENET_PHY_PUBLIC_IOCTL(23U), ENET_PHY_IOCTL_ENABLE_EVENT_CAPTURE = ENET_PHY_PUBLIC_IOCTL(24U), ENET_PHY_IOCTL_ENABLE_TRIGGER_OUTPUT = ENET_PHY_PUBLIC_IOCTL(25U), ENET_PHY_IOCTL_GET_EVENT_TIMESTAMP = ENET_PHY_PUBLIC_IOCTL(26U), ENET_PHY_IOCTL_GET_LINK_STATUS = ENET_PHY_PUBLIC_IOCTL(27U), ENET_PHY_IOCTL_CONFIG_MEDIA_CLOCK = ENET_PHY_PUBLIC_IOCTL(28U), ENET_PHY_IOCTL_NUDGE_CODEC_CLOCK = ENET_PHY_PUBLIC_IOCTL(29U) }
| PHY IOCTL commands. More...

## Macro Definition Documentation

## ◆ ENET_PHY_PUBLIC_IOCTL

#define ENET_PHY_PUBLIC_IOCTL | ( |  | x | ) |

Value:
(ENET_IOCTL_TYPE_PUBLIC | \
ENET_IOCTL_PHY_BASE | \
ENET_IOCTL_MIN(x))

Helper macro to create PHY IOCTL commands.

## Enumeration Type Documentation

## ◆ EnetPhy_Ioctl_e

enum EnetPhy_Ioctl_e

PHY IOCTL commands.

Enumerator
ENET_PHY_IOCTL_GET_ID | Get PHY identification. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: EnetPhy_Version
ENET_PHY_IOCTL_GET_SUPPORTED_MODES | Get PHY supported modes by local PHY device. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: uint32_t
ENET_PHY_IOCTL_GET_LOOPBACK_STATE | Check if PHY is in loopback or not. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: bool
ENET_PHY_IOCTL_IS_ALIVE | Check PHY alive status. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: bool
ENET_PHY_IOCTL_IS_LINKED | Check state-machine link state, that is, whether the state machine has reached the LINKED state. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: bool
ENET_PHY_IOCTL_GET_LINK_MODE | Get the link speed and duplexity state after the state machine has reached the LINKED state. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: EnetMacPort_LinkCfg
ENET_PHY_IOCTL_RESET | Reset PHY. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: None
ENET_PHY_IOCTL_READ_REG | Read PHY register. IOCTL parameters: inArgs: EnetPhy_ReadRegInArgs outArgs: uint16_t
ENET_PHY_IOCTL_WRITE_REG | Write PHY register. IOCTL parameters: inArgs: EnetPhy_WriteRegInArgs outArgs: None
ENET_PHY_IOCTL_READ_EXT_REG | Read PHY extended register. IOCTL parameters: inArgs: EnetPhy_ReadRegInArgs outArgs: uint16_t
ENET_PHY_IOCTL_WRITE_EXT_REG | Write PHY extended register. IOCTL parameters: inArgs: EnetPhy_WriteRegInArgs outArgs: None
ENET_PHY_IOCTL_C45_READ_REG | Read PHY register using Clause-45 frame. IOCTL parameters: inArgs: EnetPhy_C45ReadRegInArgs outArgs: uint16_t
ENET_PHY_IOCTL_C45_WRITE_REG | Write PHY register using Clause-45 frame. IOCTL parameters: inArgs: EnetPhy_C45WriteRegInArgs outArgs: None
ENET_PHY_IOCTL_PRINT_REGS | Print PHY registers. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: None
ENET_PHY_IOCTL_ADJ_PTP_FREQ | Adjust PHY PTP clock Frequency. IOCTL parameters: inArgs: EnetPhy_AdjPtpFreqInArgs outArgs: None
ENET_PHY_IOCTL_ADJ_PTP_PHASE | Adjust PHY PTP clock Phase. IOCTL parameters: inArgs: EnetPhy_AdjPtpPhaseInArgs outArgs: None
ENET_PHY_IOCTL_GET_PTP_TIME | Get current PHY PTP clock time. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: uint64_t
ENET_PHY_IOCTL_SET_PTP_TIME | Set PHY PTP clock time. IOCTL parameters: inArgs: EnetPhy_SetPtpTimeInArgs outArgs: None
ENET_PHY_IOCTL_GET_PTP_TXTS | Get PHY PTP TX packet timestamp. IOCTL parameters: inArgs: EnetPhy_PtpPktTimestampInArgs outArgs: uint64_t
ENET_PHY_IOCTL_GET_PTP_RXTS | Get PHY PTP RX packet timestamp. IOCTL parameters: inArgs: EnetPhy_PtpPktTimestampInArgs outArgs: uint64_t
ENET_PHY_IOCTL_WAIT_PTP_TXTS | Add PHY PTP TX packet info to a waiting TX timestamp list. IOCTL parameters: inArgs: EnetPhy_PtpPktTimestampInArgs outArgs: None
ENET_PHY_IOCTL_PROC_STATUS_FRAME | Process PHY status frame. IOCTL parameters: inArgs: EnetPhy_ProcStatusFrameInArgs outArgs: EnetPhy_ProcStatusFrameOutArgs
ENET_PHY_IOCTL_GET_STATUS_FRAME_ETHDR | Get PHY status frame header. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: EnetPhy_GetStatusFrameEthdrOutArgs
ENET_PHY_IOCTL_ENABLE_PTP | Enable/Disable PHY PTP module. IOCTL parameters: inArgs: EnetPhy_EnablePtpInArgs outArgs: None
ENET_PHY_IOCTL_ENABLE_EVENT_CAPTURE | Enable/Disable an event capture on a PHY GPIO pin. IOCTL parameters: inArgs: EnetPhy_EnableEventCaptureInArgs outArgs: None
ENET_PHY_IOCTL_ENABLE_TRIGGER_OUTPUT | Enable/Disable clock trigger on a GPIO pin. IOCTL parameters: inArgs: EnetPhy_EnableTriggerOutputInArgs outArgs: None
ENET_PHY_IOCTL_GET_EVENT_TIMESTAMP | Get event timestamp. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: EnetPhy_GetEventTimestampOutArgs
ENET_PHY_IOCTL_GET_LINK_STATUS | Get Phy Link status. This IOTCL will not have longterm support and this functionality will eventually be merged to ENET_PHY_IOCTL_GET_LINK_MODE IOCTL in upcoming release. So ENET_PHY_IOCTL_GET_LINK_MODE IOCTL can be continued to use to get the phy link speed, duplexity. IOCTL parameters: inArgs: EnetPhy_GenericInArgs outArgs: EnetMacPort_LinkCfg
ENET_PHY_IOCTL_CONFIG_MEDIA_CLOCK | Config Media Clock. IOCTL parameters: inArgs: EnetPhy_ConfigMediaClockInArgs outArgs: None
ENET_PHY_IOCTL_NUDGE_CODEC_CLOCK | Nudge Codec Clock. IOCTL parameters: inArgs: EnetPhy_NudgeCodecClockInArgs outArgs: None

ENET_IOCTL_TYPE_PUBLIC
@ ENET_IOCTL_TYPE_PUBLIC
Definition: enet_ioctl.h:216