Data Structures | Defines | Typedefs | Enumerations | Functions
hyplnk.h File Reference

Hyperlink transport sub-system API and Data Definitions. More...

#include <stdint.h>
#include <stdlib.h>
#include "hyplnk_cfg.h"
#include "hyplnkver.h"

Data Structures

struct  hyplnkRevReg_s
 Specification of the HyperLink Revision Register. More...
struct  hyplnkControlReg_s
 Specification of the HyperLink Control Register. More...
struct  hyplnkStatusReg_s
 Specification of the HyperLink Status Register. More...
struct  hyplnkIntPriVecReg_s
 Specification of the Hyperlink Interrupt Priority Vector Status/Clear Register. More...
struct  hyplnkIntStatusClrReg_s
 Specification of the Hyperlink Interrupt Status/Clear Register. More...
struct  hyplnkIntPendSetReg_s
 Specification of the Hyperlink Interrupt Pending/Set Register. More...
struct  hyplnkGenSoftIntReg_s
 Specification of the Hyperlink Generate Soft Interrupt Value Register. More...
struct  hyplnkTXAddrOvlyReg_s
 Specification of the Tx Address Overlay Control Register. More...
struct  hyplnkRXAddrSelReg_s
 Specification of the Rx Address Selector Control Register. More...
struct  hyplnkRXPrivIDIdxReg_s
 Specification of the Rx Address PrivID Index Register. More...
struct  hyplnkRXPrivIDValReg_s
 Specification of the Rx Address PrivID Value Register. More...
struct  hyplnkRXSegIdxReg_s
 Specification of the Rx Address Segment Index Register. More...
struct  hyplnkRXSegValReg_s
 Specification of the Rx Address Segment Value Register. More...
struct  hyplnkChipVerReg_s
 Specification of the Chip Version Register. More...
struct  hyplnkLanePwrMgmtReg_s
 Specification of the Lane Power Management Control Register. More...
struct  hyplnkECCErrorsReg_s
 Specification of the ECC Error Counters Register. More...
struct  hyplnkLinkStatusReg_s
 Specification of the Link Status Register. More...
struct  hyplnkIntCtrlIdxReg_s
 Specification of the Interupt Control Index Register. More...
struct  hyplnkIntCtrlValReg_s
 Specification of the Interrupt Control Value Register. More...
struct  hyplnkIntPtrIdxReg_s
 Specification of the Interupt Control Index Register. More...
struct  hyplnkIntPtrValReg_s
 Specification of the Interrupt Control Value Register. More...
struct  hyplnkSERDESControl1Reg_s
 Specification of the SerDes Control And Status 1 Register. More...
struct  hyplnkSERDESControl2Reg_s
 Specification of the SerDes Control And Status 2 Register. More...
struct  hyplnkSERDESControl3Reg_s
 Specification of the SerDes Control And Status 3 Register. More...
struct  hyplnkSERDESControl4Reg_s
 Specification of the SerDes Control And Status 4 Register. More...
struct  hyplnkRegisters_s
 Specification all registers. More...
struct  Hyplnk_DeviceCfgBaseAddr
 Specification of Hyplnk_DeviceCfgBaseAddr. More...
struct  Hyplnk_InitCfg
 Specification of Hyplnk_InitCfg. More...

Defines

#define hyplnk_RX_PRIVID_TBL_ENTS   16
#define hyplnk_RX_SEG_TBL_ENTS   64
#define hyplnk_INT_CTRL_TBL_ENTS   256
#define hyplnk_INT_PTR_TBL_ENTS   16
#define hyplnk_MAX_PERIPHS   4
 Specification of Hyplnk_DeviceCfg.

Typedefs

typedef struct hyplnkRegisters_s hyplnkRegisters_t
 Specification all registers.
typedef void * Hyplnk_Handle
 Specification of Hyplnk_Handle.
typedef struct hyplnkRevReg_s hyplnkRevReg_t
 Specification of the HyperLink Revision Register.
typedef struct hyplnkControlReg_s hyplnkControlReg_t
 Specification of the HyperLink Control Register.
typedef struct hyplnkStatusReg_s hyplnkStatusReg_t
 Specification of the HyperLink Status Register.
typedef struct hyplnkIntPriVecReg_s hyplnkIntPriVecReg_t
 Specification of the Hyperlink Interrupt Priority Vector Status/Clear Register.
typedef struct
hyplnkIntStatusClrReg_s 
hyplnkIntStatusClrReg_t
 Specification of the Hyperlink Interrupt Status/Clear Register.
typedef struct
hyplnkIntPendSetReg_s 
hyplnkIntPendSetReg_t
 Specification of the Hyperlink Interrupt Pending/Set Register.
typedef struct
hyplnkGenSoftIntReg_s 
hyplnkGenSoftIntReg_t
 Specification of the Hyperlink Generate Soft Interrupt Value Register.
typedef struct
hyplnkTXAddrOvlyReg_s 
hyplnkTXAddrOvlyReg_t
 Specification of the Tx Address Overlay Control Register.
typedef struct hyplnkRXAddrSelReg_s hyplnkRXAddrSelReg_t
 Specification of the Rx Address Selector Control Register.
typedef struct
hyplnkRXPrivIDIdxReg_s 
hyplnkRXPrivIDIdxReg_t
 Specification of the Rx Address PrivID Index Register.
typedef struct
hyplnkRXPrivIDValReg_s 
hyplnkRXPrivIDValReg_t
 Specification of the Rx Address PrivID Value Register.
typedef struct hyplnkRXSegIdxReg_s hyplnkRXSegIdxReg_t
 Specification of the Rx Address Segment Index Register.
typedef struct hyplnkRXSegValReg_s hyplnkRXSegValReg_t
 Specification of the Rx Address Segment Value Register.
typedef struct hyplnkChipVerReg_s hyplnkChipVerReg_t
 Specification of the Chip Version Register.
typedef struct
hyplnkLanePwrMgmtReg_s 
hyplnkLanePwrMgmtReg_t
 Specification of the Lane Power Management Control Register.
typedef struct hyplnkECCErrorsReg_s hyplnkECCErrorsReg_t
 Specification of the ECC Error Counters Register.
typedef struct
hyplnkLinkStatusReg_s 
hyplnkLinkStatusReg_t
 Specification of the Link Status Register.
typedef struct
hyplnkIntCtrlIdxReg_s 
hyplnkIntCtrlIdxReg_t
 Specification of the Interupt Control Index Register.
typedef struct
hyplnkIntCtrlValReg_s 
hyplnkIntCtrlValReg_t
 Specification of the Interrupt Control Value Register.
typedef struct hyplnkIntPtrIdxReg_s hyplnkIntPtrIdxReg_t
 Specification of the Interupt Control Index Register.
typedef struct hyplnkIntPtrValReg_s hyplnkIntPtrValReg_t
 Specification of the Interrupt Control Value Register.
typedef struct
hyplnkSERDESControl1Reg_s 
hyplnkSERDESControl1Reg_t
 Specification of the SerDes Control And Status 1 Register.
typedef struct
hyplnkSERDESControl2Reg_s 
hyplnkSERDESControl2Reg_t
 Specification of the SerDes Control And Status 2 Register.
typedef struct
hyplnkSERDESControl3Reg_s 
hyplnkSERDESControl3Reg_t
 Specification of the SerDes Control And Status 3 Register.
typedef struct
hyplnkSERDESControl4Reg_s 
hyplnkSERDESControl4Reg_t
 Specification of the SerDes Control And Status 4 Register.
typedef hyplnkRXPrivIDValReg_t hyplnkRXPrivIDTbl_t [hyplnk_RX_PRIVID_TBL_ENTS]
 Access to the entire RX PrivID table.
