PDK API Guide for AM65xx
cpsw_hostport_priv.h File Reference

Introduction

This file contains private type definitions and helper macros for the CPSW host port module which are meant for internal use in Enet Per drivers.

Go to the source code of this file.

Data Structures

struct  CpswHostPort_Obj
 CPSW host port object. More...
 

Macros

#define CPSW_HOSTPORT_PRIVATE_IOCTL(x)
 Helper macro to create private IOCTL commands for CPSW MAC port module. More...
 

Typedefs

typedef CpswHostPort_ObjCpswHostPort_Handle
 Host port module handle. More...
 

Enumerations

enum  CpswHostPort_PrivIoctls { CPSW_HOSTPORT_SET_FLOW_ID_OFFSET = CPSW_HOSTPORT_PRIVATE_IOCTL(0U) }
 Host port private IOCTL commands. More...
 

Functions

int32_t CpswHostPort_open (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
 Open and initialize CPSW host port. More...
 
int32_t CpswHostPort_rejoin (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
 Rejoin a running CPSW host port. More...
 
int32_t CpswHostPort_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Run an IOCTL operation on CPSW host port. More...
 
void CpswHostPort_close (EnetMod_Handle hMod)
 Close CPSW host port. More...
 

Macro Definition Documentation

◆ CPSW_HOSTPORT_PRIVATE_IOCTL

#define CPSW_HOSTPORT_PRIVATE_IOCTL (   x)
Value:
ENET_IOCTL_HOSTPORT_BASE | \
ENET_IOCTL_PER_CPSW | \
ENET_IOCTL_MIN(x))
Definition: enet_ioctl.h:170

Helper macro to create private IOCTL commands for CPSW MAC port module.

Typedef Documentation

◆ CpswHostPort_Handle

Host port module handle.

Enumeration Type Documentation

◆ CpswHostPort_PrivIoctls

Host port private IOCTL commands.

Enumerator
CPSW_HOSTPORT_SET_FLOW_ID_OFFSET 

Set flow ID offset.

Offset value which is added to the transmit (egress) flow Id.

IOCTL parameters: inArgs: uint32_t outArgs: None

Function Documentation

◆ CpswHostPort_open()

int32_t CpswHostPort_open ( EnetMod_Handle  hMod,
Enet_Type  enetType,
uint32_t  instId,
const void *  cfg,
uint32_t  cfgSize 
)

Open and initialize CPSW host port.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
cfgConfiguration parameters
cfgSizeSize of the configuration parameters
Returns
Enet_ErrorCodes

◆ CpswHostPort_rejoin()

int32_t CpswHostPort_rejoin ( EnetMod_Handle  hMod,
Enet_Type  enetType,
uint32_t  instId 
)

Rejoin a running CPSW host port.

Parameters
hModEnet Module handle
enetTypeEnet Peripheral type
instIdEnet Peripheral instance id
Returns
Enet_ErrorCodes

◆ CpswHostPort_ioctl()

int32_t CpswHostPort_ioctl ( EnetMod_Handle  hMod,
uint32_t  cmd,
Enet_IoctlPrms prms 
)

Run an IOCTL operation on CPSW host port.

Parameters
hModEnet Module handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes

◆ CpswHostPort_close()

void CpswHostPort_close ( EnetMod_Handle  hMod)

Close CPSW host port.

Parameters
hModEnet Module handle