⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ixhssacc.h

📁 有关ARM开发板上的IXP400网络驱动程序的源码以。
💻 H
📖 第 1 页 / 共 4 页
字号:
/** * @typedef IxHssAccChanRxCallback * @brief Prototype of the clients function to accept notification of  * channelised rx * * This callback, if defined by the client in the connect, will get called * in the context of an IRQ. The IRQ will be triggered when the hssSyncQMQ * is not empty. The queued entry will be dequeued and this function will * be executed. * * @param hssPortId @ref IxHssAccHssPort - The HSS port Id. There are two * identical ports (0-1). * @param txOffset unsigned [in] - an offset indicating from where within * the txPtrList the NPE is currently transmitting from. * @param rxOffset unsigned [in] - an offset indicating where within the * receive buffers the NPE has just written the received data to. * @param numHssErrs unsigned [in] - This is the number of hssErrors  * the Npe has received * * @return void */typedef void (*IxHssAccChanRxCallback) (IxHssAccHssPort hssPortId,					unsigned rxOffset, 					unsigned txOffset, 					unsigned numHssErrs);/* * Prototypes for interface functions. *//** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccPortInit (IxHssAccHssPort hssPortId,                IxHssAccConfigParams *configParams,                IxHssAccTdmSlotUsage *tdmMap,                IxHssAccLastErrorCallback lastHssErrorCallback) * * @brief Initialise a HSS port. No channelised or packetised connections * should exist in the HssAccess layer while this interface is being called. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).  * @param *configParams @ref IxHssAccConfigParams [in] - A pointer to the HSS  * configuration structure * @param *tdmMap @ref IxHssAccTdmSlotUsage [in] - A pointer to an array of size * IX_HSSACC_TSLOTS_PER_HSS_PORT, defining the slot usage over the HSS port * @param lastHssErrorCallback @ref IxHssAccLastErrorCallback [in] - Client  * callback to report last error * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_PARAM_ERR The function did not execute successfully due to a *                          parameter error */PUBLIC IX_STATUS ixHssAccPortInit (IxHssAccHssPort hssPortId, 		  IxHssAccConfigParams *configParams, 		  IxHssAccTdmSlotUsage *tdmMap, 		  IxHssAccLastErrorCallback lastHssErrorCallback);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccLastErrorRetrievalInitiate (               IxHssAccHssPort hssPortId) * * @brief Initiate the retrieval of the last HSS error. The HSS port * should be configured before attempting to call this interface. * * @param hssPortId @ref IxHssAccHssPort [in] - the HSS port ID * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_PARAM_ERR The function did not execute successfully due to a *                          parameter error */PUBLIC IX_STATUS ixHssAccLastErrorRetrievalInitiate (IxHssAccHssPort hssPortId);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccInit () * * @brief This function is responsible for initialising resources for use * by the packetised and channelised clients. It should be called after  * HSS NPE image has been downloaded into NPE-A and before any other * HssAccess interface is called.  * No other HssAccPacketised interface should be called while this interface * is being processed. * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_RESOURCE_ERR The function did not execute successfully due *                          to a resource error  */PUBLIC IX_STATUS ixHssAccInit (void);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccUninit () * * @brief This function is responsible for un-initialize of resources for use * by the packetised and channelised clients. It internally calls the uninitialize * functions of sub components. * This function should be the last function to be called before exiting HssAcc component.  * * @return *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully */PUBLIC IX_STATUSixHssAccUninit (void);/** * * @ingroup IxHssAccAPI * * @fn ixHssAccPktPortConnect (IxHssAccHssPort hssPortId, 			IxHssAccHdlcPort hdlcPortId, 			BOOL hdlcFraming, 			IxHssAccHdlcMode hdlcMode,			BOOL hdlcBitInvert,			unsigned blockSizeInWords,			UINT32 rawIdleBlockPattern,			IxHssAccPktHdlcFraming hdlcTxFraming, 			IxHssAccPktHdlcFraming hdlcRxFraming, 			unsigned frmFlagStart, 			IxHssAccPktRxCallback rxCallback,			IxHssAccPktUserId rxUserId, 			IxHssAccPktRxFreeLowCallback rxFreeLowCallback, 			IxHssAccPktUserId rxFreeLowUserId,			IxHssAccPktTxDoneCallback txDoneCallback,			IxHssAccPktUserId txDoneUserId)  * * @brief This function is responsible for connecting a client to one of  * the 4 available HDLC ports. The HSS port should be configured before  * attempting a connect. No other HssAccPacketised interface should be * called while this connect is being processed. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).  * @param hdlcPortId @ref IxHssAccHdlcPort [in] - This is the number of the HDLC port and  * it corresponds to the physical E1/T1 trunk i.e. 0, 1, 2, 3  * @param hdlcFraming BOOL [in] - This value determines whether the service  * will use HDLC data or the debug, raw data type i.e. no HDLC processing * @param hdlcMode @ref IxHssAccHdlcMode [in] - This structure contains 56Kbps, HDLC-mode * configuration parameters * @param hdlcBitInvert BOOL [in] - This value determines whether bit inversion * will occur between HDLC and HSS co-processors i.e. post-HDLC processing for * transmit and pre-HDLC processing for receive, for the specified HDLC Termination * Point * @param blockSizeInWords unsigned [in] -  The max tx/rx block size  * @param rawIdleBlockPattern UINT32 [in] -  Tx idle pattern in raw mode  * @param hdlcTxFraming @ref IxHssAccPktHdlcFraming [in] - This structure contains  * the following information required by the NPE to configure the HDLC  * co-processor for TX * @param hdlcRxFraming @ref IxHssAccPktHdlcFraming [in] -  This structure contains  * the following information required by the NPE to configure the HDLC  * co-processor for RX * @param frmFlagStart unsigned - Number of flags to precede to  * transmitted flags (0-2). * @param rxCallback @ref IxHssAccPktRxCallback [in] - Pointer to  * the clients packet receive function. * @param rxUserId @ref IxHssAccPktUserId [in] - The client supplied rx value * to be passed back as an argument to the supplied rxCallback * @param rxFreeLowCallback @ref IxHssAccPktRxFreeLowCallback [in] - Pointer to  * the clients Rx free buffer request function.  If NULL, assume client will  * trigger independently. * @param rxFreeLowUserId @ref IxHssAccPktUserId [in] - The client supplied RxFreeLow value * to be passed back as an argument to the supplied rxFreeLowCallback * @param txDoneCallback @ref IxHssAccPktTxDoneCallback [in] - Pointer to the  * clients Tx done callback function * @param txDoneUserId @ref IxHssAccPktUserId [in] - The client supplied txDone value * to be passed back as an argument to the supplied txDoneCallback * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_PARAM_ERR The function did not execute successfully due to a *                          parameter error *         - IX_HSSACC_RESOURCE_ERR The function did not execute successfully due *                          to a resource error */PUBLIC IX_STATUS ixHssAccPktPortConnect (IxHssAccHssPort hssPortId, 			IxHssAccHdlcPort hdlcPortId, 			BOOL hdlcFraming, 			IxHssAccHdlcMode hdlcMode,			BOOL hdlcBitInvert,			unsigned blockSizeInWords,			UINT32 rawIdleBlockPattern,			IxHssAccPktHdlcFraming hdlcTxFraming, 			IxHssAccPktHdlcFraming hdlcRxFraming, 			unsigned frmFlagStart, 			IxHssAccPktRxCallback rxCallback,			IxHssAccPktUserId rxUserId, 			IxHssAccPktRxFreeLowCallback rxFreeLowCallback, 			IxHssAccPktUserId rxFreeLowUserId,			IxHssAccPktTxDoneCallback txDoneCallback,			IxHssAccPktUserId txDoneUserId);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccPktPortEnable (IxHssAccHssPort hssPortId,            IxHssAccHdlcPort hdlcPortId) * * @brief This function is responsible for enabling a packetised service * for the specified HSS/HDLC port combination. It enables the RX flow. The * client must have already connected to a packetised service and is responsible  * for ensuring an adequate amount of RX mbufs have been supplied to the access * component before enabling the packetised service. This function must be called * on a given port before any call to ixHssAccPktPortTx on the same port.  * No other HssAccPacketised interface should be called while this interface is  * being processed. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).    * @param hdlcPortId @ref IxHssAccHdlcPort [in] - The port id (0,1,2,3) to enable the service * on. * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_PARAM_ERR The function did not execute successfully due to a *                          parameter error */PUBLIC IX_STATUS ixHssAccPktPortEnable (IxHssAccHssPort hssPortId, 		       IxHssAccHdlcPort hdlcPortId);/** * @fn IX_STATUS ixHssAccPktPortDisable (IxHssAccHssPort hssPortId,            IxHssAccHdlcPort hdlcPortId) * * @brief This function is responsible for disabling a packetised service * for the specified HSS/HDLC port combination. It disables the RX flow.  * The client must have already connected to and enabled a packetised service  * for the specified HDLC port. This disable interface can be called before a * disconnect, but is not required to. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).  * @param hdlcPortId @ref IxHssAccHdlcPort [in] - The port id (0,1,2,3) to disable  * the service on. * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_PARAM_ERR The function did not execute successfully due to a *                          parameter error */PUBLIC IX_STATUS ixHssAccPktPortDisable (IxHssAccHssPort hssPortId, 			IxHssAccHdlcPort hdlcPortId);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccPktPortDisconnect (IxHssAccHssPort hssPortId,            IxHssAccHdlcPort hdlcPortId) * * @brief This function is responsible for disconnecting a client from one * of the 4 available HDLC ports. It is not required that the Rx Flow  * has been disabled before calling this function.  If the RX Flow has not been * disabled, the disconnect will disable it before proceeding with the * disconnect.  No other HssAccPacketised  * interface should be called while this interface is being processed. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).  * @param hdlcPortId @ref IxHssAccHdlcPort [in] - This is the number of the HDLC port * to disconnect and it corresponds to the physical E1/T1 trunk i.e. 0, 1, 2, 3 * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully  *         - IX_HSSACC_PKT_DISCONNECTING The function has initiated the disconnecting *                             procedure but it has not completed yet. */PUBLIC IX_STATUS ixHssAccPktPortDisconnect (IxHssAccHssPort hssPortId, 			   IxHssAccHdlcPort hdlcPortId);/** * * @ingroup IxHssAccAPI * * @fn BOOL ixHssAccPktPortIsDisconnectComplete (IxHssAccHssPort hssPortId,            IxHssAccHdlcPort hdlcPortId) * * @brief This function is called to check if a given HSS/HDLC port  * combination is in a connected state or not. This function may be called  * at any time to determine a ports state.  No other HssAccPacketised  * interface should be called while this interface is being processed. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).  * @param hdlcPortId @ref IxHssAccHdlcPort [in] - This is the number of the HDLC port * to disconnect and it corresponds to the physical E1/T1 trunk i.e. 0, 1, 2, 3 * * @return  *         - TRUE The state of this HSS/HDLC port combination is disconnected, *                so if a disconnect was called, it is now completed. *         - FALSE The state of this HSS/HDLC port combination is connected, *                so if a disconnect was called, it is not yet completed. */PUBLIC BOOL ixHssAccPktPortIsDisconnectComplete (IxHssAccHssPort hssPortId, 				     IxHssAccHdlcPort hdlcPortId);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccPktPortRxFreeReplenish (IxHssAccHssPort hssPortId,               IxHssAccHdlcPort hdlcPortId, 	      IX_OSAL_MBUF *buffer) * * @brief Function which the client calls at regular intervals to provide * mbufs to the access component for RX. A connection should exist for * the specified hssPortId/hdlcPortId combination before attempting to call this  * interface. Also, the connection should not be in a disconnecting state. * * @param hssPortId @ref IxHssAccHssPort [in] - The HSS port Id. There are two * identical ports (0-1).  * @param hdlcPortId @ref IxHssAccHdlcPort [in] - This is the number of the HDLC port * and it corresponds to the physical E1/T1 trunk i.e. 0, 1, 2, 3 * @param *buffer @ref IX_OSAL_MBUF [in] - A pointer to a free mbuf to filled with payload. * * @return  *         - IX_SUCCESS The function executed successfully *         - IX_FAIL The function did not execute successfully *         - IX_HSSACC_PARAM_ERR The function did not execute successfully due to a *                          parameter error *         - IX_HSSACC_RESOURCE_ERR The function did not execute successfully due *                          to a resource error *         - IX_HSSACC_Q_WRITE_OVERFLOW The function did not succeed due to a Q *                                      overflow */PUBLIC IX_STATUS ixHssAccPktPortRxFreeReplenish (IxHssAccHssPort hssPortId, 				IxHssAccHdlcPort hdlcPortId, 				IX_OSAL_MBUF *buffer);/** * * @ingroup IxHssAccAPI * * @fn IX_STATUS ixHssAccPktPortTx (IxHssAccHssPort hssPortId,     IxHssAccHdlcPort hdlcPortId,     IX_OSAL_MBUF *buffer) * * @brief Function which the client calls when it wants to transmit * packetised data. An enabled connection should exist on the specified

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -