4 * @brief Header file for the IXP400 SSP Serial Port Access (IxSspAcc)
6 * @version $Revision: 0.1 $
9 * IXP400 SW Release version 2.0
11 * -- Copyright Notice --
14 * Copyright 2001-2005, Intel Corporation.
15 * All rights reserved.
18 * SPDX-License-Identifier: BSD-3-Clause
20 * -- End of Copyright Notice --
24 * @defgroup IxSspAcc IXP400 SSP Serial Port Access (IxSspAcc) API
26 * @brief IXP400 SSP Serial Port Access Public API
43 * @enum IxSspAccDataSize
45 * @brief The data sizes in bits that are supported by the protocol
49 DATA_SIZE_TOO_SMALL = 0x2,
69 * @enum IxSspAccPortStatus
71 * @brief The status of the SSP port to be set to enable/disable
75 SSP_PORT_DISABLE = 0x0,
77 INVALID_SSP_PORT_STATUS
83 * @enum IxSspAccFrameFormat
85 * @brief The frame format that is to be used - SPI, SSP, or Microwire
93 } IxSspAccFrameFormat;
98 * @enum IxSspAccClkSource
100 * @brief The source to produce the SSP serial clock
112 * @enum IxSspAccSpiSclkPhase
114 * @brief The SPI SCLK Phase:
115 * 0 - SCLK is inactive one cycle at the start of a frame and 1/2 cycle at the
117 * 1 - SCLK is inactive 1/2 cycle at the start of a frame and one cycle at the
122 START_ONE_END_HALF = 0x0,
125 } IxSspAccSpiSclkPhase;
130 * @enum IxSspAccSpiSclkPolarity
132 * @brief The SPI SCLK Polarity can be set to either low or high.
136 SPI_POLARITY_LOW = 0x0,
139 } IxSspAccSpiSclkPolarity;
144 * @enum IxSspAccMicrowireCtlWord
146 * @brief The Microwire control word can be either 8 or 16 bit.
150 MICROWIRE_8_BIT = 0x0,
152 INVALID_MICROWIRE_CTL_WORD
153 } IxSspAccMicrowireCtlWord;
158 * @enum IxSspAccFifoThreshold
160 * @brief The threshold in frames (each frame is defined by IxSspAccDataSize)
161 * that can be set for the FIFO to trigger a threshold exceed when
162 * checking with the ExceedThresholdCheck functions or an interrupt
163 * when it is enabled.
184 } IxSspAccFifoThreshold;
189 * @enum IX_SSP_STATUS
191 * @brief The statuses that can be returned in a SSP Serial Port Access
195 IX_SSP_SUCCESS = IX_SUCCESS, /**< Success status */
196 IX_SSP_FAIL, /**< Fail status */
197 IX_SSP_RX_FIFO_OVERRUN_HANDLER_MISSING, /**<
198 Rx FIFO Overrun handler is NULL. */
199 IX_SSP_RX_FIFO_HANDLER_MISSING, /**<
200 Rx FIFO threshold hit or above handler is NULL
202 IX_SSP_TX_FIFO_HANDLER_MISSING, /**<
203 Tx FIFO threshold hit or below handler is NULL
205 IX_SSP_FIFO_NOT_EMPTY_FOR_SETTING_CTL_CMD, /**<
206 Tx FIFO not empty and therefore microwire
207 control command size setting is not allowed. */
208 IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE, /**<
209 frame format selected is invalid. */
210 IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE, /**<
211 data size selected is invalid. */
212 IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE, /**<
213 source clock selected is invalid. */
214 IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE, /**<
215 Tx FIFO threshold selected is invalid. */
216 IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE, /**<
217 Rx FIFO threshold selected is invalid. */
218 IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE, /**<
219 SPI phase selected is invalid. */
220 IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE, /**<
221 SPI polarity selected is invalid. */
222 IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE, /**<
223 Microwire control command selected is invalid
225 IX_SSP_INT_UNBIND_FAIL, /**< Interrupt unbind fail to unbind SSP
227 IX_SSP_INT_BIND_FAIL, /**< Interrupt bind fail during init */
228 IX_SSP_RX_FIFO_NOT_EMPTY, /**<
229 Rx FIFO not empty while trying to change data
231 IX_SSP_TX_FIFO_NOT_EMPTY, /**<
232 Rx FIFO not empty while trying to change data
233 size or microwire control command size. */
234 IX_SSP_POLL_MODE_BLOCKING, /**<
235 poll mode selected blocks interrupt mode from
237 IX_SSP_TX_FIFO_HIT_BELOW_THRESHOLD, /**<
238 Tx FIFO level hit or below threshold. */
239 IX_SSP_TX_FIFO_EXCEED_THRESHOLD, /**<
240 Tx FIFO level exceeded threshold. */
241 IX_SSP_RX_FIFO_HIT_ABOVE_THRESHOLD, /**<
242 Rx FIFO level hit or exceeded threshold. */
243 IX_SSP_RX_FIFO_BELOW_THRESHOLD, /**<
244 Rx FIFO level below threshold. */
245 IX_SSP_BUSY, /**< SSP is busy. */
246 IX_SSP_IDLE, /**< SSP is idle. */
247 IX_SSP_OVERRUN_OCCURRED, /**<
248 SSP has experienced an overrun. */
249 IX_SSP_NO_OVERRUN, /**<
250 SSP did not experience an overrun. */
251 IX_SSP_NOT_SUPORTED, /**< hardware does not support SSP */
252 IX_SSP_NOT_INIT, /**< SSP Access not intialized */
253 IX_SSP_NULL_POINTER /**< parameter passed in is NULL */
259 * @brief SSP Rx FIFO Overrun handler
261 * This function is called for the client to handle Rx FIFO Overrun that occurs
262 * in the SSP hardware
264 typedef void (*RxFIFOOverrunHandler)(void);
269 * @brief SSP Rx FIFO Threshold hit or above handler
271 * This function is called for the client to handle Rx FIFO threshold hit or
272 * or above that occurs in the SSP hardware
274 typedef void (*RxFIFOThresholdHandler)(void);
279 * @brief SSP Tx FIFO Threshold hit or below handler
281 * This function is called for the client to handle Tx FIFO threshold hit or
282 * or below that occurs in the SSP hardware
284 typedef void (*TxFIFOThresholdHandler)(void);
293 * @brief contains all the variables required to initialize the SSP serial port
296 * Structure to be filled and used for calling initialization
300 IxSspAccFrameFormat FrameFormatSelected;/**<Select between SPI, SSP and
302 IxSspAccDataSize DataSizeSelected; /**<Select between 4 and 16. */
303 IxSspAccClkSource ClkSourceSelected; /**<Select clock source to be
304 on-chip or external. */
305 IxSspAccFifoThreshold TxFIFOThresholdSelected;
306 /**<Select Tx FIFO threshold
308 IxSspAccFifoThreshold RxFIFOThresholdSelected;
309 /**<Select Rx FIFO threshold
311 BOOL RxFIFOIntrEnable; /**<Enable/disable Rx FIFO
312 threshold interrupt. Disabling
313 this interrupt will require
314 the use of the polling function
315 RxFIFOExceedThresholdCheck. */
316 BOOL TxFIFOIntrEnable; /**<Enable/disable Tx FIFO
317 threshold interrupt. Disabling
318 this interrupt will require
319 the use of the polling function
320 TxFIFOExceedThresholdCheck. */
321 RxFIFOThresholdHandler RxFIFOThsldHdlr; /**<Pointer to function to handle
322 a Rx FIFO interrupt. */
323 TxFIFOThresholdHandler TxFIFOThsldHdlr; /**<Pointer to function to handle
324 a Tx FIFO interrupt. */
325 RxFIFOOverrunHandler RxFIFOOverrunHdlr; /**<Pointer to function to handle
326 a Rx FIFO overrun interrupt. */
327 BOOL LoopbackEnable; /**<Select operation mode to be
328 normal or loopback mode. */
329 IxSspAccSpiSclkPhase SpiSclkPhaseSelected;
330 /**<Select SPI SCLK phase to start
331 with one inactive cycle and end
332 with 1/2 inactive cycle or
333 start with 1/2 inactive cycle
334 and end with one inactive
337 IxSspAccSpiSclkPolarity SpiSclkPolaritySelected;
338 /**<Select SPI SCLK idle state
339 to be low or high. (Only used in
341 IxSspAccMicrowireCtlWord MicrowireCtlWordSelected;
342 /**<Select Microwire control
343 format to be 8 or 16-bit. (Only
344 used in Microwire format). */
345 UINT8 SerialClkRateSelected; /**<Select between 0 (1.8432Mbps)
346 and 255 (7.2Kbps). The
347 formula used is Bit rate =
349 (2 x (SerialClkRateSelect + 1))
356 * @brief contains counters of the SSP statistics
358 * Structure contains all values of counters and associated overflows.
362 UINT32 ixSspRcvCounter; /**<Total frames received. */
363 UINT32 ixSspXmitCounter; /**<Total frames transmitted. */
364 UINT32 ixSspOverflowCounter;/**<Total occurrences of overflow. */
365 } IxSspAccStatsCounters;
369 * Section for prototypes interface functions
376 IxSspInitVars *initVarsSelected);
378 * @brief Initializes the SSP Access module.
380 * @param "IxSspAccInitVars [in] *initVarsSelected" - struct containing required
381 * variables for initialization
386 * This API will initialize the SSP Serial Port hardware to the user specified
387 * configuration. Then it will enable the SSP Serial Port.
388 * *NOTE*: Once interrupt or polling mode is selected, the mode cannot be
389 * changed via the interrupt enable/disable function but the init needs to be
390 * called again to change it.
393 * - IX_SSP_SUCCESS - Successfully initialize and enable the SSP
395 * - IX_SSP_RX_FIFO_HANDLER_MISSING - interrupt mode is selected but RX FIFO
396 * handler pointer is NULL
397 * - IX_SSP_TX_FIFO_HANDLER_MISSING - interrupt mode is selected but TX FIFO
398 * handler pointer is NULL
399 * - IX_SSP_RX_FIFO_OVERRUN_HANDLER_MISSING - interrupt mode is selected but
400 * RX FIFO Overrun handler pointer is NULL
401 * - IX_SSP_RX_FIFO_NOT_EMPTY - Rx FIFO not empty, data size change is not
403 * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
405 * - IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE - frame format selected is invalid
406 * - IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE - data size selected is invalid
407 * - IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE - clock source selected is invalid
408 * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - Tx FIFO threshold level
409 * selected is invalid
410 * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - Rx FIFO threshold level
411 * selected is invalid
412 * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - SPI phase selected is invalid
413 * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - SPI polarity selected is invalid
414 * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - microwire control command
416 * - IX_SSP_INT_UNBIND_FAIL - interrupt handler failed to unbind SSP interrupt
417 * - IX_SSP_INT_BIND_FAIL - interrupt handler failed to bind to SSP interrupt
419 * - IX_SSP_NOT_SUPORTED - hardware does not support SSP
420 * - IX_SSP_NULL_POINTER - parameter passed in is NULL
422 * @li Reentrant : yes
423 * @li ISR Callable : yes
427 ixSspAccInit (IxSspInitVars *initVarsSelected);
432 * @fn ixSspAccUninit (
435 * @brief Un-initializes the SSP Serial Port Access component
442 * This API will disable the SSP Serial Port hardware. The client can call the
443 * init function again if they wish to enable the SSP.
446 * - IX_SSP_SUCCESS - successfully uninit SSP component
447 * - IX_SSP_INT_UNBIND_FAIL - interrupt handler failed to unbind SSP interrupt
449 * @li Reentrant : yes
450 * @li ISR Callable : yes
454 ixSspAccUninit (void);
459 * @fn ixSspAccFIFODataSubmit (
463 * @brief Inserts data into the SSP Serial Port's FIFO
465 * @param "UINT16 [in] *data" - pointer to the location to transmit the data
467 * "UINT32 [in] amtOfData" - number of data to be transmitted.
472 * This API will insert the amount of data specified by "amtOfData" from buffer
473 * pointed to by "data" into the FIFO to be transmitted by the hardware.
476 * - IX_SSP_SUCCESS - Data inserted successfully into FIFO
477 * - IX_SSP_FAIL - FIFO insufficient space
478 * - IX_SSP_NULL_POINTER - data pointer passed by client is NULL
479 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
481 * @li Reentrant : yes
482 * @li ISR Callable : yes
486 ixSspAccFIFODataSubmit (
493 * @fn ixSspAccFIFODataReceive (
497 * @brief Extract data from the SSP Serial Port's FIFO
499 * @param "UINT16 [in] *data" - pointer to the location to receive the data into
500 * "UINT32 [in] amtOfData" - number of data to be received.
505 * This API will extract the amount of data specified by "amtOfData" from the
506 * FIFO already received by the hardware into the buffer pointed to by "data".
509 * - IX_SSP_SUCCESS - Data extracted successfully from FIFO
510 * - IX_SSP_FAIL - FIFO has no data
511 * - IX_SSP_NULL_POINTER - data pointer passed by client is NULL
512 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
514 * @li Reentrant : yes
515 * @li ISR Callable : yes
519 ixSspAccFIFODataReceive (
531 * @fn ixSspAccTxFIFOHitOrBelowThresholdCheck (
534 * @brief Check if the Tx FIFO threshold has been hit or fallen below.
541 * This API will return whether the Tx FIFO threshold has been exceeded or not
544 * - IX_SSP_TX_FIFO_HIT_BELOW_THRESHOLD - Tx FIFO level hit or below threshold .
545 * - IX_SSP_TX_FIFO_EXCEED_THRESHOLD - Tx FIFO level exceeded threshold.
546 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
548 * @li Reentrant : yes
549 * @li ISR Callable : yes
553 ixSspAccTxFIFOHitOrBelowThresholdCheck (
559 * @fn ixSspAccRxFIFOHitOrAboveThresholdCheck (
562 * @brief Check if the Rx FIFO threshold has been hit or exceeded.
569 * This API will return whether the Rx FIFO level is below threshold or not
572 * - IX_SSP_RX_FIFO_HIT_ABOVE_THRESHOLD - Rx FIFO level hit or exceeded threshold
573 * - IX_SSP_RX_FIFO_BELOW_THRESHOLD - Rx FIFO level below threshold
574 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
576 * @li Reentrant : yes
577 * @li ISR Callable : yes
581 ixSspAccRxFIFOHitOrAboveThresholdCheck (
586 * Configuration functions
588 * NOTE: These configurations are not required to be called once init is called
589 * unless configurations need to be changed on the fly.
595 * @fn ixSspAccSSPPortStatusSet (
596 IxSspAccPortStatus portStatusSelected)
598 * @brief Enables/disables the SSP Serial Port hardware.
600 * @param "IxSspAccPortStatus [in] portStatusSelected" - Set the SSP port to
606 * This API will enable/disable the SSP Serial Port hardware.
607 * NOTE: This function is called by init to enable the SSP after setting up the
608 * configurations and by uninit to disable the SSP.
611 * - IX_SSP_SUCCESS - Port status set with valid enum value
612 * - IX_SSP_FAIL - invalid enum value
613 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
615 * @li Reentrant : yes
616 * @li ISR Callable : yes
620 ixSspAccSSPPortStatusSet (
621 IxSspAccPortStatus portStatusSelected);
626 * @fn ixSspAccFrameFormatSelect (
627 IxSspAccFrameFormat frameFormatSelected)
629 * @brief Sets the frame format for the SSP Serial Port hardware
631 * @param "IxSspAccFrameFormat [in] frameFormatSelected" - The frame format of
632 * SPI, SSP or Microwire can be selected as the format
637 * This API will set the format for the transfers via user input.
638 * *NOTE*: The SSP hardware will be disabled to clear the FIFOs. Then its
639 * previous state (enabled/disabled) restored after changing the format.
642 * - IX_SSP_SUCCESS - frame format set with valid enum value
643 * - IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE - invalid frame format value
644 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
646 * @li Reentrant : yes
647 * @li ISR Callable : yes
651 ixSspAccFrameFormatSelect (
652 IxSspAccFrameFormat frameFormatSelected);
657 * @fn ixSspAccDataSizeSelect (
658 IxSspAccDataSize dataSizeSelected)
660 * @brief Sets the data size for transfers
662 * @param "IxSspAccDataSize [in] dataSizeSelected" - The data size between 4
663 * and 16 that can be selected for data transfers
668 * This API will set the data size for the transfers via user input. It will
669 * disallow the change of the data size if either of the Rx/Tx FIFO is not
670 * empty to prevent data loss.
671 * *NOTE*: The SSP port will be disabled if the FIFOs are found to be empty and
672 * if between the check and disabling of the SSP (which clears the
673 * FIFOs) data is received into the FIFO, it might be lost.
674 * *NOTE*: The FIFOs can be cleared by disabling the SSP Port if necessary to
675 * force the data size change.
678 * - IX_SSP_SUCCESS - data size set with valid enum value
679 * - IX_SSP_RX_FIFO_NOT_EMPTY - Rx FIFO not empty, data size change is not
681 * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
683 * - IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE - invalid enum value
684 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
686 * @li Reentrant : yes
687 * @li ISR Callable : yes
691 ixSspAccDataSizeSelect (
692 IxSspAccDataSize dataSizeSelected);
697 * @fn ixSspAccClockSourceSelect(
698 IxSspAccClkSource clkSourceSelected)
700 * @brief Sets the clock source of the SSP Serial Port hardware
702 * @param "IxSspAccClkSource [in] clkSourceSelected" - The clock source from
703 * either external source on on-chip can be selected as the source
708 * This API will set the clock source for the transfers via user input.
711 * - IX_SSP_SUCCESS - clock source set with valid enum value
712 * - IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE - invalid enum value
713 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
715 * @li Reentrant : yes
716 * @li ISR Callable : yes
720 ixSspAccClockSourceSelect (
721 IxSspAccClkSource clkSourceSelected);
726 * @fn ixSspAccSerialClockRateConfigure (
727 UINT8 serialClockRateSelected)
729 * @brief Sets the on-chip Serial Clock Rate of the SSP Serial Port hardware.
731 * @param "UINT8 [in] serialClockRateSelected" - The serial clock rate that can
732 * be set is between 7.2Kbps and 1.8432Mbps. The formula used is
733 * Bit rate = 3.6864x10^6 / (2 x (SerialClockRateSelected + 1))
738 * This API will set the serial clock rate for the transfers via user input.
741 * - IX_SSP_SUCCESS - Serial clock rate configured successfully
742 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
744 * @li Reentrant : yes
745 * @li ISR Callable : yes
749 ixSspAccSerialClockRateConfigure (
750 UINT8 serialClockRateSelected);
755 * @fn ixSspAccRxFIFOIntEnable (
756 RxFIFOThresholdHandler rxFIFOIntrHandler)
758 * @brief Enables service request interrupt whenever the Rx FIFO hits its
761 * @param "void [in] *rxFIFOIntrHandler(UINT32)" - function pointer to the
762 * interrupt handler for the Rx FIFO exceeded.
767 * This API will enable the service request interrupt for the Rx FIFO
770 * - IX_SSP_SUCCESS - Rx FIFO level interrupt enabled successfully
771 * - IX_SSP_RX_FIFO_HANDLER_MISSING - missing handler for Rx FIFO level interrupt
772 * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not
773 * allowed to be enabled. Use init to enable interrupt mode.
774 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
776 * @li Reentrant : yes
777 * @li ISR Callable : yes
781 ixSspAccRxFIFOIntEnable (
782 RxFIFOThresholdHandler rxFIFOIntrHandler);
787 * @fn ixSspAccRxFIFOIntDisable (
790 * @brief Disables service request interrupt of the Rx FIFO.
797 * This API will disable the service request interrupt of the Rx FIFO.
800 * - IX_SSP_SUCCESS - Rx FIFO Interrupt disabled successfully
801 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
803 * @li Reentrant : yes
804 * @li ISR Callable : yes
808 ixSspAccRxFIFOIntDisable (
814 * @fn ixSspAccTxFIFOIntEnable (
815 TxFIFOThresholdHandler txFIFOIntrHandler)
817 * @brief Enables service request interrupt of the Tx FIFO.
819 * @param "void [in] *txFIFOIntrHandler(UINT32)" - function pointer to the
820 * interrupt handler for the Tx FIFO exceeded.
825 * This API will enable the service request interrupt of the Tx FIFO.
828 * - IX_SSP_SUCCESS - Tx FIFO level interrupt enabled successfully
829 * - IX_SSP_TX_FIFO_HANDLER_MISSING - missing handler for Tx FIFO level interrupt
830 * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not
831 * allowed to be enabled. Use init to enable interrupt mode.
832 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
834 * @li Reentrant : yes
835 * @li ISR Callable : yes
839 ixSspAccTxFIFOIntEnable (
840 TxFIFOThresholdHandler txFIFOIntrHandler);
845 * @fn ixSspAccTxFIFOIntDisable (
848 * @brief Disables service request interrupt of the Tx FIFO
855 * This API will disable the service request interrupt of the Tx FIFO
858 * - IX_SSP_SUCCESS - Tx FIFO Interrupt disabled successfuly.
859 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
861 * @li Reentrant : yes
862 * @li ISR Callable : yes
866 ixSspAccTxFIFOIntDisable (
872 * @fn ixSspAccLoopbackEnable (
875 * @brief Enables/disables the loopback mode
877 * @param "BOOL [in] loopbackEnable" - true to enable and false to disable.
882 * This API will set the mode of operation to either loopback or normal mode
883 * according to the user input.
886 * - IX_SSP_SUCCESS - Loopback enabled successfully
887 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
889 * @li Reentrant : yes
890 * @li ISR Callable : yes
894 ixSspAccLoopbackEnable (
895 BOOL loopbackEnable);
900 * @fn ixSspAccSpiSclkPolaritySet (
901 IxSspAccSpiSclkPolarity spiSclkPolaritySelected)
903 * @brief Sets the SPI SCLK Polarity to Low or High
905 * @param - "IxSspAccSpiSclkPolarity [in] spiSclkPolaritySelected" - SPI SCLK
906 * polarity that can be selected to either high or low
911 * This API is only used for the SPI frame format and will set the SPI SCLK polarity
912 * to either low or high
915 * - IX_SSP_SUCCESS - SPI Sclk polarity set with valid enum value
916 * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - invalid SPI polarity value
917 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
919 * @li Reentrant : yes
920 * @li ISR Callable : yes
924 ixSspAccSpiSclkPolaritySet (
925 IxSspAccSpiSclkPolarity spiSclkPolaritySelected);
930 * @fn ixSspAccSpiSclkPhaseSet (
931 IxSspAccSpiSclkPhase spiSclkPhaseSelected)
933 * @brief Sets the SPI SCLK Phase
935 * @param "IxSspAccSpiSclkPhase [in] spiSclkPhaseSelected" - Phase of either
936 * the SCLK is inactive one cycle at the start of a frame and 1/2
937 * cycle at the end of a frame, OR
938 * the SCLK is inactive 1/2 cycle at the start of a frame and one
939 * cycle at the end of a frame.
942 * - IX_SSP_SUCCESS - SPI Sclk phase set with valid enum value
943 * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - invalid SPI phase value
944 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
946 * This API is only used for the SPI frame format and will set the SPI SCLK
947 * phase according to user input.
952 * @li Reentrant : yes
953 * @li ISR Callable : yes
957 ixSspAccSpiSclkPhaseSet (
958 IxSspAccSpiSclkPhase spiSclkPhaseSelected);
963 * @fn ixSspAccMicrowireControlWordSet (
964 IxSspAccMicrowireCtlWord microwireCtlWordSelected)
966 * @brief Sets the Microwire control word to 8 or 16 bit format
968 * @param "IxSspAccMicrowireCtlWord [in] microwireCtlWordSelected" - Microwire
969 * control word format can be either 8 or 16 bit format
974 * This API is only used for the Microwire frame format and will set the
975 * control word to 8 or 16 bit format
978 * - IX_SSP_SUCCESS - Microwire Control Word set with valid enum value
979 * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
981 * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - invalid enum value
982 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
984 * @li Reentrant : yes
985 * @li ISR Callable : yes
989 ixSspAccMicrowireControlWordSet (
990 IxSspAccMicrowireCtlWord microwireCtlWordSelected);
995 * @fn ixSspAccTxFIFOThresholdSet (
996 IxSspAccFifoThreshold txFIFOThresholdSelected)
998 * @brief Sets the Tx FIFO Threshold.
1000 * @param "IxSspAccFifoThreshold [in] txFIFOThresholdSelected" - Threshold that
1001 * is set for a Tx FIFO service request to be triggered
1006 * This API will set the threshold for a Tx FIFO threshold to be triggered
1009 * - IX_SSP_SUCCESS - Tx FIFO Threshold set with valid enum value
1010 * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value
1011 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1013 * @li Reentrant : yes
1014 * @li ISR Callable : yes
1017 PUBLIC IX_SSP_STATUS
1018 ixSspAccTxFIFOThresholdSet (
1019 IxSspAccFifoThreshold txFIFOThresholdSelected);
1024 * @fn ixSspAccRxFIFOThresholdSet (
1025 IxSspAccFifoThreshold rxFIFOThresholdSelected)
1027 * @brief Sets the Rx FIFO Threshold.
1029 * @param "IxSspAccFifoThreshold [in] rxFIFOThresholdSelected" - Threshold that
1030 * is set for a Tx FIFO service request to be triggered
1035 * This API will will set the threshold for a Rx FIFO threshold to be triggered
1038 * - IX_SSP_SUCCESS - Rx FIFO Threshold set with valid enum value
1039 * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value
1040 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1042 * @li Reentrant : yes
1043 * @li ISR Callable : yes
1046 PUBLIC IX_SSP_STATUS
1047 ixSspAccRxFIFOThresholdSet (
1048 IxSspAccFifoThreshold rxFIFOThresholdSelected);
1058 * @fn ixSspAccStatsGet (
1059 IxSspAccStatsCounters *sspStats)
1061 * @brief Returns the SSP Statistics through the pointer passed in
1063 * @param "IxSspAccStatsCounters [in] *sspStats" - SSP statistics counter will
1064 * be read and written to the location pointed by this pointer.
1069 * This API will return the statistics counters of the SSP transfers.
1072 * - IX_SSP_SUCCESS - Stats obtained into the pointer provided successfully
1073 * - IX_SSP_FAIL - client provided pointer is NULL
1075 * @li Reentrant : yes
1076 * @li ISR Callable : yes
1079 PUBLIC IX_SSP_STATUS
1081 IxSspAccStatsCounters *sspStats);
1086 * @fn ixSspAccStatsReset (
1089 * @brief Resets the SSP Statistics
1096 * This API will reset the SSP statistics counters.
1101 * @li Reentrant : yes
1102 * @li ISR Callable : yes
1106 ixSspAccStatsReset (
1112 * @fn ixSspAccShow (
1115 * @brief Display SSP status registers and statistics counters.
1122 * This API will display the status registers of the SSP and the statistics
1126 * - IX_SSP_SUCCESS - SSP show called successfully.
1127 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1129 * @li Reentrant : yes
1130 * @li ISR Callable : yes
1133 PUBLIC IX_SSP_STATUS
1140 * @fn ixSspAccSSPBusyCheck (
1143 * @brief Determine the state of the SSP serial port hardware.
1150 * This API will return the state of the SSP serial port hardware - busy or
1154 * - IX_SSP_BUSY - SSP is busy
1155 * - IX_SSP_IDLE - SSP is idle.
1156 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1158 * @li Reentrant : yes
1159 * @li ISR Callable : yes
1162 PUBLIC IX_SSP_STATUS
1163 ixSspAccSSPBusyCheck (
1169 * @fn ixSspAccTxFIFOLevelGet (
1172 * @brief Obtain the Tx FIFO's level
1179 * This API will return the level of the Tx FIFO
1182 * - 0..16; 0 can also mean SSP not initialized and will need to be init.
1184 * @li Reentrant : yes
1185 * @li ISR Callable : yes
1189 ixSspAccTxFIFOLevelGet (
1195 * @fn ixSspAccRxFIFOLevelGet (
1198 * @brief Obtain the Rx FIFO's level
1205 * This API will return the level of the Rx FIFO
1208 * - 0..16; 0 can also mean SSP not initialized and will need to be init.
1210 * @li Reentrant : yes
1211 * @li ISR Callable : yes
1215 ixSspAccRxFIFOLevelGet (
1221 * @fn ixSspAccRxFIFOOverrunCheck (
1224 * @brief Check if the Rx FIFO has overrun its FIFOs
1231 * This API will return whether the Rx FIFO has overrun its 16 FIFOs
1234 * - IX_SSP_OVERRUN_OCCURRED - Rx FIFO overrun occurred
1235 * - IX_SSP_NO_OVERRUN - Rx FIFO did not overrun
1236 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1238 * @li Reentrant : yes
1239 * @li ISR Callable : yes
1242 PUBLIC IX_SSP_STATUS
1243 ixSspAccRxFIFOOverrunCheck (
1246 #endif /* __ixp46X */
1247 #endif /* IXSSPACC_H */