📄 ixsspacc.h
字号:
* This API will enable the service request interrupt of the Tx FIFO. * * @return * - IX_SSP_SUCCESS - Tx FIFO level interrupt enabled successfully * - IX_SSP_TX_FIFO_HANDLER_MISSING - missing handler for Tx FIFO level interrupt * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not * allowed to be enabled. Use init to enable interrupt mode. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccTxFIFOIntEnable ( TxFIFOThresholdHandler txFIFOIntrHandler);/** * @ingroup IxSspAcc * * @fn ixSspAccTxFIFOIntDisable ( void) * * @brief Disables service request interrupt of the Tx FIFO * * @param - None * * Global Data : * - None. * * This API will disable the service request interrupt of the Tx FIFO * * @return * - IX_SSP_SUCCESS - Tx FIFO Interrupt disabled successfuly. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccTxFIFOIntDisable ( void);/** * @ingroup IxSspAcc * * @fn ixSspAccLoopbackEnable ( BOOL loopbackEnable) * * @brief Enables/disables the loopback mode * * @param "BOOL [in] loopbackEnable" - True to enable and false to disable. * * Global Data : * - None. * * This API will set the mode of operation to either loopback or normal mode * according to the user input. * * @return * - IX_SSP_SUCCESS - Loopback enabled successfully * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccLoopbackEnable ( BOOL loopbackEnable);/** * @ingroup IxSspAcc * * @fn ixSspAccSpiSclkPolaritySet ( IxSspAccSpiSclkPolarity spiSclkPolaritySelected) * * @brief Sets the SPI SCLK Polarity to Low or High * * @param - "IxSspAccSpiSclkPolarity [in] spiSclkPolaritySelected" - SPI SCLK * polarity that can be selected to either high or low * * Global Data : * - None. * * This API is only used for the SPI frame format and will set the SPI SCLK polarity * to either low or high * * @return * - IX_SSP_SUCCESS - SPI Sclk polarity set with valid enum value * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - invalid SPI polarity value * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccSpiSclkPolaritySet ( IxSspAccSpiSclkPolarity spiSclkPolaritySelected);/** * @ingroup IxSspAcc * * @fn ixSspAccSpiSclkPhaseSet ( IxSspAccSpiSclkPhase spiSclkPhaseSelected) * * @brief Sets the SPI SCLK Phase * * @param "IxSspAccSpiSclkPhase [in] spiSclkPhaseSelected" - Phase of either * the SCLK is inactive one cycle at the start of a frame and 1/2 * cycle at the end of a frame, OR * the SCLK is inactive 1/2 cycle at the start of a frame and one * cycle at the end of a frame. * * Global Data : * - IX_SSP_SUCCESS - SPI Sclk phase set with valid enum value * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - invalid SPI phase value * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * This API is only used for the SPI frame format and will set the SPI SCLK * phase according to user input. * * @return * - None * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccSpiSclkPhaseSet ( IxSspAccSpiSclkPhase spiSclkPhaseSelected);/** * @ingroup IxSspAcc * * @fn ixSspAccMicrowireControlWordSet ( IxSspAccMicrowireCtlWord microwireCtlWordSelected) * * @brief Sets the Microwire control word to 8 or 16 bit format * * @param "IxSspAccMicrowireCtlWord [in] microwireCtlWordSelected" - Microwire * control word format can be either 8 or 16 bit format * * Global Data : * - None. * * This API is only used for the Microwire frame format and will set the * control word to 8 or 16 bit format * * @return * - IX_SSP_SUCCESS - Microwire Control Word set with valid enum value * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not * allowed. * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - invalid enum value * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccMicrowireControlWordSet ( IxSspAccMicrowireCtlWord microwireCtlWordSelected);/** * @ingroup IxSspAcc * * @fn ixSspAccTxFIFOThresholdSet ( IxSspAccFifoThreshold txFIFOThresholdSelected) * * @brief Sets the Tx FIFO Threshold. * * @param "IxSspAccFifoThreshold [in] txFIFOThresholdSelected" - Threshold that * is set for a Tx FIFO service request to be triggered * * Global Data : * - None. * * This API will set the threshold for a Tx FIFO threshold to be triggered * * @return * - IX_SSP_SUCCESS - Tx FIFO Threshold set with valid enum value * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccTxFIFOThresholdSet ( IxSspAccFifoThreshold txFIFOThresholdSelected);/** * @ingroup IxSspAcc * * @fn ixSspAccRxFIFOThresholdSet ( IxSspAccFifoThreshold rxFIFOThresholdSelected) * * @brief Sets the Rx FIFO Threshold. * * @param "IxSspAccFifoThreshold [in] rxFIFOThresholdSelected" - Threshold that * is set for a Tx FIFO service request to be triggered * * Global Data : * - None. * * This API will will set the threshold for a Rx FIFO threshold to be triggered * * @return * - IX_SSP_SUCCESS - Rx FIFO Threshold set with valid enum value * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccRxFIFOThresholdSet ( IxSspAccFifoThreshold rxFIFOThresholdSelected);/** * Debug functions *//** * @ingroup IxSspAcc * * @fn ixSspAccStatsGet ( IxSspAccStatsCounters *sspStats) * * @brief Returns the SSP Statistics through the pointer passed in * * @param "IxSspAccStatsCounters [in] *sspStats" - SSP statistics counter will * be read and written to the location pointed by this pointer. * * Global Data : * - None. * * This API will return the statistics counters of the SSP transfers. * * @return * - IX_SSP_SUCCESS - Stats obtained into the pointer provided successfully * - IX_SSP_FAIL - client provided pointer is NULL * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccStatsGet ( IxSspAccStatsCounters *sspStats);/** * @ingroup IxSspAcc * * @fn ixSspAccStatsReset ( void) * * @brief Resets the SSP Statistics * * @param - None * * Global Data : * - None. * * This API will reset the SSP statistics counters. * * @return * - None * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC voidixSspAccStatsReset ( void);/** * @ingroup IxSspAcc * * @fn ixSspAccShow ( void) * * @brief Display SSP status registers and statistics counters. * * @param - None * * Global Data : * - None. * * This API will display the status registers of the SSP and the statistics * counters. * * @return * - IX_SSP_SUCCESS - SSP show called successfully. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccShow ( void);/** * @ingroup IxSspAcc * * @fn ixSspAccSSPBusyCheck ( void) * * @brief Determine the state of the SSP serial port hardware. * * @param - None * * Global Data : * - None. * * This API will return the state of the SSP serial port hardware - busy or * idle * * @return * - IX_SSP_BUSY - SSP is busy * - IX_SSP_IDLE - SSP is idle. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccSSPBusyCheck ( void);/** * @ingroup IxSspAcc * * @fn ixSspAccTxFIFOLevelGet ( void) * * @brief Obtain the Tx FIFO's level * * @param - None * * Global Data : * - None. * * This API will return the level of the Tx FIFO * * @return * - 0..16; 0 can also mean SSP not initialized and will need to be init. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC UINT8ixSspAccTxFIFOLevelGet ( void);/** * @ingroup IxSspAcc * * @fn ixSspAccRxFIFOLevelGet ( void) * * @brief Obtain the Rx FIFO's level * * @param - None * * Global Data : * - None. * * This API will return the level of the Rx FIFO * * @return * - 0..16; 0 can also mean SSP not initialized and will need to be init. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC UINT8ixSspAccRxFIFOLevelGet ( void);/** * @ingroup IxSspAcc * * @fn ixSspAccRxFIFOOverrunCheck ( void) * * @brief Check if the Rx FIFO has overrun its FIFOs * * @param - None * * Global Data : * - None. * * This API will return whether the Rx FIFO has overrun its 16 FIFOs * * @return * - IX_SSP_OVERRUN_OCCURRED - Rx FIFO overrun occurred * - IX_SSP_NO_OVERRUN - Rx FIFO did not overrun * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called. * * @li Reentrant : yes * @li ISR Callable : yes * */PUBLIC IX_SSP_STATUSixSspAccRxFIFOOverrunCheck ( void);#endif /* __ixp46X */#endif /* IXSSPACC_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -