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

Header file with data structure and API declarations for BCP High level driver. More...

#include <ti/drv/bcp/bcp_lld.h>
#include <ti/drv/bcp/bcp_mmr.h>
#include <ti/drv/qmss/qmss_drv.h>
#include <ti/drv/cppi/cppi_drv.h>
#include <ti/drv/cppi/cppi_desc.h>
#include <ti/csl/csl_chip.h>
#include <ti/drv/bcp/bcpver.h>

Data Structures

struct  _Bcp_InitCfg
 Bcp_InitCfg. More...
struct  _Bcp_DrvCfg
 Bcp_DrvCfg. More...
struct  _Bcp_TxCfg
 Bcp_TxCfg. More...
struct  _Bcp_RxCfg
 Bcp_RxCfg. More...

Defines

#define BCP_MAX_NUM_INSTANCES   (CSL_BCP_PER_CNT)
 The number of BCP instances in the SoC.
#define BCP_MAX_NUM_FLOWS   (64)
 The number of CPPI flows reserved for each BCP instance.
#define BCP_MAX_NUM_RXOBJECTS   (64)
 The maximum number of Rx objects that will be tracked by the driver globally in the system across all cores.
#define BCP_RETVAL_SUCCESS   (0)
 When returned this, indicates the API succeeded in its intent.
#define BCP_RETVAL_EBAD_HANDLE   (-1)
 When returned this, indicates that the handle passed to the API was invalid.
#define BCP_RETVAL_EINVALID_PARAMS   (-2)
 When returned this, indicates that the input configuration passed to the API is invalid.
#define BCP_RETVAL_ENO_MEM   (-3)
 When returned this, indicates that the API's attempt to allocate memory or retrieve descriptors failed and is out of memory/descriptors.
#define BCP_RETVAL_ENO_RESULT   (-4)
 When returned this, indicates that there is no pending BCP processed output available for the application's Rx object.
#define BCP_RETVAL_ENOT_SUPPORTED   (-5)
 When returned this, indicates that the API doesnt support the feature requested for the inputs passed.
#define BCP_RETVAL_EFAILURE   (-6)
 When returned this, indicates a general error.

Typedefs

typedef void * Bcp_DrvHandle
 Bcp_DrvHandle.
typedef void * Bcp_TxHandle
 Bcp_TxHandle.
typedef void * Bcp_RxHandle
 Bcp_RxHandle.
typedef void * Bcp_DrvBufferHandle
 Bcp_DrvBufferHandle.
typedef int32_t Bcp_RetVal
 Bcp_RetVal.
typedef struct _Bcp_InitCfg Bcp_InitCfg
 Bcp_InitCfg.
typedef struct _Bcp_DrvCfg Bcp_DrvCfg
 Bcp_DrvCfg.
typedef struct _Bcp_TxCfg Bcp_TxCfg
 Bcp_TxCfg.
typedef struct _Bcp_RxCfg Bcp_RxCfg
 Bcp_RxCfg.

Enumerations

enum  Bcp_DrvMode { Bcp_DrvMode_LOCAL = 0, Bcp_DrvMode_REMOTE = 1 }
 Bcp_DrvMode. More...

Functions

uint32_t Bcp_getVersionID (void)
const char * Bcp_getVersionStr (void)
Bcp_RetVal Bcp_init (uint8_t instNum, Bcp_DrvMode mode, Bcp_InitCfg *pBcpInitCfg)
Bcp_RetVal Bcp_deInit (uint8_t instNum)
uint8_t Bcp_isInitialized (uint8_t instNum)
Bcp_LldObj * Bcp_getLLDHandle (uint8_t instNum)
Bcp_DrvHandle Bcp_open (uint8_t instNum, Bcp_DrvCfg *pBcpDrvCfg, Bcp_RetVal *pRetVal)
Bcp_RetVal Bcp_close (Bcp_DrvHandle hBcp)
Bcp_TxHandle Bcp_txOpen (Bcp_DrvHandle hBcp, Bcp_TxCfg *pBcpTxCfg, void *pTxEndpointCfg)
Bcp_RetVal Bcp_txClose (Bcp_TxHandle hBcpTxInfo)
Bcp_RxHandle Bcp_rxOpen (Bcp_DrvHandle hBcp, Bcp_RxCfg *pBcpRxCfg, void *pRxEndpointCfg)
Bcp_RetVal Bcp_rxClose (Bcp_RxHandle hBcpRxInfo)
Bcp_RetVal Bcp_rxGetRxQueueNumber (Bcp_RxHandle hBcpRxInfo)
Bcp_RetVal Bcp_rxGetFlowId (Bcp_RxHandle hBcpRxInfo)
Bcp_RetVal Bcp_findFlowIdByQueueNumber (Bcp_DrvHandle hBcp, uint32_t rxQueueNumber)
Bcp_RetVal Bcp_send (Bcp_TxHandle hBcpTxInfo, Bcp_DrvBufferHandle hDrvBuffer, uint32_t drvBufferLen, void *pDestnAddress)
int32_t Bcp_rxGetNumOutputEntries (Bcp_RxHandle hBcpRxInfo)
Bcp_RetVal Bcp_recv (Bcp_RxHandle hBcpRxInfo, Bcp_DrvBufferHandle *phDrvBuffer, uint8_t **ppDataBuffer, uint32_t *pDataBufferLen, uint8_t **ppPSInfo, uint32_t *pPSInfoLen, uint8_t *pFlowId, uint8_t *pSrcId, uint16_t *pDestnTagInfo)
Bcp_RetVal Bcp_rxProcessDesc (Bcp_RxHandle hBcpRxInfo, Cppi_Desc *pCppiDesc, Bcp_DrvBufferHandle *phDrvBuffer, uint8_t **ppDataBuffer, uint32_t *pDataBufferLen, uint8_t **ppPSInfo, uint32_t *pPSInfoLen, uint8_t *pFlowId, uint8_t *pSrcId, uint16_t *pDestnTagInfo)
Bcp_RetVal Bcp_rxFreeRecvBuffer (Bcp_RxHandle hBcpRxInfo, Bcp_DrvBufferHandle hDrvBuffer, uint32_t drvBufferLen)

Detailed Description

Header file with data structure and API declarations for BCP High level driver.

============================================================================
(C) Copyright 2010, Texas Instruments, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Copyright 2014, Texas Instruments Incorporated