typedef hyplnkRXSegValReg_t hyplnkRXSegTbl_t [hyplnk_RX_SEG_TBL_ENTS]
 Access to the entire RX segment table.
typedef hyplnkIntCtrlValReg_t hyplnkIntCtrlTbl_t [hyplnk_INT_CTRL_TBL_ENTS]
 Access to the entire interrupt control table.
typedef hyplnkIntPtrValReg_t hyplnkIntPtrTbl_t [hyplnk_INT_PTR_TBL_ENTS]
 Access to the entire interrupt pointer table.

Enumerations

enum  hyplnkRet_e {
  hyplnk_RET_DBG_NON_NULL = -100L, hyplnk_RET_DBG_USELESS_WRITE, hyplnk_RET_DBG_WRITE_OVERFLOW, hyplnk_RET_OK = 0,
  hyplnk_RET_INV_HANDLE, hyplnk_RET_INV_DEVICENUM, hyplnk_RET_INV_INITCFG, hyplnk_RET_NO_INIT
}
enum  hyplnkLocation_e { hyplnk_LOCATION_LOCAL, hyplnk_LOCATION_REMOTE }
enum  hyplnkConfigType_e { hyplnk_CONFIG_TYPE_TX_ADDR, hyplnk_CONFIG_TYPE_RX_ADDR, hyplnk_CONFIG_CONTROL }

Functions

hyplnkRet_e Hyplnk_init (Hyplnk_InitCfg *cfg)
 Hyplnk_init sets device configuration.
hyplnkRet_e Hyplnk_open (int portNum, Hyplnk_Handle *pHandle)
 Hyplnk_open creates/opens a HyperLink instance.
hyplnkRet_e Hyplnk_close (Hyplnk_Handle *pHandle)
 Hyplnk_close Closes (frees) the driver handle.
hyplnkRet_e Hyplnk_readRegs (Hyplnk_Handle handle, hyplnkLocation_e location, hyplnkRegisters_t *readRegs)
 Performs a configuration read.
hyplnkRet_e Hyplnk_writeRegs (Hyplnk_Handle handle, hyplnkLocation_e location, hyplnkRegisters_t *writeRegs)
 Performs a configuration write.
hyplnkRet_e Hyplnk_getWindow (Hyplnk_Handle handle, void **base, uint32_t *size)
 Hyplnk_getWindow returns the address and size of the local memory window.
uint32_t Hyplnk_getVersion (void)
 Hyplnk_getVersion returns the HYPLNK LLD version information.
const char * Hyplnk_getVersionStr (void)
 Hyplnk_getVersionStr returns the HYPLNK LLD version string.

Detailed Description

Hyperlink transport sub-system API and Data Definitions.

path ti/drv/hyplnk/hyplnk.h


Define Documentation

#define hyplnk_INT_CTRL_TBL_ENTS   256

size of the interupt control table

#define hyplnk_INT_PTR_TBL_ENTS   16

Size of the interrupt pointer table

#define hyplnk_RX_PRIVID_TBL_ENTS   16

Number of RX PrivID table entries

#define hyplnk_RX_SEG_TBL_ENTS   64

Number of RX segment table entries


Enumeration Type Documentation

These are the possible return values from all HYPLNK LLD functions

Enumerator:
hyplnk_RET_DBG_NON_NULL 

The call succeeded, but the application could have leaked memory since a non-NULL pointer was overwritten. This only

hyplnk_RET_DBG_USELESS_WRITE 

register write to readonly register

hyplnk_RET_DBG_WRITE_OVERFLOW 

write value too big for bitfield

hyplnk_RET_OK 

Call succeeded

hyplnk_RET_INV_HANDLE 

Invalid handle

hyplnk_RET_INV_DEVICENUM 

Hyplnk_open deviceNum invalid

hyplnk_RET_INV_INITCFG 

Invalid Hyplnk_InitCfg

hyplnk_RET_NO_INIT 

Forgot to call Hyplnk_init() ?


Copyright 2014, Texas Instruments Incorporated