📄 ixhssacc.h
字号:
* */typedef enum{ IX_HSSACC_CLK_RATE, /**< Data rate is at the configured clk speed */ IX_HSSACC_HALF_CLK_RATE, /**< Data rate is half the configured clk speed */ IX_HSSACC_DATA_RATE_MAX /**< Delimiter for error checks */} IxHssAccDataRate;/** * @enum IxHssAccDataPolarity * @brief The HSS data polarity type * */typedef enum{ IX_HSSACC_DATA_POLARITY_SAME, /**< Don't invert data between NPE and HSS FIFOs */ IX_HSSACC_DATA_POLARITY_INVERT, /**< Invert data between NPE and HSS FIFOs */ IX_HSSACC_DATA_POLARITY_MAX /**< Delimiter for error checks */} IxHssAccDataPolarity;/** * @enum IxHssAccBitEndian * @brief HSS Data endianness * */typedef enum{ IX_HSSACC_LSB_ENDIAN, /**< TX/RX Least Significant Bit first */ IX_HSSACC_MSB_ENDIAN, /**< TX/RX Most Significant Bit first */ IX_HSSACC_ENDIAN_MAX /**< Delimiter for the purposes of error checks */} IxHssAccBitEndian;/** * @enum IxHssAccDrainMode * @brief Tx pin open drain mode * */typedef enum{ IX_HSSACC_TX_PINS_NORMAL, /**< Normal mode */ IX_HSSACC_TX_PINS_OPEN_DRAIN, /**< Open Drain mode */ IX_HSSACC_TX_PINS_MAX /**< Delimiter for error checks */} IxHssAccDrainMode;/** * @enum IxHssAccSOFType * @brief HSS start of frame types * */typedef enum{ IX_HSSACC_SOF_FBIT, /**< Framing bit transmitted and expected on rx */ IX_HSSACC_SOF_DATA, /**< Framing bit not transmitted nor expected on rx */ IX_HSSACC_SOF_MAX /**< Delimiter for error checks */} IxHssAccSOFType;/** * @enum IxHssAccDataEnable * @brief IxHssAccDataEnable is used to determine whether or not to drive * the data pins * */typedef enum{ IX_HSSACC_DE_TRI_STATE, /**< TRI-State the data pins */ IX_HSSACC_DE_DATA, /**< Push data out the data pins */ IX_HSSACC_DE_MAX /**< Delimiter for error checks */} IxHssAccDataEnable;/** * @enum IxHssAccTxSigType * @brief IxHssAccTxSigType is used to determine how to drive the data pins * */typedef enum{ IX_HSSACC_TXSIG_LOW, /**< Drive the data pins low */ IX_HSSACC_TXSIG_HIGH, /**< Drive the data pins high */ IX_HSSACC_TXSIG_HIGH_IMP, /**< Drive the data pins with high impedance */ IX_HSSACC_TXSIG_MAX /**< Delimiter for error checks */} IxHssAccTxSigType;/** * @enum IxHssAccFbType * @brief IxHssAccFbType determines how to drive the Fbit * * @warning This will only be used for T1 @ 1.544MHz * */typedef enum{ IX_HSSACC_FB_FIFO, /**< Fbit is dictated in FIFO */ IX_HSSACC_FB_HIGH_IMP, /**< Fbit is high impedance */ IX_HSSACC_FB_MAX /**< Delimiter for error checks */} IxHssAccFbType;/** * @enum IxHssAcc56kEndianness * @brief 56k data endianness when using the 56k type * */typedef enum{ IX_HSSACC_56KE_BIT_7_UNUSED, /**< High bit is unused */ IX_HSSACC_56KE_BIT_0_UNUSED, /**< Low bit is unused */ IX_HSSACC_56KE_MAX /**< Delimiter for error checks */} IxHssAcc56kEndianness;/** * @enum IxHssAcc56kSel * @brief 56k data transmission type when using the 56k type * */typedef enum{ IX_HSSACC_56KS_32_8_DATA, /**< 32/8 bit data */ IX_HSSACC_56KS_56K_DATA, /**< 56K data */ IX_HSSACC_56KS_MAX /**< Delimiter for error checks */} IxHssAcc56kSel;/** * @enum IxHssAccClkSpeed * @brief IxHssAccClkSpeed represents the HSS clock speeds available * */typedef enum{ IX_HSSACC_CLK_SPEED_512KHZ, /**< 512KHz */ IX_HSSACC_CLK_SPEED_1536KHZ, /**< 1.536MHz */ IX_HSSACC_CLK_SPEED_1544KHZ, /**< 1.544MHz */ IX_HSSACC_CLK_SPEED_2048KHZ, /**< 2.048MHz */ IX_HSSACC_CLK_SPEED_4096KHZ, /**< 4.096MHz */ IX_HSSACC_CLK_SPEED_8192KHZ, /**< 8.192MHz */ IX_HSSACC_CLK_SPEED_MAX /**< Delimiter for error checking */} IxHssAccClkSpeed;/** * @enum IxHssAccPktStatus * @brief Indicates the status of packets passed to the client * */typedef enum{ IX_HSSACC_PKT_OK, /**< Error free.*/ IX_HSSACC_STOP_SHUTDOWN_ERROR, /**< Errored due to stop or shutdown occurrance.*/ IX_HSSACC_HDLC_ALN_ERROR, /**< HDLC alignment error */ IX_HSSACC_HDLC_FCS_ERROR, /**< HDLC Frame Check Sum error.*/ IX_HSSACC_RXFREE_Q_EMPTY_ERROR, /**< RxFree Q became empty while receiving this packet.*/ IX_HSSACC_HDLC_MAX_FRAME_SIZE_EXCEEDED, /**< HDLC frame size received is greater than max specified at connect.*/ IX_HSSACC_HDLC_ABORT_ERROR, /**< HDLC frame received is invalid due to an abort sequence received.*/ IX_HSSACC_DISCONNECT_IN_PROGRESS /**< Packet returned because a disconnect is in progress */} IxHssAccPktStatus;/** * @enum IxHssAccPktCrcType * @brief HDLC CRC type * */typedef enum{ IX_HSSACC_PKT_16_BIT_CRC = 16, /**< 16 bit CRC is being used */ IX_HSSACC_PKT_32_BIT_CRC = 32 /**< 32 bit CRC is being used */} IxHssAccPktCrcType;/** * @enum IxHssAccPktHdlcIdleType * @brief HDLC idle transmission type * */typedef enum{ IX_HSSACC_HDLC_IDLE_ONES, /**< idle tx/rx will be a succession of ones */ IX_HSSACC_HDLC_IDLE_FLAGS /**< idle tx/rx will be repeated flags */} IxHssAccPktHdlcIdleType;/** * @brief Structure containing HSS port configuration parameters * * Note: All of these are used for TX. Only some are specific to RX. * */typedef struct{ IxHssAccFrmSyncType frmSyncType; /**< frame sync pulse type (tx/rx) */ IxHssAccFrmSyncEnable frmSyncIO; /**< how the frame sync pulse is used (tx/rx) */ IxHssAccClkEdge frmSyncClkEdge; /**< frame sync clock edge type (tx/rx) */ IxHssAccClkEdge dataClkEdge; /**< data clock edge type (tx/rx) */ IxHssAccClkDir clkDirection; /**< clock direction (tx/rx) */ IxHssAccFrmPulseUsage frmPulseUsage; /**< whether to use the frame sync pulse or not (tx/rx) */ IxHssAccDataRate dataRate; /**< data rate in relation to the clock (tx/rx) */ IxHssAccDataPolarity dataPolarity; /**< data polarity type (tx/rx) */ IxHssAccBitEndian dataEndianness; /**< data endianness (tx/rx) */ IxHssAccDrainMode drainMode; /**< tx pin open drain mode (tx) */ IxHssAccSOFType fBitUsage; /**< start of frame types (tx/rx) */ IxHssAccDataEnable dataEnable; /**< whether or not to drive the data pins (tx) */ IxHssAccTxSigType voice56kType; /**< how to drive the data pins for voice56k type (tx) */ IxHssAccTxSigType unassignedType; /**< how to drive the data pins for unassigned type (tx) */ IxHssAccFbType fBitType; /**< how to drive the Fbit (tx) */ IxHssAcc56kEndianness voice56kEndian;/**< 56k data endianness when using the 56k type (tx) */ IxHssAcc56kSel voice56kSel; /**< 56k data transmission type when using the 56k type (tx) */ unsigned frmOffset; /**< frame pulse offset in bits wrt the first timeslot (0-1023) (tx/rx) */ unsigned maxFrmSize; /**< frame size in bits (1-1024) (tx/rx) */} IxHssAccPortConfig;/** * @brief Structure containing HSS configuration parameters * */typedef struct{ IxHssAccPortConfig txPortConfig; /**< HSS tx port configuration */ IxHssAccPortConfig rxPortConfig; /**< HSS rx port configuration */ unsigned numChannelised; /**< The number of channelised timeslots (0-32) */ unsigned hssPktChannelCount; /**< The number of packetised clients (0 - 4) */ UINT8 channelisedIdlePattern; /**< The byte to be transmitted on channelised service when there is no client data to tx */ BOOL loopback; /**< The HSS loopback state */ unsigned packetizedIdlePattern; /**< The data to be transmitted on packetised service when there is no client data to tx */ IxHssAccClkSpeed clkSpeed; /**< The HSS clock speed */} IxHssAccConfigParams;/** * @brief This structure contains 56Kbps, HDLC-mode configuration parameters * */typedef struct{ BOOL hdlc56kMode; /**< 56kbps(TRUE)/64kbps(FALSE) HDLC */ IxHssAcc56kEndianness hdlc56kEndian; /**< 56kbps data endianness - ignored if hdlc56kMode is FALSE*/ BOOL hdlc56kUnusedBitPolarity0; /**< The polarity '0'(TRUE)/'1'(FALSE) of the unused bit while in 56kbps mode - ignored if hdlc56kMode is FALSE*/} IxHssAccHdlcMode;/** * @brief This structure contains information required by the NPE to * configure the HDLC co-processor * */typedef struct{ IxHssAccPktHdlcIdleType hdlcIdleType; /**< What to transmit when a HDLC port is idle */ IxHssAccBitEndian dataEndian; /**< The HDLC data endianness */ IxHssAccPktCrcType crcType; /**< The CRC type to be used for this HDLC port */} IxHssAccPktHdlcFraming;/** * @typedef UINT32 IxHssAccPktUserId * * @brief The client supplied value which will be supplied as a parameter * with a given callback. * * This value will be passed into the ixHssAccPktPortConnect function once each * with given callbacks. This value will then be passed back to the client * as one of the parameters to each of these callbacks, * when these callbacks are called. */typedef UINT32 IxHssAccPktUserId;/** * @typedef IxHssAccLastErrorCallback * @brief Prototype of the clients function to accept notification of the * last error * * This function is registered through the config. The client will initiate * the last error retrieval. The HssAccess component will send a message to * the NPE through the NPE Message Handler. When a response to the read is * received, the NPE Message Handler will callback the HssAccess component * which will execute this function in the same IxNpeMh context. The client * will be passed the last error and the related service port (packetised * 0-3, channelised 0) * * @param lastHssError unsigned [in] - The last Hss error registered that * has been registered. * @param servicePort unsigned [in] - This is the service port number. * (packetised 0-3, channelised 0) * * @return void */typedef void (*IxHssAccLastErrorCallback) (unsigned lastHssError, unsigned servicePort);/** * @typedef IxHssAccPktRxCallback * @brief Prototype of the clients function to accept notification of * packetised rx * * This function is registered through the ixHssAccPktPortConnect. hssPktAcc will pass * received data in the form of mbufs to the client. The mbuf passed back * to the client could contain a chain of buffers, depending on the packet * size received. * * @param *buffer @ref IX_OSAL_MBUF [in] - This is the mbuf which contains the * payload received. * @param numHssErrs unsigned [in] - This is the number of hssErrors * the Npe has received * @param pktStatus @ref IxHssAccPktStatus [in] - This is the status of the * mbuf that has been received. * @param rxUserId @ref IxHssAccPktUserId [in] - This is the client supplied value * passed in at ixHssAccPktPortConnect time which is now returned to the client.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -