PDK API Guide for J721E
cpsw_cpts_priv.h File Reference

Introduction

This file contains the type definitions and helper macros for the CPSW CPTS module.

Go to the source code of this file.

Data Structures

struct  CpswCpts_EventMemObj
 CPTS event memory object. More...
 
struct  CpswCpts_EventStats
 CPTS event statistics. More...
 
struct  CpswCpts_Obj
 CPSW CPTS object. More...
 

Macros

#define CPSW_CPTS_PRIVATE_IOCTL(x)
 Helper macro to create private IOCTL commands for CPSW CPTS module. More...
 
#define CPSW_CPTS_ERRATA_GENFN_RECONFIG   (ENET_BIT(0U))
 CPTS GENFn reconfig errata mask. More...
 

Typedefs

typedef CpswCpts_ObjCpswCpts_Handle
 CPSW CPTS module handle. More...
 

Enumerations

enum  CpswCpts_PrivIoctls { CPSW_CPTS_IOCTL_HANDLE_INTR = CPSW_CPTS_PRIVATE_IOCTL(0U), CPSW_CPTS_IOCTL_ENABLE_INTR = CPSW_CPTS_PRIVATE_IOCTL(1U), CPSW_CPTS_IOCTL_DISABLE_INTR = CPSW_CPTS_PRIVATE_IOCTL(2U) }
 CPTS private IOCTL commands. More...
 

Functions

int32_t CpswCpts_open (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId, const void *cfg, uint32_t cfgSize)
 Open and initialize CPSW CPTS. More...
 
int32_t CpswCpts_rejoin (EnetMod_Handle hMod, Enet_Type enetType, uint32_t instId)
 Rejoin a running CPSW CPTS module. More...
 
int32_t CpswCpts_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Run an IOCTL operation on CPSW CPTS. More...
 
void CpswCpts_close (EnetMod_Handle hMod)
 Close CPSW CPTS. More...
 

Macro Definition Documentation

◆ CPSW_CPTS_PRIVATE_IOCTL

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

Helper macro to create private IOCTL commands for CPSW CPTS module.

◆ CPSW_CPTS_ERRATA_GENFN_RECONFIG

#define CPSW_CPTS_ERRATA_GENFN_RECONFIG   (ENET_BIT(0U))

CPTS GENFn reconfig errata mask.

Typedef Documentation

◆ CpswCpts_Handle

CPSW CPTS module handle.

Enumeration Type Documentation

◆ CpswCpts_PrivIoctls

CPTS private IOCTL commands.

Enumerator
CPSW_CPTS_IOCTL_HANDLE_INTR 

Handle the interrupt and notify the event's registered callback.

IOCTL parameters: inArgs: None outArgs: None

CPSW_CPTS_IOCTL_ENABLE_INTR 

Enable CPTS interrupt.

IOCTL parameters: inArgs: None outArgs: None

CPSW_CPTS_IOCTL_DISABLE_INTR 

Disable CPTS interrupt.

IOCTL parameters: inArgs: None outArgs: None

Function Documentation

◆ CpswCpts_open()

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

Open and initialize CPSW CPTS.

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

◆ CpswCpts_rejoin()

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

Rejoin a running CPSW CPTS module.

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

◆ CpswCpts_ioctl()

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

Run an IOCTL operation on CPSW CPTS.

Parameters
hModEnet Module handle
cmdIOCTL command Id
prmsIOCTL parameters
Returns
Enet_ErrorCodes

◆ CpswCpts_close()

void CpswCpts_close ( EnetMod_Handle  hMod)

Close CPSW CPTS.

Parameters
hModEnet Module handle