IxSspAcc.h 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271
  1. /**
  2. * @file IxSspAcc.h
  3. *
  4. * @brief Header file for the IXP400 SSP Serial Port Access (IxSspAcc)
  5. *
  6. * @version $Revision: 0.1 $
  7. *
  8. * @par
  9. * IXP400 SW Release version 2.0
  10. *
  11. * -- Copyright Notice --
  12. *
  13. * @par
  14. * Copyright 2001-2005, Intel Corporation.
  15. * All rights reserved.
  16. *
  17. * @par
  18. * Redistribution and use in source and binary forms, with or without
  19. * modification, are permitted provided that the following conditions
  20. * are met:
  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.
  29. *
  30. * @par
  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
  41. * SUCH DAMAGE.
  42. *
  43. * @par
  44. * -- End of Copyright Notice --
  45. */
  46. /**
  47. * @defgroup IxSspAcc IXP400 SSP Serial Port Access (IxSspAcc) API
  48. *
  49. * @brief IXP400 SSP Serial Port Access Public API
  50. *
  51. * @{
  52. */
  53. #ifndef IXSSPACC_H
  54. #define IXSSPACC_H
  55. #ifdef __ixp46X
  56. #include "IxOsal.h"
  57. /*
  58. * Section for enum
  59. */
  60. /**
  61. * @ingroup IxSspAcc
  62. *
  63. * @enum IxSspAccDataSize
  64. *
  65. * @brief The data sizes in bits that are supported by the protocol
  66. */
  67. typedef enum
  68. {
  69. DATA_SIZE_TOO_SMALL = 0x2,
  70. DATA_SIZE_4 = 0x3,
  71. DATA_SIZE_5,
  72. DATA_SIZE_6,
  73. DATA_SIZE_7,
  74. DATA_SIZE_8,
  75. DATA_SIZE_9,
  76. DATA_SIZE_10,
  77. DATA_SIZE_11,
  78. DATA_SIZE_12,
  79. DATA_SIZE_13,
  80. DATA_SIZE_14,
  81. DATA_SIZE_15,
  82. DATA_SIZE_16,
  83. DATA_SIZE_TOO_BIG
  84. } IxSspAccDataSize;
  85. /**
  86. * @ingroup IxSspAcc
  87. *
  88. * @enum IxSspAccPortStatus
  89. *
  90. * @brief The status of the SSP port to be set to enable/disable
  91. */
  92. typedef enum
  93. {
  94. SSP_PORT_DISABLE = 0x0,
  95. SSP_PORT_ENABLE,
  96. INVALID_SSP_PORT_STATUS
  97. } IxSspAccPortStatus;
  98. /**
  99. * @ingroup IxSspAcc
  100. *
  101. * @enum IxSspAccFrameFormat
  102. *
  103. * @brief The frame format that is to be used - SPI, SSP, or Microwire
  104. */
  105. typedef enum
  106. {
  107. SPI_FORMAT = 0x0,
  108. SSP_FORMAT,
  109. MICROWIRE_FORMAT,
  110. INVALID_FORMAT
  111. } IxSspAccFrameFormat;
  112. /**
  113. * @ingroup IxSspAcc
  114. *
  115. * @enum IxSspAccClkSource
  116. *
  117. * @brief The source to produce the SSP serial clock
  118. */
  119. typedef enum
  120. {
  121. ON_CHIP_CLK = 0x0,
  122. EXTERNAL_CLK,
  123. INVALID_CLK_SOURCE
  124. } IxSspAccClkSource;
  125. /**
  126. * @ingroup IxSspAcc
  127. *
  128. * @enum IxSspAccSpiSclkPhase
  129. *
  130. * @brief The SPI SCLK Phase:
  131. * 0 - SCLK is inactive one cycle at the start of a frame and 1/2 cycle at the
  132. * end of a frame.
  133. * 1 - SCLK is inactive 1/2 cycle at the start of a frame and one cycle at the
  134. * end of a frame.
  135. */
  136. typedef enum
  137. {
  138. START_ONE_END_HALF = 0x0,
  139. START_HALF_END_ONE,
  140. INVALID_SPI_PHASE
  141. } IxSspAccSpiSclkPhase;
  142. /**
  143. * @ingroup IxSspAcc
  144. *
  145. * @enum IxSspAccSpiSclkPolarity
  146. *
  147. * @brief The SPI SCLK Polarity can be set to either low or high.
  148. */
  149. typedef enum
  150. {
  151. SPI_POLARITY_LOW = 0x0,
  152. SPI_POLARITY_HIGH,
  153. INVALID_SPI_POLARITY
  154. } IxSspAccSpiSclkPolarity;
  155. /**
  156. * @ingroup IxSspAcc
  157. *
  158. * @enum IxSspAccMicrowireCtlWord
  159. *
  160. * @brief The Microwire control word can be either 8 or 16 bit.
  161. */
  162. typedef enum
  163. {
  164. MICROWIRE_8_BIT = 0x0,
  165. MICROWIRE_16_BIT,
  166. INVALID_MICROWIRE_CTL_WORD
  167. } IxSspAccMicrowireCtlWord;
  168. /**
  169. * @ingroup IxSspAcc
  170. *
  171. * @enum IxSspAccFifoThreshold
  172. *
  173. * @brief The threshold in frames (each frame is defined by IxSspAccDataSize)
  174. * that can be set for the FIFO to trigger a threshold exceed when
  175. * checking with the ExceedThresholdCheck functions or an interrupt
  176. * when it is enabled.
  177. */
  178. typedef enum
  179. {
  180. FIFO_TSHLD_1 = 0x0,
  181. FIFO_TSHLD_2,
  182. FIFO_TSHLD_3,
  183. FIFO_TSHLD_4,
  184. FIFO_TSHLD_5,
  185. FIFO_TSHLD_6,
  186. FIFO_TSHLD_7,
  187. FIFO_TSHLD_8,
  188. FIFO_TSHLD_9,
  189. FIFO_TSHLD_10,
  190. FIFO_TSHLD_11,
  191. FIFO_TSHLD_12,
  192. FIFO_TSHLD_13,
  193. FIFO_TSHLD_14,
  194. FIFO_TSHLD_15,
  195. FIFO_TSHLD_16,
  196. INVALID_FIFO_TSHLD
  197. } IxSspAccFifoThreshold;
  198. /**
  199. * @ingroup IxSspAcc
  200. *
  201. * @enum IX_SSP_STATUS
  202. *
  203. * @brief The statuses that can be returned in a SSP Serial Port Access
  204. */
  205. typedef enum
  206. {
  207. IX_SSP_SUCCESS = IX_SUCCESS, /**< Success status */
  208. IX_SSP_FAIL, /**< Fail status */
  209. IX_SSP_RX_FIFO_OVERRUN_HANDLER_MISSING, /**<
  210. Rx FIFO Overrun handler is NULL. */
  211. IX_SSP_RX_FIFO_HANDLER_MISSING, /**<
  212. Rx FIFO threshold hit or above handler is NULL
  213. */
  214. IX_SSP_TX_FIFO_HANDLER_MISSING, /**<
  215. Tx FIFO threshold hit or below handler is NULL
  216. */
  217. IX_SSP_FIFO_NOT_EMPTY_FOR_SETTING_CTL_CMD, /**<
  218. Tx FIFO not empty and therefore microwire
  219. control command size setting is not allowed. */
  220. IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE, /**<
  221. frame format selected is invalid. */
  222. IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE, /**<
  223. data size selected is invalid. */
  224. IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE, /**<
  225. source clock selected is invalid. */
  226. IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE, /**<
  227. Tx FIFO threshold selected is invalid. */
  228. IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE, /**<
  229. Rx FIFO threshold selected is invalid. */
  230. IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE, /**<
  231. SPI phase selected is invalid. */
  232. IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE, /**<
  233. SPI polarity selected is invalid. */
  234. IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE, /**<
  235. Microwire control command selected is invalid
  236. */
  237. IX_SSP_INT_UNBIND_FAIL, /**< Interrupt unbind fail to unbind SSP
  238. interrupt */
  239. IX_SSP_INT_BIND_FAIL, /**< Interrupt bind fail during init */
  240. IX_SSP_RX_FIFO_NOT_EMPTY, /**<
  241. Rx FIFO not empty while trying to change data
  242. size. */
  243. IX_SSP_TX_FIFO_NOT_EMPTY, /**<
  244. Rx FIFO not empty while trying to change data
  245. size or microwire control command size. */
  246. IX_SSP_POLL_MODE_BLOCKING, /**<
  247. poll mode selected blocks interrupt mode from
  248. being selected. */
  249. IX_SSP_TX_FIFO_HIT_BELOW_THRESHOLD, /**<
  250. Tx FIFO level hit or below threshold. */
  251. IX_SSP_TX_FIFO_EXCEED_THRESHOLD, /**<
  252. Tx FIFO level exceeded threshold. */
  253. IX_SSP_RX_FIFO_HIT_ABOVE_THRESHOLD, /**<
  254. Rx FIFO level hit or exceeded threshold. */
  255. IX_SSP_RX_FIFO_BELOW_THRESHOLD, /**<
  256. Rx FIFO level below threshold. */
  257. IX_SSP_BUSY, /**< SSP is busy. */
  258. IX_SSP_IDLE, /**< SSP is idle. */
  259. IX_SSP_OVERRUN_OCCURRED, /**<
  260. SSP has experienced an overrun. */
  261. IX_SSP_NO_OVERRUN, /**<
  262. SSP did not experience an overrun. */
  263. IX_SSP_NOT_SUPORTED, /**< hardware does not support SSP */
  264. IX_SSP_NOT_INIT, /**< SSP Access not intialized */
  265. IX_SSP_NULL_POINTER /**< parameter passed in is NULL */
  266. } IX_SSP_STATUS;
  267. /**
  268. * @ingroup IxSspAcc
  269. *
  270. * @brief SSP Rx FIFO Overrun handler
  271. *
  272. * This function is called for the client to handle Rx FIFO Overrun that occurs
  273. * in the SSP hardware
  274. */
  275. typedef void (*RxFIFOOverrunHandler)(void);
  276. /**
  277. * @ingroup IxSspAcc
  278. *
  279. * @brief SSP Rx FIFO Threshold hit or above handler
  280. *
  281. * This function is called for the client to handle Rx FIFO threshold hit or
  282. * or above that occurs in the SSP hardware
  283. */
  284. typedef void (*RxFIFOThresholdHandler)(void);
  285. /**
  286. * @ingroup IxSspAcc
  287. *
  288. * @brief SSP Tx FIFO Threshold hit or below handler
  289. *
  290. * This function is called for the client to handle Tx FIFO threshold hit or
  291. * or below that occurs in the SSP hardware
  292. */
  293. typedef void (*TxFIFOThresholdHandler)(void);
  294. /*
  295. * Section for struct
  296. */
  297. /**
  298. * @ingroup IxSspAcc
  299. *
  300. * @brief contains all the variables required to initialize the SSP serial port
  301. * hardware.
  302. *
  303. * Structure to be filled and used for calling initialization
  304. */
  305. typedef struct
  306. {
  307. IxSspAccFrameFormat FrameFormatSelected;/**<Select between SPI, SSP and
  308. Microwire. */
  309. IxSspAccDataSize DataSizeSelected; /**<Select between 4 and 16. */
  310. IxSspAccClkSource ClkSourceSelected; /**<Select clock source to be
  311. on-chip or external. */
  312. IxSspAccFifoThreshold TxFIFOThresholdSelected;
  313. /**<Select Tx FIFO threshold
  314. between 1 to 16. */
  315. IxSspAccFifoThreshold RxFIFOThresholdSelected;
  316. /**<Select Rx FIFO threshold
  317. between 1 to 16. */
  318. BOOL RxFIFOIntrEnable; /**<Enable/disable Rx FIFO
  319. threshold interrupt. Disabling
  320. this interrupt will require
  321. the use of the polling function
  322. RxFIFOExceedThresholdCheck. */
  323. BOOL TxFIFOIntrEnable; /**<Enable/disable Tx FIFO
  324. threshold interrupt. Disabling
  325. this interrupt will require
  326. the use of the polling function
  327. TxFIFOExceedThresholdCheck. */
  328. RxFIFOThresholdHandler RxFIFOThsldHdlr; /**<Pointer to function to handle
  329. a Rx FIFO interrupt. */
  330. TxFIFOThresholdHandler TxFIFOThsldHdlr; /**<Pointer to function to handle
  331. a Tx FIFO interrupt. */
  332. RxFIFOOverrunHandler RxFIFOOverrunHdlr; /**<Pointer to function to handle
  333. a Rx FIFO overrun interrupt. */
  334. BOOL LoopbackEnable; /**<Select operation mode to be
  335. normal or loopback mode. */
  336. IxSspAccSpiSclkPhase SpiSclkPhaseSelected;
  337. /**<Select SPI SCLK phase to start
  338. with one inactive cycle and end
  339. with 1/2 inactive cycle or
  340. start with 1/2 inactive cycle
  341. and end with one inactive
  342. cycle. (Only used in
  343. SPI format). */
  344. IxSspAccSpiSclkPolarity SpiSclkPolaritySelected;
  345. /**<Select SPI SCLK idle state
  346. to be low or high. (Only used in
  347. SPI format). */
  348. IxSspAccMicrowireCtlWord MicrowireCtlWordSelected;
  349. /**<Select Microwire control
  350. format to be 8 or 16-bit. (Only
  351. used in Microwire format). */
  352. UINT8 SerialClkRateSelected; /**<Select between 0 (1.8432Mbps)
  353. and 255 (7.2Kbps). The
  354. formula used is Bit rate =
  355. 3.6864x10^6 /
  356. (2 x (SerialClkRateSelect + 1))
  357. */
  358. } IxSspInitVars;
  359. /**
  360. * @ingroup IxSspAcc
  361. *
  362. * @brief contains counters of the SSP statistics
  363. *
  364. * Structure contains all values of counters and associated overflows.
  365. */
  366. typedef struct
  367. {
  368. UINT32 ixSspRcvCounter; /**<Total frames received. */
  369. UINT32 ixSspXmitCounter; /**<Total frames transmitted. */
  370. UINT32 ixSspOverflowCounter;/**<Total occurrences of overflow. */
  371. } IxSspAccStatsCounters;
  372. /*
  373. * Section for prototypes interface functions
  374. */
  375. /**
  376. * @ingroup IxSspAcc
  377. *
  378. * @fn ixSspAccInit (
  379. IxSspInitVars *initVarsSelected);
  380. *
  381. * @brief Initializes the SSP Access module.
  382. *
  383. * @param "IxSspAccInitVars [in] *initVarsSelected" - struct containing required
  384. * variables for initialization
  385. *
  386. * Global Data :
  387. * - None.
  388. *
  389. * This API will initialize the SSP Serial Port hardware to the user specified
  390. * configuration. Then it will enable the SSP Serial Port.
  391. * *NOTE*: Once interrupt or polling mode is selected, the mode cannot be
  392. * changed via the interrupt enable/disable function but the init needs to be
  393. * called again to change it.
  394. *
  395. * @return
  396. * - IX_SSP_SUCCESS - Successfully initialize and enable the SSP
  397. * serial port.
  398. * - IX_SSP_RX_FIFO_HANDLER_MISSING - interrupt mode is selected but RX FIFO
  399. * handler pointer is NULL
  400. * - IX_SSP_TX_FIFO_HANDLER_MISSING - interrupt mode is selected but TX FIFO
  401. * handler pointer is NULL
  402. * - IX_SSP_RX_FIFO_OVERRUN_HANDLER_MISSING - interrupt mode is selected but
  403. * RX FIFO Overrun handler pointer is NULL
  404. * - IX_SSP_RX_FIFO_NOT_EMPTY - Rx FIFO not empty, data size change is not
  405. * allowed.
  406. * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
  407. * allowed.
  408. * - IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE - frame format selected is invalid
  409. * - IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE - data size selected is invalid
  410. * - IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE - clock source selected is invalid
  411. * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - Tx FIFO threshold level
  412. * selected is invalid
  413. * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - Rx FIFO threshold level
  414. * selected is invalid
  415. * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - SPI phase selected is invalid
  416. * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - SPI polarity selected is invalid
  417. * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - microwire control command
  418. * size is invalid
  419. * - IX_SSP_INT_UNBIND_FAIL - interrupt handler failed to unbind SSP interrupt
  420. * - IX_SSP_INT_BIND_FAIL - interrupt handler failed to bind to SSP interrupt
  421. * hardware trigger
  422. * - IX_SSP_NOT_SUPORTED - hardware does not support SSP
  423. * - IX_SSP_NULL_POINTER - parameter passed in is NULL
  424. *
  425. * @li Reentrant : yes
  426. * @li ISR Callable : yes
  427. *
  428. */
  429. PUBLIC IX_SSP_STATUS
  430. ixSspAccInit (IxSspInitVars *initVarsSelected);
  431. /**
  432. * @ingroup IxSspAcc
  433. *
  434. * @fn ixSspAccUninit (
  435. void)
  436. *
  437. * @brief Un-initializes the SSP Serial Port Access component
  438. *
  439. * @param - None
  440. *
  441. * Global Data :
  442. * - None.
  443. *
  444. * This API will disable the SSP Serial Port hardware. The client can call the
  445. * init function again if they wish to enable the SSP.
  446. *
  447. * @return
  448. * - IX_SSP_SUCCESS - successfully uninit SSP component
  449. * - IX_SSP_INT_UNBIND_FAIL - interrupt handler failed to unbind SSP interrupt
  450. *
  451. * @li Reentrant : yes
  452. * @li ISR Callable : yes
  453. *
  454. */
  455. PUBLIC IX_SSP_STATUS
  456. ixSspAccUninit (void);
  457. /**
  458. * @ingroup IxSspAcc
  459. *
  460. * @fn ixSspAccFIFODataSubmit (
  461. UINT16 *data,
  462. UINT32 amtOfData)
  463. *
  464. * @brief Inserts data into the SSP Serial Port's FIFO
  465. *
  466. * @param "UINT16 [in] *data" - pointer to the location to transmit the data
  467. * from
  468. * "UINT32 [in] amtOfData" - number of data to be transmitted.
  469. *
  470. * Global Data :
  471. * - None.
  472. *
  473. * This API will insert the amount of data specified by "amtOfData" from buffer
  474. * pointed to by "data" into the FIFO to be transmitted by the hardware.
  475. *
  476. * @return
  477. * - IX_SSP_SUCCESS - Data inserted successfully into FIFO
  478. * - IX_SSP_FAIL - FIFO insufficient space
  479. * - IX_SSP_NULL_POINTER - data pointer passed by client is NULL
  480. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  481. *
  482. * @li Reentrant : yes
  483. * @li ISR Callable : yes
  484. *
  485. */
  486. PUBLIC IX_SSP_STATUS
  487. ixSspAccFIFODataSubmit (
  488. UINT16* data,
  489. UINT32 amtOfData);
  490. /**
  491. * @ingroup IxSspAcc
  492. *
  493. * @fn ixSspAccFIFODataReceive (
  494. UINT16 *data,
  495. UINT32 amtOfData)
  496. *
  497. * @brief Extract data from the SSP Serial Port's FIFO
  498. *
  499. * @param "UINT16 [in] *data" - pointer to the location to receive the data into
  500. * "UINT32 [in] amtOfData" - number of data to be received.
  501. *
  502. * Global Data :
  503. * - None.
  504. *
  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".
  507. *
  508. * @return
  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.
  513. *
  514. * @li Reentrant : yes
  515. * @li ISR Callable : yes
  516. *
  517. */
  518. PUBLIC IX_SSP_STATUS
  519. ixSspAccFIFODataReceive (
  520. UINT16* data,
  521. UINT32 amtOfData);
  522. /**
  523. * Polling Functions
  524. */
  525. /**
  526. * @ingroup IxSspAcc
  527. *
  528. * @fn ixSspAccTxFIFOHitOrBelowThresholdCheck (
  529. void)
  530. *
  531. * @brief Check if the Tx FIFO threshold has been hit or fallen below.
  532. *
  533. * @param - None
  534. *
  535. * Global Data :
  536. * - None.
  537. *
  538. * This API will return whether the Tx FIFO threshold has been exceeded or not
  539. *
  540. * @return
  541. * - IX_SSP_TX_FIFO_HIT_BELOW_THRESHOLD - Tx FIFO level hit or below threshold .
  542. * - IX_SSP_TX_FIFO_EXCEED_THRESHOLD - Tx FIFO level exceeded threshold.
  543. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  544. *
  545. * @li Reentrant : yes
  546. * @li ISR Callable : yes
  547. *
  548. */
  549. PUBLIC IX_SSP_STATUS
  550. ixSspAccTxFIFOHitOrBelowThresholdCheck (
  551. void);
  552. /**
  553. * @ingroup IxSspAcc
  554. *
  555. * @fn ixSspAccRxFIFOHitOrAboveThresholdCheck (
  556. void)
  557. *
  558. * @brief Check if the Rx FIFO threshold has been hit or exceeded.
  559. *
  560. * @param - None
  561. *
  562. * Global Data :
  563. * - None.
  564. *
  565. * This API will return whether the Rx FIFO level is below threshold or not
  566. *
  567. * @return
  568. * - IX_SSP_RX_FIFO_HIT_ABOVE_THRESHOLD - Rx FIFO level hit or exceeded threshold
  569. * - IX_SSP_RX_FIFO_BELOW_THRESHOLD - Rx FIFO level below threshold
  570. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  571. *
  572. * @li Reentrant : yes
  573. * @li ISR Callable : yes
  574. *
  575. */
  576. PUBLIC IX_SSP_STATUS
  577. ixSspAccRxFIFOHitOrAboveThresholdCheck (
  578. void);
  579. /**
  580. * Configuration functions
  581. *
  582. * NOTE: These configurations are not required to be called once init is called
  583. * unless configurations need to be changed on the fly.
  584. */
  585. /**
  586. * @ingroup IxSspAcc
  587. *
  588. * @fn ixSspAccSSPPortStatusSet (
  589. IxSspAccPortStatus portStatusSelected)
  590. *
  591. * @brief Enables/disables the SSP Serial Port hardware.
  592. *
  593. * @param "IxSspAccPortStatus [in] portStatusSelected" - Set the SSP port to
  594. * enable or disable
  595. *
  596. * Global Data :
  597. * - None.
  598. *
  599. * This API will enable/disable the SSP Serial Port hardware.
  600. * NOTE: This function is called by init to enable the SSP after setting up the
  601. * configurations and by uninit to disable the SSP.
  602. *
  603. * @return
  604. * - IX_SSP_SUCCESS - Port status set with valid enum value
  605. * - IX_SSP_FAIL - invalid enum value
  606. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  607. *
  608. * @li Reentrant : yes
  609. * @li ISR Callable : yes
  610. *
  611. */
  612. PUBLIC IX_SSP_STATUS
  613. ixSspAccSSPPortStatusSet (
  614. IxSspAccPortStatus portStatusSelected);
  615. /**
  616. * @ingroup IxSspAcc
  617. *
  618. * @fn ixSspAccFrameFormatSelect (
  619. IxSspAccFrameFormat frameFormatSelected)
  620. *
  621. * @brief Sets the frame format for the SSP Serial Port hardware
  622. *
  623. * @param "IxSspAccFrameFormat [in] frameFormatSelected" - The frame format of
  624. * SPI, SSP or Microwire can be selected as the format
  625. *
  626. * Global Data :
  627. * - None.
  628. *
  629. * This API will set the format for the transfers via user input.
  630. * *NOTE*: The SSP hardware will be disabled to clear the FIFOs. Then its
  631. * previous state (enabled/disabled) restored after changing the format.
  632. *
  633. * @return
  634. * - IX_SSP_SUCCESS - frame format set with valid enum value
  635. * - IX_SSP_INVALID_FRAME_FORMAT_ENUM_VALUE - invalid frame format value
  636. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  637. *
  638. * @li Reentrant : yes
  639. * @li ISR Callable : yes
  640. *
  641. */
  642. PUBLIC IX_SSP_STATUS
  643. ixSspAccFrameFormatSelect (
  644. IxSspAccFrameFormat frameFormatSelected);
  645. /**
  646. * @ingroup IxSspAcc
  647. *
  648. * @fn ixSspAccDataSizeSelect (
  649. IxSspAccDataSize dataSizeSelected)
  650. *
  651. * @brief Sets the data size for transfers
  652. *
  653. * @param "IxSspAccDataSize [in] dataSizeSelected" - The data size between 4
  654. * and 16 that can be selected for data transfers
  655. *
  656. * Global Data :
  657. * - None.
  658. *
  659. * This API will set the data size for the transfers via user input. It will
  660. * disallow the change of the data size if either of the Rx/Tx FIFO is not
  661. * empty to prevent data loss.
  662. * *NOTE*: The SSP port will be disabled if the FIFOs are found to be empty and
  663. * if between the check and disabling of the SSP (which clears the
  664. * FIFOs) data is received into the FIFO, it might be lost.
  665. * *NOTE*: The FIFOs can be cleared by disabling the SSP Port if necessary to
  666. * force the data size change.
  667. *
  668. * @return
  669. * - IX_SSP_SUCCESS - data size set with valid enum value
  670. * - IX_SSP_RX_FIFO_NOT_EMPTY - Rx FIFO not empty, data size change is not
  671. * allowed.
  672. * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
  673. * allowed.
  674. * - IX_SSP_INVALID_DATA_SIZE_ENUM_VALUE - invalid enum value
  675. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  676. *
  677. * @li Reentrant : yes
  678. * @li ISR Callable : yes
  679. *
  680. */
  681. PUBLIC IX_SSP_STATUS
  682. ixSspAccDataSizeSelect (
  683. IxSspAccDataSize dataSizeSelected);
  684. /**
  685. * @ingroup IxSspAcc
  686. *
  687. * @fn ixSspAccClockSourceSelect(
  688. IxSspAccClkSource clkSourceSelected)
  689. *
  690. * @brief Sets the clock source of the SSP Serial Port hardware
  691. *
  692. * @param "IxSspAccClkSource [in] clkSourceSelected" - The clock source from
  693. * either external source on on-chip can be selected as the source
  694. *
  695. * Global Data :
  696. * - None.
  697. *
  698. * This API will set the clock source for the transfers via user input.
  699. *
  700. * @return
  701. * - IX_SSP_SUCCESS - clock source set with valid enum value
  702. * - IX_SSP_INVALID_CLOCK_SOURCE_ENUM_VALUE - invalid enum value
  703. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  704. *
  705. * @li Reentrant : yes
  706. * @li ISR Callable : yes
  707. *
  708. */
  709. PUBLIC IX_SSP_STATUS
  710. ixSspAccClockSourceSelect (
  711. IxSspAccClkSource clkSourceSelected);
  712. /**
  713. * @ingroup IxSspAcc
  714. *
  715. * @fn ixSspAccSerialClockRateConfigure (
  716. UINT8 serialClockRateSelected)
  717. *
  718. * @brief Sets the on-chip Serial Clock Rate of the SSP Serial Port hardware.
  719. *
  720. * @param "UINT8 [in] serialClockRateSelected" - The serial clock rate that can
  721. * be set is between 7.2Kbps and 1.8432Mbps. The formula used is
  722. * Bit rate = 3.6864x10^6 / (2 x (SerialClockRateSelected + 1))
  723. *
  724. * Global Data :
  725. * - None.
  726. *
  727. * This API will set the serial clock rate for the transfers via user input.
  728. *
  729. * @return
  730. * - IX_SSP_SUCCESS - Serial clock rate configured successfully
  731. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  732. *
  733. * @li Reentrant : yes
  734. * @li ISR Callable : yes
  735. *
  736. */
  737. PUBLIC IX_SSP_STATUS
  738. ixSspAccSerialClockRateConfigure (
  739. UINT8 serialClockRateSelected);
  740. /**
  741. * @ingroup IxSspAcc
  742. *
  743. * @fn ixSspAccRxFIFOIntEnable (
  744. RxFIFOThresholdHandler rxFIFOIntrHandler)
  745. *
  746. * @brief Enables service request interrupt whenever the Rx FIFO hits its
  747. * threshold
  748. *
  749. * @param "void [in] *rxFIFOIntrHandler(UINT32)" - function pointer to the
  750. * interrupt handler for the Rx FIFO exceeded.
  751. *
  752. * Global Data :
  753. * - None.
  754. *
  755. * This API will enable the service request interrupt for the Rx FIFO
  756. *
  757. * @return
  758. * - IX_SSP_SUCCESS - Rx FIFO level interrupt enabled successfully
  759. * - IX_SSP_RX_FIFO_HANDLER_MISSING - missing handler for Rx FIFO level interrupt
  760. * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not
  761. * allowed to be enabled. Use init to enable interrupt mode.
  762. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  763. *
  764. * @li Reentrant : yes
  765. * @li ISR Callable : yes
  766. *
  767. */
  768. PUBLIC IX_SSP_STATUS
  769. ixSspAccRxFIFOIntEnable (
  770. RxFIFOThresholdHandler rxFIFOIntrHandler);
  771. /**
  772. * @ingroup IxSspAcc
  773. *
  774. * @fn ixSspAccRxFIFOIntDisable (
  775. void)
  776. *
  777. * @brief Disables service request interrupt of the Rx FIFO.
  778. *
  779. * @param - None
  780. *
  781. * Global Data :
  782. * - None.
  783. *
  784. * This API will disable the service request interrupt of the Rx FIFO.
  785. *
  786. * @return
  787. * - IX_SSP_SUCCESS - Rx FIFO Interrupt disabled successfully
  788. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  789. *
  790. * @li Reentrant : yes
  791. * @li ISR Callable : yes
  792. *
  793. */
  794. PUBLIC IX_SSP_STATUS
  795. ixSspAccRxFIFOIntDisable (
  796. void);
  797. /**
  798. * @ingroup IxSspAcc
  799. *
  800. * @fn ixSspAccTxFIFOIntEnable (
  801. TxFIFOThresholdHandler txFIFOIntrHandler)
  802. *
  803. * @brief Enables service request interrupt of the Tx FIFO.
  804. *
  805. * @param "void [in] *txFIFOIntrHandler(UINT32)" - function pointer to the
  806. * interrupt handler for the Tx FIFO exceeded.
  807. *
  808. * Global Data :
  809. * - None.
  810. *
  811. * This API will enable the service request interrupt of the Tx FIFO.
  812. *
  813. * @return
  814. * - IX_SSP_SUCCESS - Tx FIFO level interrupt enabled successfully
  815. * - IX_SSP_TX_FIFO_HANDLER_MISSING - missing handler for Tx FIFO level interrupt
  816. * - IX_SSP_POLL_MODE_BLOCKING - poll mode is selected at init, interrupt not
  817. * allowed to be enabled. Use init to enable interrupt mode.
  818. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  819. *
  820. * @li Reentrant : yes
  821. * @li ISR Callable : yes
  822. *
  823. */
  824. PUBLIC IX_SSP_STATUS
  825. ixSspAccTxFIFOIntEnable (
  826. TxFIFOThresholdHandler txFIFOIntrHandler);
  827. /**
  828. * @ingroup IxSspAcc
  829. *
  830. * @fn ixSspAccTxFIFOIntDisable (
  831. void)
  832. *
  833. * @brief Disables service request interrupt of the Tx FIFO
  834. *
  835. * @param - None
  836. *
  837. * Global Data :
  838. * - None.
  839. *
  840. * This API will disable the service request interrupt of the Tx FIFO
  841. *
  842. * @return
  843. * - IX_SSP_SUCCESS - Tx FIFO Interrupt disabled successfuly.
  844. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  845. *
  846. * @li Reentrant : yes
  847. * @li ISR Callable : yes
  848. *
  849. */
  850. PUBLIC IX_SSP_STATUS
  851. ixSspAccTxFIFOIntDisable (
  852. void);
  853. /**
  854. * @ingroup IxSspAcc
  855. *
  856. * @fn ixSspAccLoopbackEnable (
  857. BOOL loopbackEnable)
  858. *
  859. * @brief Enables/disables the loopback mode
  860. *
  861. * @param "BOOL [in] loopbackEnable" - True to enable and false to disable.
  862. *
  863. * Global Data :
  864. * - None.
  865. *
  866. * This API will set the mode of operation to either loopback or normal mode
  867. * according to the user input.
  868. *
  869. * @return
  870. * - IX_SSP_SUCCESS - Loopback enabled successfully
  871. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  872. *
  873. * @li Reentrant : yes
  874. * @li ISR Callable : yes
  875. *
  876. */
  877. PUBLIC IX_SSP_STATUS
  878. ixSspAccLoopbackEnable (
  879. BOOL loopbackEnable);
  880. /**
  881. * @ingroup IxSspAcc
  882. *
  883. * @fn ixSspAccSpiSclkPolaritySet (
  884. IxSspAccSpiSclkPolarity spiSclkPolaritySelected)
  885. *
  886. * @brief Sets the SPI SCLK Polarity to Low or High
  887. *
  888. * @param - "IxSspAccSpiSclkPolarity [in] spiSclkPolaritySelected" - SPI SCLK
  889. * polarity that can be selected to either high or low
  890. *
  891. * Global Data :
  892. * - None.
  893. *
  894. * This API is only used for the SPI frame format and will set the SPI SCLK polarity
  895. * to either low or high
  896. *
  897. * @return
  898. * - IX_SSP_SUCCESS - SPI Sclk polarity set with valid enum value
  899. * - IX_SSP_INVALID_SPI_POLARITY_ENUM_VALUE - invalid SPI polarity value
  900. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  901. *
  902. * @li Reentrant : yes
  903. * @li ISR Callable : yes
  904. *
  905. */
  906. PUBLIC IX_SSP_STATUS
  907. ixSspAccSpiSclkPolaritySet (
  908. IxSspAccSpiSclkPolarity spiSclkPolaritySelected);
  909. /**
  910. * @ingroup IxSspAcc
  911. *
  912. * @fn ixSspAccSpiSclkPhaseSet (
  913. IxSspAccSpiSclkPhase spiSclkPhaseSelected)
  914. *
  915. * @brief Sets the SPI SCLK Phase
  916. *
  917. * @param "IxSspAccSpiSclkPhase [in] spiSclkPhaseSelected" - Phase of either
  918. * the SCLK is inactive one cycle at the start of a frame and 1/2
  919. * cycle at the end of a frame, OR
  920. * the SCLK is inactive 1/2 cycle at the start of a frame and one
  921. * cycle at the end of a frame.
  922. *
  923. * Global Data :
  924. * - IX_SSP_SUCCESS - SPI Sclk phase set with valid enum value
  925. * - IX_SSP_INVALID_SPI_PHASE_ENUM_VALUE - invalid SPI phase value
  926. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  927. *
  928. * This API is only used for the SPI frame format and will set the SPI SCLK
  929. * phase according to user input.
  930. *
  931. * @return
  932. * - None
  933. *
  934. * @li Reentrant : yes
  935. * @li ISR Callable : yes
  936. *
  937. */
  938. PUBLIC IX_SSP_STATUS
  939. ixSspAccSpiSclkPhaseSet (
  940. IxSspAccSpiSclkPhase spiSclkPhaseSelected);
  941. /**
  942. * @ingroup IxSspAcc
  943. *
  944. * @fn ixSspAccMicrowireControlWordSet (
  945. IxSspAccMicrowireCtlWord microwireCtlWordSelected)
  946. *
  947. * @brief Sets the Microwire control word to 8 or 16 bit format
  948. *
  949. * @param "IxSspAccMicrowireCtlWord [in] microwireCtlWordSelected" - Microwire
  950. * control word format can be either 8 or 16 bit format
  951. *
  952. * Global Data :
  953. * - None.
  954. *
  955. * This API is only used for the Microwire frame format and will set the
  956. * control word to 8 or 16 bit format
  957. *
  958. * @return
  959. * - IX_SSP_SUCCESS - Microwire Control Word set with valid enum value
  960. * - IX_SSP_TX_FIFO_NOT_EMPTY - Tx FIFO not empty, data size change is not
  961. * allowed.
  962. * - IX_SSP_INVALID_MICROWIRE_CTL_CMD_ENUM_VALUE - invalid enum value
  963. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  964. *
  965. * @li Reentrant : yes
  966. * @li ISR Callable : yes
  967. *
  968. */
  969. PUBLIC IX_SSP_STATUS
  970. ixSspAccMicrowireControlWordSet (
  971. IxSspAccMicrowireCtlWord microwireCtlWordSelected);
  972. /**
  973. * @ingroup IxSspAcc
  974. *
  975. * @fn ixSspAccTxFIFOThresholdSet (
  976. IxSspAccFifoThreshold txFIFOThresholdSelected)
  977. *
  978. * @brief Sets the Tx FIFO Threshold.
  979. *
  980. * @param "IxSspAccFifoThreshold [in] txFIFOThresholdSelected" - Threshold that
  981. * is set for a Tx FIFO service request to be triggered
  982. *
  983. * Global Data :
  984. * - None.
  985. *
  986. * This API will set the threshold for a Tx FIFO threshold to be triggered
  987. *
  988. * @return
  989. * - IX_SSP_SUCCESS - Tx FIFO Threshold set with valid enum value
  990. * - IX_SSP_INVALID_TX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value
  991. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  992. *
  993. * @li Reentrant : yes
  994. * @li ISR Callable : yes
  995. *
  996. */
  997. PUBLIC IX_SSP_STATUS
  998. ixSspAccTxFIFOThresholdSet (
  999. IxSspAccFifoThreshold txFIFOThresholdSelected);
  1000. /**
  1001. * @ingroup IxSspAcc
  1002. *
  1003. * @fn ixSspAccRxFIFOThresholdSet (
  1004. IxSspAccFifoThreshold rxFIFOThresholdSelected)
  1005. *
  1006. * @brief Sets the Rx FIFO Threshold.
  1007. *
  1008. * @param "IxSspAccFifoThreshold [in] rxFIFOThresholdSelected" - Threshold that
  1009. * is set for a Tx FIFO service request to be triggered
  1010. *
  1011. * Global Data :
  1012. * - None.
  1013. *
  1014. * This API will will set the threshold for a Rx FIFO threshold to be triggered
  1015. *
  1016. * @return
  1017. * - IX_SSP_SUCCESS - Rx FIFO Threshold set with valid enum value
  1018. * - IX_SSP_INVALID_RX_FIFO_THRESHOLD_ENUM_VALUE - invalid enum value
  1019. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  1020. *
  1021. * @li Reentrant : yes
  1022. * @li ISR Callable : yes
  1023. *
  1024. */
  1025. PUBLIC IX_SSP_STATUS
  1026. ixSspAccRxFIFOThresholdSet (
  1027. IxSspAccFifoThreshold rxFIFOThresholdSelected);
  1028. /**
  1029. * Debug functions
  1030. */
  1031. /**
  1032. * @ingroup IxSspAcc
  1033. *
  1034. * @fn ixSspAccStatsGet (
  1035. IxSspAccStatsCounters *sspStats)
  1036. *
  1037. * @brief Returns the SSP Statistics through the pointer passed in
  1038. *
  1039. * @param "IxSspAccStatsCounters [in] *sspStats" - SSP statistics counter will
  1040. * be read and written to the location pointed by this pointer.
  1041. *
  1042. * Global Data :
  1043. * - None.
  1044. *
  1045. * This API will return the statistics counters of the SSP transfers.
  1046. *
  1047. * @return
  1048. * - IX_SSP_SUCCESS - Stats obtained into the pointer provided successfully
  1049. * - IX_SSP_FAIL - client provided pointer is NULL
  1050. *
  1051. * @li Reentrant : yes
  1052. * @li ISR Callable : yes
  1053. *
  1054. */
  1055. PUBLIC IX_SSP_STATUS
  1056. ixSspAccStatsGet (
  1057. IxSspAccStatsCounters *sspStats);
  1058. /**
  1059. * @ingroup IxSspAcc
  1060. *
  1061. * @fn ixSspAccStatsReset (
  1062. void)
  1063. *
  1064. * @brief Resets the SSP Statistics
  1065. *
  1066. * @param - None
  1067. *
  1068. * Global Data :
  1069. * - None.
  1070. *
  1071. * This API will reset the SSP statistics counters.
  1072. *
  1073. * @return
  1074. * - None
  1075. *
  1076. * @li Reentrant : yes
  1077. * @li ISR Callable : yes
  1078. *
  1079. */
  1080. PUBLIC void
  1081. ixSspAccStatsReset (
  1082. void);
  1083. /**
  1084. * @ingroup IxSspAcc
  1085. *
  1086. * @fn ixSspAccShow (
  1087. void)
  1088. *
  1089. * @brief Display SSP status registers and statistics counters.
  1090. *
  1091. * @param - None
  1092. *
  1093. * Global Data :
  1094. * - None.
  1095. *
  1096. * This API will display the status registers of the SSP and the statistics
  1097. * counters.
  1098. *
  1099. * @return
  1100. * - IX_SSP_SUCCESS - SSP show called successfully.
  1101. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  1102. *
  1103. * @li Reentrant : yes
  1104. * @li ISR Callable : yes
  1105. *
  1106. */
  1107. PUBLIC IX_SSP_STATUS
  1108. ixSspAccShow (
  1109. void);
  1110. /**
  1111. * @ingroup IxSspAcc
  1112. *
  1113. * @fn ixSspAccSSPBusyCheck (
  1114. void)
  1115. *
  1116. * @brief Determine the state of the SSP serial port hardware.
  1117. *
  1118. * @param - None
  1119. *
  1120. * Global Data :
  1121. * - None.
  1122. *
  1123. * This API will return the state of the SSP serial port hardware - busy or
  1124. * idle
  1125. *
  1126. * @return
  1127. * - IX_SSP_BUSY - SSP is busy
  1128. * - IX_SSP_IDLE - SSP is idle.
  1129. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  1130. *
  1131. * @li Reentrant : yes
  1132. * @li ISR Callable : yes
  1133. *
  1134. */
  1135. PUBLIC IX_SSP_STATUS
  1136. ixSspAccSSPBusyCheck (
  1137. void);
  1138. /**
  1139. * @ingroup IxSspAcc
  1140. *
  1141. * @fn ixSspAccTxFIFOLevelGet (
  1142. void)
  1143. *
  1144. * @brief Obtain the Tx FIFO's level
  1145. *
  1146. * @param - None
  1147. *
  1148. * Global Data :
  1149. * - None.
  1150. *
  1151. * This API will return the level of the Tx FIFO
  1152. *
  1153. * @return
  1154. * - 0..16; 0 can also mean SSP not initialized and will need to be init.
  1155. *
  1156. * @li Reentrant : yes
  1157. * @li ISR Callable : yes
  1158. *
  1159. */
  1160. PUBLIC UINT8
  1161. ixSspAccTxFIFOLevelGet (
  1162. void);
  1163. /**
  1164. * @ingroup IxSspAcc
  1165. *
  1166. * @fn ixSspAccRxFIFOLevelGet (
  1167. void)
  1168. *
  1169. * @brief Obtain the Rx FIFO's level
  1170. *
  1171. * @param - None
  1172. *
  1173. * Global Data :
  1174. * - None.
  1175. *
  1176. * This API will return the level of the Rx FIFO
  1177. *
  1178. * @return
  1179. * - 0..16; 0 can also mean SSP not initialized and will need to be init.
  1180. *
  1181. * @li Reentrant : yes
  1182. * @li ISR Callable : yes
  1183. *
  1184. */
  1185. PUBLIC UINT8
  1186. ixSspAccRxFIFOLevelGet (
  1187. void);
  1188. /**
  1189. * @ingroup IxSspAcc
  1190. *
  1191. * @fn ixSspAccRxFIFOOverrunCheck (
  1192. void)
  1193. *
  1194. * @brief Check if the Rx FIFO has overrun its FIFOs
  1195. *
  1196. * @param - None
  1197. *
  1198. * Global Data :
  1199. * - None.
  1200. *
  1201. * This API will return whether the Rx FIFO has overrun its 16 FIFOs
  1202. *
  1203. * @return
  1204. * - IX_SSP_OVERRUN_OCCURRED - Rx FIFO overrun occurred
  1205. * - IX_SSP_NO_OVERRUN - Rx FIFO did not overrun
  1206. * - IX_SSP_NOT_INIT - SSP not initialized. SSP init needs to be called.
  1207. *
  1208. * @li Reentrant : yes
  1209. * @li ISR Callable : yes
  1210. *
  1211. */
  1212. PUBLIC IX_SSP_STATUS
  1213. ixSspAccRxFIFOOverrunCheck (
  1214. void);
  1215. #endif /* __ixp46X */
  1216. #endif /* IXSSPACC_H */