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 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 * 3. Neither the name of the Intel Corporation nor the names of its contributors
27 * may be used to endorse or promote products derived from this software
28 * without specific prior written permission.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
32 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
35 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
44 * -- End of Copyright Notice --
48 * @defgroup IxSspAcc IXP400 SSP Serial Port Access (IxSspAcc) API
50 * @brief IXP400 SSP Serial Port Access Public API
67 * @enum IxSspAccDataSize
69 * @brief The data sizes in bits that are supported by the protocol
73 DATA_SIZE_TOO_SMALL = 0x2,
93 * @enum IxSspAccPortStatus
95 * @brief The status of the SSP port to be set to enable/disable
99 SSP_PORT_DISABLE = 0x0,
101 INVALID_SSP_PORT_STATUS
102 } IxSspAccPortStatus;
107 * @enum IxSspAccFrameFormat
109 * @brief The frame format that is to be used - SPI, SSP, or Microwire
117 } IxSspAccFrameFormat;
122 * @enum IxSspAccClkSource
124 * @brief The source to produce the SSP serial clock
136 * @enum IxSspAccSpiSclkPhase
138 * @brief The SPI SCLK Phase:
139 * 0 - SCLK is inactive one cycle at the start of a frame and 1/2 cycle at the
141 * 1 - SCLK is inactive 1/2 cycle at the start of a frame and one cycle at the
146 START_ONE_END_HALF = 0x0,
149 } IxSspAccSpiSclkPhase;
154 * @enum IxSspAccSpiSclkPolarity
156 * @brief The SPI SCLK Polarity can be set to either low or high.
160 SPI_POLARITY_LOW = 0x0,
163 } IxSspAccSpiSclkPolarity;
168 * @enum IxSspAccMicrowireCtlWord
170 * @brief The Microwire control word can be either 8 or 16 bit.
174 MICROWIRE_8_BIT = 0x0,
176 INVALID_MICROWIRE_CTL_WORD
177 } IxSspAccMicrowireCtlWord;
182 * @enum IxSspAccFifoThreshold
184 * @brief The threshold in frames (each frame is defined by IxSspAccDataSize)
185 * that can be set for the FIFO to trigger a threshold exceed when
186 * checking with the ExceedThresholdCheck functions or an interrupt
187 * when it is enabled.
208 } IxSspAccFifoThreshold;
213 * @enum IX_SSP_STATUS
215 * @brief The statuses that can be returned in a SSP Serial Port Access
219 IX_SSP_SUCCESS = IX_SUCCESS, /**< Success status */
220 IX_SSP_FAIL, /**< Fail status */
221 IX_SSP_RX_FIFO_OVERRUN_HANDLER_MISSING, /**<
222 Rx FIFO Overrun handler is NULL. */
223 IX_SSP_RX_FIFO_HANDLER_MISSING, /**<
224 Rx FIFO threshold hit or above handler is NULL
226 IX_SSP_TX_FIFO_HANDLER_MISSING, /**<
227 Tx FIFO threshold hit or below handler is NULL
229 IX_SSP_FIFO_NOT_EMPTY_FOR_SETTING_CTL_CMD, /**<
230 Tx FIFO not empty and therefore microwire
231 control command size setting is not allowed. */
232 IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE, /**<
233 frame format selected is invalid. */
234 IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE, /**<
235 data size selected is invalid. */
236 IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE, /**<
237 source clock selected is invalid. */
238 IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE, /**<
239 Tx FIFO threshold selected is invalid. */
240 IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE, /**<
241 Rx FIFO threshold selected is invalid. */
242 IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE, /**<
243 SPI phase selected is invalid. */
244 IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE, /**<
245 SPI polarity selected is invalid. */
246 IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE, /**<
247 Microwire control command selected is invalid
249 IX_SSP_INT_UNBIND_FAIL, /**< Interrupt unbind fail to unbind SSP
251 IX_SSP_INT_BIND_FAIL, /**< Interrupt bind fail during init */
252 IX_SSP_RX_FIFO_NOT_EMPTY, /**<
253 Rx FIFO not empty while trying to change data
255 IX_SSP_TX_FIFO_NOT_EMPTY, /**<
256 Rx FIFO not empty while trying to change data
257 size or microwire control command size. */
258 IX_SSP_POLL_MODE_BLOCKING, /**<
259 poll mode selected blocks interrupt mode from
261 IX_SSP_TX_FIFO_HIT_BELOW_THRESHOLD, /**<
262 Tx FIFO level hit or below threshold. */
263 IX_SSP_TX_FIFO_EXCEED_THRESHOLD, /**<
264 Tx FIFO level exceeded threshold. */
265 IX_SSP_RX_FIFO_HIT_ABOVE_THRESHOLD, /**<
266 Rx FIFO level hit or exceeded threshold. */
267 IX_SSP_RX_FIFO_BELOW_THRESHOLD, /**<
268 Rx FIFO level below threshold. */
269 IX_SSP_BUSY, /**< SSP is busy. */
270 IX_SSP_IDLE, /**< SSP is idle. */
271 IX_SSP_OVERRUN_OCCURRED, /**<
272 SSP has experienced an overrun. */
273 IX_SSP_NO_OVERRUN, /**<
274 SSP did not experience an overrun. */
275 IX_SSP_NOT_SUPORTED, /**< hardware does not support SSP */
276 IX_SSP_NOT_INIT, /**< SSP Access not intialized */
277 IX_SSP_NULL_POINTER /**< parameter passed in is NULL */
283 * @brief SSP Rx FIFO Overrun handler
285 * This function is called for the client to handle Rx FIFO Overrun that occurs
286 * in the SSP hardware
288 typedef void (*RxFIFOOverrunHandler)(void);
293 * @brief SSP Rx FIFO Threshold hit or above handler
295 * This function is called for the client to handle Rx FIFO threshold hit or
296 * or above that occurs in the SSP hardware
298 typedef void (*RxFIFOThresholdHandler)(void);
303 * @brief SSP Tx FIFO Threshold hit or below handler
305 * This function is called for the client to handle Tx FIFO threshold hit or
306 * or below that occurs in the SSP hardware
308 typedef void (*TxFIFOThresholdHandler)(void);
317 * @brief contains all the variables required to initialize the SSP serial port
320 * Structure to be filled and used for calling initialization
324 IxSspAccFrameFormat FrameFormatSelected;/**<Select between SPI, SSP and
326 IxSspAccDataSize DataSizeSelected; /**<Select between 4 and 16. */
327 IxSspAccClkSource ClkSourceSelected; /**<Select clock source to be
328 on-chip or external. */
329 IxSspAccFifoThreshold TxFIFOThresholdSelected;
330 /**<Select Tx FIFO threshold
332 IxSspAccFifoThreshold RxFIFOThresholdSelected;
333 /**<Select Rx FIFO threshold
335 BOOL RxFIFOIntrEnable; /**<Enable/disable Rx FIFO
336 threshold interrupt. Disabling
337 this interrupt will require
338 the use of the polling function
339 RxFIFOExceedThresholdCheck. */
340 BOOL TxFIFOIntrEnable; /**<Enable/disable Tx FIFO
341 threshold interrupt. Disabling
342 this interrupt will require
343 the use of the polling function
344 TxFIFOExceedThresholdCheck. */
345 RxFIFOThresholdHandler RxFIFOThsldHdlr; /**<Pointer to function to handle
346 a Rx FIFO interrupt. */
347 TxFIFOThresholdHandler TxFIFOThsldHdlr; /**<Pointer to function to handle
348 a Tx FIFO interrupt. */
349 RxFIFOOverrunHandler RxFIFOOverrunHdlr; /**<Pointer to function to handle
350 a Rx FIFO overrun interrupt. */
351 BOOL LoopbackEnable; /**<Select operation mode to be
352 normal or loopback mode. */
353 IxSspAccSpiSclkPhase SpiSclkPhaseSelected;
354 /**<Select SPI SCLK phase to start
355 with one inactive cycle and end
356 with 1/2 inactive cycle or
357 start with 1/2 inactive cycle
358 and end with one inactive
361 IxSspAccSpiSclkPolarity SpiSclkPolaritySelected;
362 /**<Select SPI SCLK idle state
363 to be low or high. (Only used in
365 IxSspAccMicrowireCtlWord MicrowireCtlWordSelected;
366 /**<Select Microwire control
367 format to be 8 or 16-bit. (Only
368 used in Microwire format). */
369 UINT8 SerialClkRateSelected; /**<Select between 0 (1.8432Mbps)
370 and 255 (7.2Kbps). The
371 formula used is Bit rate =
373 (2 x (SerialClkRateSelect + 1))
380 * @brief contains counters of the SSP statistics
382 * Structure contains all values of counters and associated overflows.
386 UINT32 ixSspRcvCounter; /**<Total frames received. */
387 UINT32 ixSspXmitCounter; /**<Total frames transmitted. */
388 UINT32 ixSspOverflowCounter;/**<Total occurrences of overflow. */
389 } IxSspAccStatsCounters;
393 * Section for prototypes interface functions
400 IxSspInitVars *initVarsSelected);
402 * @brief Initializes the SSP Access module.
404 * @param "IxSspAccInitVars [in] *initVarsSelected" - struct containing required
405 * variables for initialization
410 * This API will initialize the SSP Serial Port hardware to the user specified
411 * configuration. Then it will enable the SSP Serial Port.
412 * *NOTE*: Once interrupt or polling mode is selected, the mode cannot be
413 * changed via the interrupt enable/disable function but the init needs to be
414 * called again to change it.
417 * - IX_SSP_SUCCESS - Successfully initialize and enable the SSP
419 * - IX_SSP_RX_FIFO_HANDLER_MISSING - interrupt mode is selected but RX FIFO
420 * handler pointer is NULL
421 * - IX_SSP_TX_FIFO_HANDLER_MISSING - interrupt mode is selected but TX FIFO
422 * handler pointer is NULL
423 * - IX_SSP_RX_FIFO_OVERRUN_HANDLER_MISSING - interrupt mode is selected but
424 * RX FIFO Overrun handler pointer is NULL
425 * - IX_SSP_RX_FIFO_NOT_EMPTY - Rx FIFO not empty, data size change is not
427 * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
429 * - IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE - frame format selected is invalid
430 * - IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE - data size selected is invalid
431 * - IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE - clock source selected is invalid
432 * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - Tx FIFO threshold level
433 * selected is invalid
434 * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - Rx FIFO threshold level
435 * selected is invalid
436 * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - SPI phase selected is invalid
437 * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - SPI polarity selected is invalid
438 * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - microwire control command
440 * - IX_SSP_INT_UNBIND_FAIL - interrupt handler failed to unbind SSP interrupt
441 * - IX_SSP_INT_BIND_FAIL - interrupt handler failed to bind to SSP interrupt
443 * - IX_SSP_NOT_SUPORTED - hardware does not support SSP
444 * - IX_SSP_NULL_POINTER - parameter passed in is NULL
446 * @li Reentrant : yes
447 * @li ISR Callable : yes
451 ixSspAccInit (IxSspInitVars *initVarsSelected);
456 * @fn ixSspAccUninit (
459 * @brief Un-initializes the SSP Serial Port Access component
466 * This API will disable the SSP Serial Port hardware. The client can call the
467 * init function again if they wish to enable the SSP.
470 * - IX_SSP_SUCCESS - successfully uninit SSP component
471 * - IX_SSP_INT_UNBIND_FAIL - interrupt handler failed to unbind SSP interrupt
473 * @li Reentrant : yes
474 * @li ISR Callable : yes
478 ixSspAccUninit (void);
483 * @fn ixSspAccFIFODataSubmit (
487 * @brief Inserts data into the SSP Serial Port's FIFO
489 * @param "UINT16 [in] *data" - pointer to the location to transmit the data
491 * "UINT32 [in] amtOfData" - number of data to be transmitted.
496 * This API will insert the amount of data specified by "amtOfData" from buffer
497 * pointed to by "data" into the FIFO to be transmitted by the hardware.
500 * - IX_SSP_SUCCESS - Data inserted successfully into FIFO
501 * - IX_SSP_FAIL - FIFO insufficient space
502 * - IX_SSP_NULL_POINTER - data pointer passed by client is NULL
503 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
505 * @li Reentrant : yes
506 * @li ISR Callable : yes
510 ixSspAccFIFODataSubmit (
517 * @fn ixSspAccFIFODataReceive (
521 * @brief Extract data from the SSP Serial Port's FIFO
523 * @param "UINT16 [in] *data" - pointer to the location to receive the data into
524 * "UINT32 [in] amtOfData" - number of data to be received.
529 * This API will extract the amount of data specified by "amtOfData" from the
530 * FIFO already received by the hardware into the buffer pointed to by "data".
533 * - IX_SSP_SUCCESS - Data extracted successfully from FIFO
534 * - IX_SSP_FAIL - FIFO has no data
535 * - IX_SSP_NULL_POINTER - data pointer passed by client is NULL
536 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
538 * @li Reentrant : yes
539 * @li ISR Callable : yes
543 ixSspAccFIFODataReceive (
555 * @fn ixSspAccTxFIFOHitOrBelowThresholdCheck (
558 * @brief Check if the Tx FIFO threshold has been hit or fallen below.
565 * This API will return whether the Tx FIFO threshold has been exceeded or not
568 * - IX_SSP_TX_FIFO_HIT_BELOW_THRESHOLD - Tx FIFO level hit or below threshold .
569 * - IX_SSP_TX_FIFO_EXCEED_THRESHOLD - Tx FIFO level exceeded threshold.
570 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
572 * @li Reentrant : yes
573 * @li ISR Callable : yes
577 ixSspAccTxFIFOHitOrBelowThresholdCheck (
583 * @fn ixSspAccRxFIFOHitOrAboveThresholdCheck (
586 * @brief Check if the Rx FIFO threshold has been hit or exceeded.
593 * This API will return whether the Rx FIFO level is below threshold or not
596 * - IX_SSP_RX_FIFO_HIT_ABOVE_THRESHOLD - Rx FIFO level hit or exceeded threshold
597 * - IX_SSP_RX_FIFO_BELOW_THRESHOLD - Rx FIFO level below threshold
598 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
600 * @li Reentrant : yes
601 * @li ISR Callable : yes
605 ixSspAccRxFIFOHitOrAboveThresholdCheck (
610 * Configuration functions
612 * NOTE: These configurations are not required to be called once init is called
613 * unless configurations need to be changed on the fly.
619 * @fn ixSspAccSSPPortStatusSet (
620 IxSspAccPortStatus portStatusSelected)
622 * @brief Enables/disables the SSP Serial Port hardware.
624 * @param "IxSspAccPortStatus [in] portStatusSelected" - Set the SSP port to
630 * This API will enable/disable the SSP Serial Port hardware.
631 * NOTE: This function is called by init to enable the SSP after setting up the
632 * configurations and by uninit to disable the SSP.
635 * - IX_SSP_SUCCESS - Port status set with valid enum value
636 * - IX_SSP_FAIL - invalid enum value
637 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
639 * @li Reentrant : yes
640 * @li ISR Callable : yes
644 ixSspAccSSPPortStatusSet (
645 IxSspAccPortStatus portStatusSelected);
650 * @fn ixSspAccFrameFormatSelect (
651 IxSspAccFrameFormat frameFormatSelected)
653 * @brief Sets the frame format for the SSP Serial Port hardware
655 * @param "IxSspAccFrameFormat [in] frameFormatSelected" - The frame format of
656 * SPI, SSP or Microwire can be selected as the format
661 * This API will set the format for the transfers via user input.
662 * *NOTE*: The SSP hardware will be disabled to clear the FIFOs. Then its
663 * previous state (enabled/disabled) restored after changing the format.
666 * - IX_SSP_SUCCESS - frame format set with valid enum value
667 * - IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE - invalid frame format value
668 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
670 * @li Reentrant : yes
671 * @li ISR Callable : yes
675 ixSspAccFrameFormatSelect (
676 IxSspAccFrameFormat frameFormatSelected);
681 * @fn ixSspAccDataSizeSelect (
682 IxSspAccDataSize dataSizeSelected)
684 * @brief Sets the data size for transfers
686 * @param "IxSspAccDataSize [in] dataSizeSelected" - The data size between 4
687 * and 16 that can be selected for data transfers
692 * This API will set the data size for the transfers via user input. It will
693 * disallow the change of the data size if either of the Rx/Tx FIFO is not
694 * empty to prevent data loss.
695 * *NOTE*: The SSP port will be disabled if the FIFOs are found to be empty and
696 * if between the check and disabling of the SSP (which clears the
697 * FIFOs) data is received into the FIFO, it might be lost.
698 * *NOTE*: The FIFOs can be cleared by disabling the SSP Port if necessary to
699 * force the data size change.
702 * - IX_SSP_SUCCESS - data size set with valid enum value
703 * - IX_SSP_RX_FIFO_NOT_EMPTY - Rx FIFO not empty, data size change is not
705 * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
707 * - IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE - invalid enum value
708 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
710 * @li Reentrant : yes
711 * @li ISR Callable : yes
715 ixSspAccDataSizeSelect (
716 IxSspAccDataSize dataSizeSelected);
721 * @fn ixSspAccClockSourceSelect(
722 IxSspAccClkSource clkSourceSelected)
724 * @brief Sets the clock source of the SSP Serial Port hardware
726 * @param "IxSspAccClkSource [in] clkSourceSelected" - The clock source from
727 * either external source on on-chip can be selected as the source
732 * This API will set the clock source for the transfers via user input.
735 * - IX_SSP_SUCCESS - clock source set with valid enum value
736 * - IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE - invalid enum value
737 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
739 * @li Reentrant : yes
740 * @li ISR Callable : yes
744 ixSspAccClockSourceSelect (
745 IxSspAccClkSource clkSourceSelected);
750 * @fn ixSspAccSerialClockRateConfigure (
751 UINT8 serialClockRateSelected)
753 * @brief Sets the on-chip Serial Clock Rate of the SSP Serial Port hardware.
755 * @param "UINT8 [in] serialClockRateSelected" - The serial clock rate that can
756 * be set is between 7.2Kbps and 1.8432Mbps. The formula used is
757 * Bit rate = 3.6864x10^6 / (2 x (SerialClockRateSelected + 1))
762 * This API will set the serial clock rate for the transfers via user input.
765 * - IX_SSP_SUCCESS - Serial clock rate configured successfully
766 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
768 * @li Reentrant : yes
769 * @li ISR Callable : yes
773 ixSspAccSerialClockRateConfigure (
774 UINT8 serialClockRateSelected);
779 * @fn ixSspAccRxFIFOIntEnable (
780 RxFIFOThresholdHandler rxFIFOIntrHandler)
782 * @brief Enables service request interrupt whenever the Rx FIFO hits its
785 * @param "void [in] *rxFIFOIntrHandler(UINT32)" - function pointer to the
786 * interrupt handler for the Rx FIFO exceeded.
791 * This API will enable the service request interrupt for the Rx FIFO
794 * - IX_SSP_SUCCESS - Rx FIFO level interrupt enabled successfully
795 * - IX_SSP_RX_FIFO_HANDLER_MISSING - missing handler for Rx FIFO level interrupt
796 * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not
797 * allowed to be enabled. Use init to enable interrupt mode.
798 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
800 * @li Reentrant : yes
801 * @li ISR Callable : yes
805 ixSspAccRxFIFOIntEnable (
806 RxFIFOThresholdHandler rxFIFOIntrHandler);
811 * @fn ixSspAccRxFIFOIntDisable (
814 * @brief Disables service request interrupt of the Rx FIFO.
821 * This API will disable the service request interrupt of the Rx FIFO.
824 * - IX_SSP_SUCCESS - Rx FIFO Interrupt disabled successfully
825 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
827 * @li Reentrant : yes
828 * @li ISR Callable : yes
832 ixSspAccRxFIFOIntDisable (
838 * @fn ixSspAccTxFIFOIntEnable (
839 TxFIFOThresholdHandler txFIFOIntrHandler)
841 * @brief Enables service request interrupt of the Tx FIFO.
843 * @param "void [in] *txFIFOIntrHandler(UINT32)" - function pointer to the
844 * interrupt handler for the Tx FIFO exceeded.
849 * This API will enable the service request interrupt of the Tx FIFO.
852 * - IX_SSP_SUCCESS - Tx FIFO level interrupt enabled successfully
853 * - IX_SSP_TX_FIFO_HANDLER_MISSING - missing handler for Tx FIFO level interrupt
854 * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not
855 * allowed to be enabled. Use init to enable interrupt mode.
856 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
858 * @li Reentrant : yes
859 * @li ISR Callable : yes
863 ixSspAccTxFIFOIntEnable (
864 TxFIFOThresholdHandler txFIFOIntrHandler);
869 * @fn ixSspAccTxFIFOIntDisable (
872 * @brief Disables service request interrupt of the Tx FIFO
879 * This API will disable the service request interrupt of the Tx FIFO
882 * - IX_SSP_SUCCESS - Tx FIFO Interrupt disabled successfuly.
883 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
885 * @li Reentrant : yes
886 * @li ISR Callable : yes
890 ixSspAccTxFIFOIntDisable (
896 * @fn ixSspAccLoopbackEnable (
899 * @brief Enables/disables the loopback mode
901 * @param "BOOL [in] loopbackEnable" - true to enable and false to disable.
906 * This API will set the mode of operation to either loopback or normal mode
907 * according to the user input.
910 * - IX_SSP_SUCCESS - Loopback enabled successfully
911 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
913 * @li Reentrant : yes
914 * @li ISR Callable : yes
918 ixSspAccLoopbackEnable (
919 BOOL loopbackEnable);
924 * @fn ixSspAccSpiSclkPolaritySet (
925 IxSspAccSpiSclkPolarity spiSclkPolaritySelected)
927 * @brief Sets the SPI SCLK Polarity to Low or High
929 * @param - "IxSspAccSpiSclkPolarity [in] spiSclkPolaritySelected" - SPI SCLK
930 * polarity that can be selected to either high or low
935 * This API is only used for the SPI frame format and will set the SPI SCLK polarity
936 * to either low or high
939 * - IX_SSP_SUCCESS - SPI Sclk polarity set with valid enum value
940 * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - invalid SPI polarity value
941 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
943 * @li Reentrant : yes
944 * @li ISR Callable : yes
948 ixSspAccSpiSclkPolaritySet (
949 IxSspAccSpiSclkPolarity spiSclkPolaritySelected);
954 * @fn ixSspAccSpiSclkPhaseSet (
955 IxSspAccSpiSclkPhase spiSclkPhaseSelected)
957 * @brief Sets the SPI SCLK Phase
959 * @param "IxSspAccSpiSclkPhase [in] spiSclkPhaseSelected" - Phase of either
960 * the SCLK is inactive one cycle at the start of a frame and 1/2
961 * cycle at the end of a frame, OR
962 * the SCLK is inactive 1/2 cycle at the start of a frame and one
963 * cycle at the end of a frame.
966 * - IX_SSP_SUCCESS - SPI Sclk phase set with valid enum value
967 * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - invalid SPI phase value
968 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
970 * This API is only used for the SPI frame format and will set the SPI SCLK
971 * phase according to user input.
976 * @li Reentrant : yes
977 * @li ISR Callable : yes
981 ixSspAccSpiSclkPhaseSet (
982 IxSspAccSpiSclkPhase spiSclkPhaseSelected);
987 * @fn ixSspAccMicrowireControlWordSet (
988 IxSspAccMicrowireCtlWord microwireCtlWordSelected)
990 * @brief Sets the Microwire control word to 8 or 16 bit format
992 * @param "IxSspAccMicrowireCtlWord [in] microwireCtlWordSelected" - Microwire
993 * control word format can be either 8 or 16 bit format
998 * This API is only used for the Microwire frame format and will set the
999 * control word to 8 or 16 bit format
1002 * - IX_SSP_SUCCESS - Microwire Control Word set with valid enum value
1003 * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
1005 * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - invalid enum value
1006 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1008 * @li Reentrant : yes
1009 * @li ISR Callable : yes
1012 PUBLIC IX_SSP_STATUS
1013 ixSspAccMicrowireControlWordSet (
1014 IxSspAccMicrowireCtlWord microwireCtlWordSelected);
1019 * @fn ixSspAccTxFIFOThresholdSet (
1020 IxSspAccFifoThreshold txFIFOThresholdSelected)
1022 * @brief Sets the Tx FIFO Threshold.
1024 * @param "IxSspAccFifoThreshold [in] txFIFOThresholdSelected" - Threshold that
1025 * is set for a Tx FIFO service request to be triggered
1030 * This API will set the threshold for a Tx FIFO threshold to be triggered
1033 * - IX_SSP_SUCCESS - Tx FIFO Threshold set with valid enum value
1034 * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value
1035 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1037 * @li Reentrant : yes
1038 * @li ISR Callable : yes
1041 PUBLIC IX_SSP_STATUS
1042 ixSspAccTxFIFOThresholdSet (
1043 IxSspAccFifoThreshold txFIFOThresholdSelected);
1048 * @fn ixSspAccRxFIFOThresholdSet (
1049 IxSspAccFifoThreshold rxFIFOThresholdSelected)
1051 * @brief Sets the Rx FIFO Threshold.
1053 * @param "IxSspAccFifoThreshold [in] rxFIFOThresholdSelected" - Threshold that
1054 * is set for a Tx FIFO service request to be triggered
1059 * This API will will set the threshold for a Rx FIFO threshold to be triggered
1062 * - IX_SSP_SUCCESS - Rx FIFO Threshold set with valid enum value
1063 * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value
1064 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1066 * @li Reentrant : yes
1067 * @li ISR Callable : yes
1070 PUBLIC IX_SSP_STATUS
1071 ixSspAccRxFIFOThresholdSet (
1072 IxSspAccFifoThreshold rxFIFOThresholdSelected);
1082 * @fn ixSspAccStatsGet (
1083 IxSspAccStatsCounters *sspStats)
1085 * @brief Returns the SSP Statistics through the pointer passed in
1087 * @param "IxSspAccStatsCounters [in] *sspStats" - SSP statistics counter will
1088 * be read and written to the location pointed by this pointer.
1093 * This API will return the statistics counters of the SSP transfers.
1096 * - IX_SSP_SUCCESS - Stats obtained into the pointer provided successfully
1097 * - IX_SSP_FAIL - client provided pointer is NULL
1099 * @li Reentrant : yes
1100 * @li ISR Callable : yes
1103 PUBLIC IX_SSP_STATUS
1105 IxSspAccStatsCounters *sspStats);
1110 * @fn ixSspAccStatsReset (
1113 * @brief Resets the SSP Statistics
1120 * This API will reset the SSP statistics counters.
1125 * @li Reentrant : yes
1126 * @li ISR Callable : yes
1130 ixSspAccStatsReset (
1136 * @fn ixSspAccShow (
1139 * @brief Display SSP status registers and statistics counters.
1146 * This API will display the status registers of the SSP and the statistics
1150 * - IX_SSP_SUCCESS - SSP show called successfully.
1151 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1153 * @li Reentrant : yes
1154 * @li ISR Callable : yes
1157 PUBLIC IX_SSP_STATUS
1164 * @fn ixSspAccSSPBusyCheck (
1167 * @brief Determine the state of the SSP serial port hardware.
1174 * This API will return the state of the SSP serial port hardware - busy or
1178 * - IX_SSP_BUSY - SSP is busy
1179 * - IX_SSP_IDLE - SSP is idle.
1180 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1182 * @li Reentrant : yes
1183 * @li ISR Callable : yes
1186 PUBLIC IX_SSP_STATUS
1187 ixSspAccSSPBusyCheck (
1193 * @fn ixSspAccTxFIFOLevelGet (
1196 * @brief Obtain the Tx FIFO's level
1203 * This API will return the level of the Tx FIFO
1206 * - 0..16; 0 can also mean SSP not initialized and will need to be init.
1208 * @li Reentrant : yes
1209 * @li ISR Callable : yes
1213 ixSspAccTxFIFOLevelGet (
1219 * @fn ixSspAccRxFIFOLevelGet (
1222 * @brief Obtain the Rx FIFO's level
1229 * This API will return the level of the Rx FIFO
1232 * - 0..16; 0 can also mean SSP not initialized and will need to be init.
1234 * @li Reentrant : yes
1235 * @li ISR Callable : yes
1239 ixSspAccRxFIFOLevelGet (
1245 * @fn ixSspAccRxFIFOOverrunCheck (
1248 * @brief Check if the Rx FIFO has overrun its FIFOs
1255 * This API will return whether the Rx FIFO has overrun its 16 FIFOs
1258 * - IX_SSP_OVERRUN_OCCURRED - Rx FIFO overrun occurred
1259 * - IX_SSP_NO_OVERRUN - Rx FIFO did not overrun
1260 * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
1262 * @li Reentrant : yes
1263 * @li ISR Callable : yes
1266 PUBLIC IX_SSP_STATUS
1267 ixSspAccRxFIFOOverrunCheck (
1270 #endif /* __ixp46X */
1271 #endif /* IXSSPACC_H */