PDK API Guide for J721E
i2c.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Texas Instruments Incorporated - www.ti.com/
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
76 #ifndef I2C_H_
77 #define I2C_H_
78 
79 #ifdef __cplusplus
80 extern "C" {
81 #endif
82 
83 /* ========================================================================== */
84 /* Include Files */
85 /* ========================================================================== */
86 #include <ti/csl/src/ip/i2c/V2/cslr_i2c.h>
87 
88 /* ========================================================================== */
89 /* Macros */
90 /* ========================================================================== */
91 /*
92  * \name Values that can be passed to I2CMasterControl API as command to
93  * configure mode of operation of I2C in Master mode.
94  * @{
95  */
99 #define I2C_CFG_MST_TX (((uint32_t) I2C_CON_TRX_MASK) | \
100  (uint32_t) (I2C_CON_MST_MASK))
101 
104 #define I2C_CFG_MST_RX ((uint32_t) I2C_CON_MST_MASK)
105 
108 #define I2C_CFG_STOP ((uint32_t) I2C_CON_STP_MASK)
109 
112 #define I2C_CFG_N0RMAL_MODE ((uint32_t) 0 << I2C_CON_STB_SHIFT)
113 
116 #define I2C_CFG_SRT_BYTE_MODE ((uint32_t) I2C_CON_STB_MASK)
117 
120 #define I2C_CFG_7BIT_SLAVE_ADDR ((uint32_t) 0 << I2C_CON_XSA_SHIFT)
121 
124 #define I2C_CFG_10BIT_SLAVE_ADDR ((uint32_t) I2C_CON_XSA_MASK)
125 
128 #define I2C_CFG_10BIT_OWN_ADDR_0 ((uint32_t) I2C_CON_XOA0_MASK)
129 
132 #define I2C_CFG_10BIT_OWN_ADDR_1 ((uint32_t) I2C_CON_XOA1_MASK)
133 
136 #define I2C_CFG_10BIT_OWN_ADDR_2 ((uint32_t) I2C_CON_XOA2_MASK)
137 
140 #define I2C_CFG_10BIT_OWN_ADDR_3 ((uint32_t) I2C_CON_XOA3_MASK)
141 
144 #define I2C_CFG_7BIT_OWN_ADDR_0 ((uint32_t) 0 << I2C_CON_XOA0_SHIFT)
145 
148 #define I2C_CFG_7BIT_OWN_ADDR_1 ((uint32_t) 0 << I2C_CON_XOA1_SHIFT)
149 
152 #define I2C_CFG_7BIT_OWN_ADDR_2 ((uint32_t) 0 << I2C_CON_XOA2_SHIFT)
153 
156 #define I2C_CFG_7BIT_OWN_ADDR_3 ((uint32_t) 0 << I2C_CON_XOA3_SHIFT)
157 
160 #define I2C_CFG_MST_ENABLE ((uint32_t) I2C_CON_I2C_EN_MASK)
161 
164 #define I2C_CFG_START ((uint32_t) I2C_CON_STT_MASK)
165 
168 #define I2C_CFG_MST ((uint32_t) I2C_CON_MST_MASK)
169 
172 #define I2C_CFG_HS_MOD ((uint32_t) CSL_I2C_CON_OPMODE_HSI2C << CSL_I2C_CON_OPMODE_SHIFT)
173 
174 /* @} */
175 
176 /*
177  * \name Values that can be passed to I2CMasterIntEnableEx API as intFlag to Enable
178  * interrupts.
179  * @{
180 */
184 #define I2C_INT_ARBITRATION_LOST ((uint32_t) I2C_IRQSTATUS_AL_MASK)
185 
188 #define I2C_INT_NO_ACK ((uint32_t) I2C_IRQSTATUS_NACK_MASK)
189 
192 #define I2C_INT_ADRR_READY_ACESS ((uint32_t) I2C_IRQSTATUS_ARDY_MASK)
193 
196 #define I2C_INT_RECV_READY ((uint32_t) I2C_IRQSTATUS_RRDY_MASK)
197 
200 #define I2C_INT_TRANSMIT_READY ((uint32_t) I2C_IRQSTATUS_XRDY_MASK)
201 
204 #define I2C_INT_GENERAL_CALL ((uint32_t) I2C_IRQSTATUS_GC_MASK)
205 
208 #define I2C_INT_START ((uint32_t) I2C_IRQSTATUS_STC_MASK)
209 
212 #define I2C_INT_ACCESS_ERROR ((uint32_t) I2C_IRQSTATUS_AERR_MASK)
213 
216 #define I2C_INT_STOP_CONDITION ((uint32_t) I2C_IRQSTATUS_BF_MASK)
217 
220 #define I2C_INT_ADRR_SLAVE ((uint32_t) I2C_IRQSTATUS_AAS_MASK)
221 
224 #define I2C_INT_TRANSMIT_UNDER_FLOW ((uint32_t) I2C_IRQSTATUS_XUDF_MASK)
225 
228 #define I2C_INT_RECV_OVER_RUN ((uint32_t) I2C_IRQSTATUS_ROVR_MASK)
229 
232 #define I2C_INT_RECV_DRAIN ((uint32_t) I2C_IRQSTATUS_RDR_MASK)
233 
236 #define I2C_INT_TRANSMIT_DRAIN ((uint32_t) I2C_IRQSTATUS_XDR_MASK)
237 
240 #define I2C_INT_BUS_BUSY ((uint32_t) I2C_IRQSTATUS_RAW_BB_MASK)
241 
244 #define I2C_INT_BUS_FREE ((uint32_t) I2C_IRQSTATUS_RAW_BF_MASK)
245 
248 #define I2C_INT_ALL ((uint32_t) 0x7FFFU)
249 /* @} */
250 
251 /*
252  * \name Values that can be passed to I2CFIFOThersholdConfig/I2CFIFOClear API as
253  * flag to select receive or transmit mode.
254  * @{
255  */
259 #define I2C_TX_MODE ((uint32_t) 1U)
260 
263 #define I2C_RX_MODE ((uint32_t) 0U)
264 /* @} */
265 
266 /*
267  * \name Values that can be passed to I2CBufferStatus API as flag to get status
268  * of the internal buffer.
269  * @{
270  */
274 #define I2C_TX_BUFFER_STATUS ((uint32_t) 0U)
275 
278 #define I2C_RX_BUFFER_STATUS ((uint32_t) 1U)
279 
282 #define I2C_FIFO_DEPTH ((uint32_t) 2U)
283 /* @} */
284 
285 /*
286  * \name Values that can be passed to I2CWakeUpEnable API as eventFlag to select
287  * the type of wakeup signal to be Enabled.
288  * @{
289  */
293 #define I2C_WAKE_UP_ARBITRATION_LOST (I2C_WE_AL_MASK)
294 
297 #define I2C_WAKE_UP_NO_ACK (I2C_WE_NACK_MASK)
298 
301 #define I2C_WAKE_UP_ADRR_RDY_ACCESS (I2C_WE_ARDY_MASK)
302 
305 #define I2C_WAKE_UP_GENERAL_CALL (I2C_WE_GC_MASK)
306 
309 #define I2C_WAKE_UP_START (I2C_WE_STC_MASK)
310 
313 #define I2C_WAKE_UP_STOP_CONDITION (I2C_WE_BF_MASK)
314 
317 #define I2C_WAKE_UP_ADRR_SLAVE (I2C_WE_AAS_MASK)
318 
321 #define I2C_WAKE_UP_TX_UNDER_FLOW (I2C_WE_XUDF_MASK)
322 
325 #define I2C_WAKE_UP_RECV_OVER_RUN (I2C_WE_ROVR_MASK)
326 
329 #define I2C_WAKE_UP_RECV_DRAIN (I2C_WE_RDR_MASK)
330 
333 #define I2C_WAKE_UP_TRANSMIT_DRAIN (I2C_WE_XDR_MASK)
334 
337 #define I2C_WAKE_UP_DATA_RECV_TX_RDY (I2C_WE_DRDY_MASK)
338 /* @} */
339 
340 /*
341  * \name Values that can be passed to I2CWakeUpEnable API as flag to select
342  * the request source to generate asynchronous signal.
343  * @{
344  */
348 #define I2C_WAKE_UP_IRQ ((uint32_t) 1U)
349 
352 #define I2C_WAKE_UP_DMA_RECV ((uint32_t) 2U)
353 
356 #define I2C_WAKE_UP_DMA_TRANSMIT ((uint32_t) 3U)
357 /* @} */
358 
359 /*
360  * \name Values that can be passed to I2CMasterIntStatus/I2CSlaveIntStatus
361  * /I2CMasterIntStatusEx/I2CSlaveIntStatusEx API as flag to select
362  * RAWIRQSTATUS or IRQSTATUS.
363  * @{
364  */
368 #define I2C_STATUS_RAW ((uint32_t) 0U)
369 
372 #define I2C_STATUS ((uint32_t) 1U)
373 
377 #define HAL_HSI2C_SUCCESS ((uint32_t) 0U)
378 
381 #define HAL_HSI2C_FAIL ((uint32_t) 1U)
382 /* @} */
383 
384 /*
385  * \name Values that can be passed to ownAddressSet API as flag to select
386  * any one of the I2C own address field .
387  * @{
388  */
392 #define I2C_OWN_ADDR_0 ((uint32_t) 0U)
393 
396 #define I2C_OWN_ADDR_1 ((uint32_t) 1U)
397 
400 #define I2C_OWN_ADDR_2 ((uint32_t) 2U)
401 
404 #define I2C_OWN_ADDR_3 ((uint32_t) 3U)
405 /* @} */
406 
407 /*
408  * \name MACROS used to enable or disable auto idle mechanism.
409  * @{
410  */
414 #define I2C_AUTOIDLE_DISABLE (I2C_SYSC_AUTOIDLE_DISABLE)
415 
418 #define I2C_AUTOIDLE_ENABLE ((uint32_t) I2C_SYSC_AUTOIDLE_ENABLE << \
419  I2C_SYSC_AUTOIDLE_SHIFT)
420 /* @} */
421 
422 /*
423  * \name MACRO used to select the type of clock activity.
424  * @{
425  */
429 #define I2C_CUT_OFF_BOTH_CLK (I2C_SYSC_CLKACTIVITY_BOOTHOFF)
430 
434 #define I2C_CUT_OFF_SYS_CLK ((uint32_t) I2C_SYSC_CLKACTIVITY_OCPON << \
435  I2C_SYSC_CLKACTIVITY_SHIFT)
436 
440 #define I2C_CUT_OFF_OCP_CLK ((uint32_t) I2C_SYSC_CLKACTIVITY_SYSON << \
441  I2C_SYSC_CLKACTIVITY_SHIFT)
442 
445 #define I2C_KEEP_ALIVE_BOTH_CLK ((uint32_t) I2C_SYSC_CLKACTIVITY_BOOTHON << \
446  I2C_SYSC_CLKACTIVITY_SHIFT)
447 /* @} */
448 
449 /*
450  * \name MACROS used to enable or disable wake up mechanism.
451  * @{
452  */
456 #define I2C_ENAWAKEUP_DISABLE (I2C_SYSC_ENAWAKEUP_DISABLE)
457 
460 #define I2C_ENAWAKEUP_ENABLE ((uint32_t) I2C_SYSC_ENAWAKEUP_ENABLE << \
461  I2C_SYSC_ENAWAKEUP_SHIFT)
462 /* @} */
463 
464 /*
465  * \name MACROS used to select the type of idle mode operation.
466  * @{
467  */
471 #define I2C_FORCE_IDLE_MODE (I2C_SYSC_IDLEMODE_FORCEIDLE)
472 
475 #define I2C_NO_IDLE_MODE ((uint32_t) I2C_SYSC_IDLEMODE_NOIDLE << \
476  I2C_SYSC_IDLEMODE_SHIFT)
477 
480 #define I2C_SMART_IDLE_MODE ((uint32_t) I2C_SYSC_IDLEMODE_SMARTIDLE << \
481  I2C_SYSC_IDLEMODE_SHIFT)
482 
486 #define I2C_SMART_IDLE_WAKEUP_MODE ((uint32_t) I2C_SYSC_IDLEMODE_SMARTIDLE_WAKEUP << \
487  I2C_SYSC_IDLEMODE_SHIFT)
488 /* @} */
489 
490 /*
491  * \name MACROS used to select F/S mode or HS mode of I2C.
492  * @{
493  */
497 #define I2C_OPMODE_FAST_STAND_MODE (I2C_CON_OPMODE_FSI2C)
498 
501 #define I2C_OPMODE_HIGH_SPEED_MODE ((uint32_t) I2C_CON_OPMODE_HSI2C << \
502  I2C_CON_OPMODE_SHIFT)
503 /* @} */
504 
505 /*
506  * \name MACROS used to select Start byte or normal mode of I2C.
507  * @{
508  */
512 #define I2C_NORMAL_MODE (I2C_CON_STB_NORMAL)
513 
516 #define I2C_STB_MODE ((uint32_t) I2C_CON_STB_STB << I2C_CON_STB_SHIFT)
517 /* @} */
518 
519 /*
520  * \name MACROS used to slave address 7 or 10 bit mode of I2C.
521  * @{
522  */
526 #define I2C_XSA_7BIT (I2C_CON_XSA_B07)
527 
530 #define I2C_XSA_10BIT ((uint32_t) I2C_CON_XSA_B10 << I2C_CON_XSA_SHIFT)
531 /* @} */
532 
533 /* ========================================================================== */
534 /* Global Variables Declarations */
535 /* ========================================================================== */
536 
537 
538 /* ========================================================================== */
539 /* Function Declarations */
540 /* ========================================================================== */
541 
556 void I2CMasterInitExpClk(uintptr_t baseAddr,
557  uint32_t sysClk,
558  uint32_t internalClk,
559  uint32_t outputClk);
560 
570 void I2CMasterEnable(uintptr_t baseAddr);
571 
580 void I2CMasterEnableFreeRun(uintptr_t baseAddr);
581 
592 void I2CMasterSetSysTest(uintptr_t baseAddr, uint32_t sysTest);
593 
602 uint32_t I2CMasterGetSysTest(uintptr_t baseAddr);
603 
615 void I2CMasterDisable(uintptr_t baseAddr);
616 
626 int32_t I2CMasterBusBusy(uintptr_t baseAddr);
627 
637 uint32_t I2CMasterBusy(uintptr_t baseAddr);
638 
649 uint32_t I2CMasterErr(uintptr_t baseAddr);
650 
692 void I2CMasterControl(uintptr_t baseAddr, uint32_t cmd);
693 
704 void I2CMasterStart(uintptr_t baseAddr);
705 
716 void I2CMasterStop(uintptr_t baseAddr);
717 
746 void I2CMasterIntEnableEx(uintptr_t baseAddr, uint32_t intFlag);
747 
776 void I2CSlaveIntEnableEx(uintptr_t baseAddr, uint32_t intFlag);
777 
806 void I2CMasterIntDisableEx(uintptr_t baseAddr, uint32_t intFlag);
807 
836 void I2CSlaveIntDisableEx(uintptr_t baseAddr, uint32_t intFlag);
837 
847 uint32_t I2CMasterIntStatus(uintptr_t baseAddr);
848 
858 uint32_t I2CSlaveIntStatus(uintptr_t baseAddr);
859 
889 uint32_t I2CMasterIntStatusEx(uintptr_t baseAddr, uint32_t intFlag);
890 
918 uint32_t I2CSlaveIntStatusEx(uintptr_t baseAddr, uint32_t intFlag);
919 
929 uint32_t I2CMasterIntRawStatus(uintptr_t baseAddr);
930 
940 uint32_t I2CSlaveIntRawStatus(uintptr_t baseAddr);
941 
971 uint32_t I2CMasterIntRawStatusEx(uintptr_t baseAddr, uint32_t intFlag);
972 
1001 uint32_t I2CSlaveIntRawStatusEx(uintptr_t baseAddr, uint32_t intFlag);
1002 
1030 void I2CMasterIntClearEx(uintptr_t baseAddr, uint32_t intFlag);
1031 
1059 void I2CSlaveIntClearEx(uintptr_t baseAddr, uint32_t intFlag);
1060 
1080 void I2CMasterIntRawStatusClearEx(uintptr_t baseAddr, uint32_t intFlag);
1081 
1101 void I2CSlaveIntRawStatusClearEx(uintptr_t baseAddr, uint32_t intFlag);
1102 
1113 void I2CMasterSlaveAddrSet(uintptr_t baseAddr, uint32_t slaveAdd);
1114 
1124 uint32_t I2CMasterSlaveAddrGet(uintptr_t baseAddr);
1125 
1138 void I2CSetDataCount(uintptr_t baseAddr, uint32_t count);
1139 
1151 uint32_t I2CDataCountGet(uintptr_t baseAddr);
1152 
1171 void I2CFIFOThresholdConfig(uintptr_t baseAddr,
1172  uint32_t thresholdVal,
1173  uint32_t flag);
1174 
1189 void I2CFIFOClear(uintptr_t baseAddr, uint32_t flag);
1190 
1200 void I2CDMATxEventEnable(uintptr_t baseAddr);
1201 
1211 void I2CDMARxEventEnable(uintptr_t baseAddr);
1212 
1221 void I2CDMATxEventDisable(uintptr_t baseAddr);
1222 
1231 void I2CDMARxEventDisable(uintptr_t baseAddr);
1232 
1251 uint32_t I2CBufferStatus(uintptr_t baseAddr, uint32_t flag);
1252 
1264 uint32_t I2CActiveOwnAddressGet(uintptr_t baseAddr);
1265 
1289 void I2CClockBlockingControl(uintptr_t baseAddr,
1290  uint32_t ownAdd0,
1291  uint32_t ownAdd1,
1292  uint32_t ownAdd2,
1293  uint32_t ownAdd3);
1294 
1314 void I2COwnAddressSet(uintptr_t baseAddr,
1315  uint32_t ownAdd,
1316  uint32_t flag);
1317 
1327 void I2CSoftReset(uintptr_t baseAddr);
1328 
1337 void I2CAutoIdleEnable(uintptr_t baseAddr);
1338 
1347 void I2CAutoIdleDisable(uintptr_t baseAddr);
1348 
1357 void I2CGlobalWakeUpEnable(uintptr_t baseAddr);
1358 
1367 void I2CGlobalWakeUpDisable(uintptr_t baseAddr);
1368 
1388 void I2CIdleModeSelect(uintptr_t baseAddr, uint32_t flag);
1389 
1410 void I2CClockActivitySelect(uintptr_t baseAddr, uint32_t flag);
1411 
1450 void I2CWakeUpEnable(uintptr_t baseAddr,
1451  uint32_t eventFlag,
1452  uint32_t flag);
1453 
1493 void I2CWakeUpDisable(uintptr_t baseAddr,
1494  uint32_t eventFlag,
1495  uint32_t flag);
1496 
1507 uint32_t I2CSystemStatusGet(uintptr_t baseAddr);
1508 
1518 void I2CMasterDataPut(uintptr_t baseAddr, uint8_t data);
1519 
1529 uint8_t I2CMasterDataGet(uintptr_t baseAddr);
1530 
1540 void I2CSlaveDataPut(uintptr_t baseAddr, uint32_t data);
1541 
1551 uint8_t I2CSlaveDataGet(uintptr_t baseAddr);
1552 
1560 void I2CSyscInit(uintptr_t baseAddr, uint32_t syscFlag);
1561 
1573 void I2CConfig(uintptr_t baseAddr, uint32_t conParams);
1574 
1583 void I2CFlushFifo(uintptr_t baseAddr);
1584 
1613 uint32_t I2CGetEnabledIntStatus(uintptr_t baseAddr, uint32_t intFlag);
1614 
1615 #ifdef __cplusplus
1616 }
1617 #endif
1618 
1619 #endif
1620 
1621 /********************************* End of file ******************************/
void I2CMasterStart(uintptr_t baseAddr)
This API starts a I2C transaction on the bus. This API must be called after all the configuration for...
void I2CSlaveIntRawStatusClearEx(uintptr_t baseAddr, uint32_t intFlag)
This API Clears the raw status of specified interrupts in Slave mode.
uint32_t I2CSlaveIntStatus(uintptr_t baseAddr)
This API returns the status of interrupts in slave mode.
void I2CSyscInit(uintptr_t baseAddr, uint32_t syscFlag)
This function configures SYSC register.
uint32_t I2CMasterSlaveAddrGet(uintptr_t baseAddr)
This API returns the address of the slave device with which I2C wants to communicate.
void I2CSlaveIntDisableEx(uintptr_t baseAddr, uint32_t intFlag)
This API disables only specified I2C interrupts in Slave mode.
void I2CGlobalWakeUpDisable(uintptr_t baseAddr)
This API disables wakeup mechanism.
uint32_t I2CMasterIntStatus(uintptr_t baseAddr)
This API returns the status of interrupts in master mode.
void I2CMasterDisable(uintptr_t baseAddr)
Disables the I2C Module.This will put the I2C module in reset. Only Tx and Rx are cleared,...
uint32_t count
Definition: tisci_rm_ra.h:166
void I2CMasterSetSysTest(uintptr_t baseAddr, uint32_t sysTest)
Set the I2C systest register.
void I2CIdleModeSelect(uintptr_t baseAddr, uint32_t flag)
This API selects one of the idle mode operation mechanism.
uint32_t I2CSlaveIntStatusEx(uintptr_t baseAddr, uint32_t intFlag)
This API returns the status of specified interrupts in slave mode.
void I2CMasterIntEnableEx(uintptr_t baseAddr, uint32_t intFlag)
This API enables only specified I2C interrupts in master mode.
void I2CMasterIntDisableEx(uintptr_t baseAddr, uint32_t intFlag)
This API disables only specified I2C interrupts in master mode.
uint32_t I2CMasterIntRawStatusEx(uintptr_t baseAddr, uint32_t intFlag)
This API returns the raw status of specified interrupts in master mode.
void I2CFlushFifo(uintptr_t baseAddr)
This clears the I2C TX and RX FIFO.
void I2CSlaveDataPut(uintptr_t baseAddr, uint32_t data)
This API transmits a byte from the I2C in Slave mode.
uint32_t I2CMasterIntStatusEx(uintptr_t baseAddr, uint32_t intFlag)
This API returns the status of specified interrupts in master mode.
uint32_t I2CMasterIntRawStatus(uintptr_t baseAddr)
This API returns the raw status of interrupts in master mode.
void I2CMasterInitExpClk(uintptr_t baseAddr, uint32_t sysClk, uint32_t internalClk, uint32_t outputClk)
This API will divide the system clock fed to I2C module between 12 and 100Mhz.It will also configure ...
uint8_t I2CMasterDataGet(uintptr_t baseAddr)
This API Receives a byte that has been sent to the I2C in Master mode.
uint8_t I2CSlaveDataGet(uintptr_t baseAddr)
This API Receives a byte that has been sent to the I2C in Slave mode.
uint32_t I2CMasterErr(uintptr_t baseAddr)
This API determines whether error occurred or not during I2C operation.
void I2CClockActivitySelect(uintptr_t baseAddr, uint32_t flag)
This API disable external clock gating mechanism by selecting appropriate type of clock activity.
void I2CSoftReset(uintptr_t baseAddr)
This API reset the entire I2C module.On reset,are set to power up reset values.
uint32_t data[13]
Definition: csl_udmap_tr.h:625
uint32_t I2CDataCountGet(uintptr_t baseAddr)
This API gets the number of bytes transferred over the I2C bus. The value in the I2C data count regis...
void I2CMasterIntRawStatusClearEx(uintptr_t baseAddr, uint32_t intFlag)
This API Clears the raw status of specified interrupts in master mode.
uint32_t I2CSlaveIntRawStatusEx(uintptr_t baseAddr, uint32_t intFlag)
This API returns the raw status of specified interrupts in slave mode.
void I2CMasterIntClearEx(uintptr_t baseAddr, uint32_t intFlag)
This API Clears the status of specified interrupts in master mode.
void I2CMasterControl(uintptr_t baseAddr, uint32_t cmd)
This API configure I2C in different modes of operation.
void I2CMasterEnable(uintptr_t baseAddr)
This API Enables the I2C module.This will bring the I2C module out of reset.
void I2CSlaveIntEnableEx(uintptr_t baseAddr, uint32_t intFlag)
This API enables only specified I2C interrupts in Slave mode.
void I2CSlaveIntClearEx(uintptr_t baseAddr, uint32_t intFlag)
This API Clears the status of specified interrupts in Slave mode.
void I2CDMATxEventDisable(uintptr_t baseAddr)
This API Disables Transmit event.
void I2CClockBlockingControl(uintptr_t baseAddr, uint32_t ownAdd0, uint32_t ownAdd1, uint32_t ownAdd2, uint32_t ownAdd3)
This API blocks or unblocks the clock for any of the module's four own addresses.
void I2CAutoIdleDisable(uintptr_t baseAddr)
This API disables auto idle mechanism.
void I2CWakeUpEnable(uintptr_t baseAddr, uint32_t eventFlag, uint32_t flag)
This API Enables a specific IRQ/DMA request source to generate an asynchronous wakeup signal....
void I2COwnAddressSet(uintptr_t baseAddr, uint32_t ownAdd, uint32_t flag)
This API configures any one of the own address field out of four present in I2C controller.
void I2CDMARxEventEnable(uintptr_t baseAddr)
This API Enables generation of Receive DMA Event, when I2C_DATA register is full.
gptp_ipc_command_t cmd
Definition: gptpipc.h:140
void I2CAutoIdleEnable(uintptr_t baseAddr)
This API enables auto idle mechanism.
uint32_t I2CGetEnabledIntStatus(uintptr_t baseAddr, uint32_t intFlag)
This API gets the status of enabled interrupt for the interrupt flag passed.
uint32_t I2CSystemStatusGet(uintptr_t baseAddr)
This API indicates the state of the reset in case of hardware reset,global reset or partial reset.
void I2CDMATxEventEnable(uintptr_t baseAddr)
This API Enables generation of Transmit Event,when I2C_DATA register is empty.
void I2CGlobalWakeUpEnable(uintptr_t baseAddr)
This API enables wakeup mechanism.
void I2CMasterSlaveAddrSet(uintptr_t baseAddr, uint32_t slaveAdd)
This API sets the address of the slave device with which I2C wants to communicate.
void I2CFIFOClear(uintptr_t baseAddr, uint32_t flag)
This API clears Transmit and Receive FIFO.
void I2CConfig(uintptr_t baseAddr, uint32_t conParams)
This API configures the I2C operation mode(F/S or HS), slave address 7bit or 10bit,...
uint32_t I2CSlaveIntRawStatus(uintptr_t baseAddr)
This API returns the raw status of interrupts in slave mode.
uint32_t I2CBufferStatus(uintptr_t baseAddr, uint32_t flag)
This API returns the status of the internal buffers.
uint32_t I2CActiveOwnAddressGet(uintptr_t baseAddr)
This API returns one of the module's four own addresses,which external master used when addressing th...
void I2CWakeUpDisable(uintptr_t baseAddr, uint32_t eventFlag, uint32_t flag)
This API Disables a specific IRQ/DMA request source to generate an asynchronous wakeup signal....
void I2CMasterStop(uintptr_t baseAddr)
This API stops a I2C transaction on the bus. This API must be used in case a deliberate STOP needs to...
void I2CFIFOThresholdConfig(uintptr_t baseAddr, uint32_t thresholdVal, uint32_t flag)
This API configures the threshold value for FIFO buffer.
void I2CMasterDataPut(uintptr_t baseAddr, uint8_t data)
This API transmits a byte from the I2C in Master mode.
uint32_t I2CMasterGetSysTest(uintptr_t baseAddr)
Get the I2C systest register.
void I2CSetDataCount(uintptr_t baseAddr, uint32_t count)
This API configure I2C data count register with a value. The value in the I2C data count register ind...
int32_t I2CMasterBusBusy(uintptr_t baseAddr)
This API determines whether bus is busy or not.
void I2CMasterEnableFreeRun(uintptr_t baseAddr)
Enables the I2C free run module.
uint32_t I2CMasterBusy(uintptr_t baseAddr)
This API determines whether Master is busy or not.
void I2CDMARxEventDisable(uintptr_t baseAddr)
This API Disables Receive event.