iLLD_TC29x  1.0
IfxI2c.h File Reference

I2C basic functionality. More...

#include "_Impl/IfxI2c_cfg.h"
#include "Scu/Std/IfxScuWdt.h"
#include "Scu/Std/IfxScuCcu.h"
#include "IfxI2c_reg.h"
#include "IfxI2c_bf.h"
#include "_PinMap/IfxI2c_PinMap.h"
#include "Src/Std/IfxSrc.h"

Go to the source code of this file.

Data Structures

struct  IfxI2c_Pins
 Pin Structure. More...
 

Enumerations

enum  IfxI2c_BusStatus {
  IfxI2c_BusStatus_idle = 0,
  IfxI2c_BusStatus_started = 1,
  IfxI2c_BusStatus_busyMaster = 2,
  IfxI2c_BusStatus_remoteSlave = 3
}
 
enum  IfxI2c_ErrorInterruptSource {
  IfxI2c_ErrorInterruptSource_rxFifoUnderflow = IFX_I2C_ERRIRQSM_RXF_UFL_OFF,
  IfxI2c_ErrorInterruptSource_rxFifoOverflow = IFX_I2C_ERRIRQSM_RXF_OFL_OFF,
  IfxI2c_ErrorInterruptSource_txFifoUnderflow = IFX_I2C_ERRIRQSM_TXF_UFL_OFF,
  IfxI2c_ErrorInterruptSource_txFifoOverflow = IFX_I2C_ERRIRQSM_TXF_OFL_OFF
}
 enable error interrupt request source Definition in Ifx.I2C.ERRIRQSM.U More...
 
enum  IfxI2c_PinSelect {
  IfxI2c_PinSelect_a = 0,
  IfxI2c_PinSelect_b = 1,
  IfxI2c_PinSelect_c = 2,
  IfxI2c_PinSelect_d = 3,
  IfxI2c_PinSelect_e = 4,
  IfxI2c_PinSelect_f = 5,
  IfxI2c_PinSelect_g = 6,
  IfxI2c_PinSelect_h = 7
}
 
enum  IfxI2c_ProtocolInterruptSource {
  IfxI2c_ProtocolInterruptSource_addressMatch = IFX_I2C_PIRQSM_AM_OFF,
  IfxI2c_ProtocolInterruptSource_generalCall = IFX_I2C_PIRQSM_GC_OFF,
  IfxI2c_ProtocolInterruptSource_masterCode = IFX_I2C_PIRQSM_MC_OFF,
  IfxI2c_ProtocolInterruptSource_arbitrationLost = IFX_I2C_PIRQSM_AL_OFF,
  IfxI2c_ProtocolInterruptSource_notAcknowledgeReceived = IFX_I2C_PIRQSM_NACK_OFF,
  IfxI2c_ProtocolInterruptSource_transmissionEnd = IFX_I2C_PIRQSM_TX_END_OFF,
  IfxI2c_ProtocolInterruptSource_receiveMode = IFX_I2C_PIRQSM_RX_OFF
}
 enable protocol interrupt source Definition in Ifx.I2C.PIRQSM.U More...
 
enum  IfxI2c_SleepMode {
  IfxI2c_SleepMode_enable = 0,
  IfxI2c_SleepMode_disable = 1
}
 Enable/disable the sensitivity of the module to sleep signal
Definition in Ifx_I2C.CLC1.B.EDIS. More...
 

Functions

IFX_INLINE boolean IfxI2c_busIsFree (Ifx_I2C *i2c)
 Returns if the bus is free. More...
 
IFX_INLINE void IfxI2c_clearAllErrorInterruptSources (Ifx_I2C *i2c)
 clears all Error Interrupt sources More...
 
IFX_INLINE void IfxI2c_clearAllProtocolInterruptSources (Ifx_I2C *i2c)
 Clears all Protocol Interrupt sources. More...
 
IFX_INLINE void IfxI2c_clearBurstRequestInterruptSource (Ifx_I2C *i2c)
 clears burst request interrupt source More...
 
IFX_INLINE void IfxI2c_clearErrorInterruptSource (Ifx_I2C *i2c, IfxI2c_ErrorInterruptSource source)
 clears the specified source of error interrupt More...
 
IFX_INLINE void IfxI2c_clearLastBurstRequestInterruptSource (Ifx_I2C *i2c)
 clears last burst request interrupt source More...
 
IFX_INLINE void IfxI2c_clearLastSingleRequestInterruptSource (Ifx_I2C *i2c)
 clears last single request interrupt source More...
 
IFX_INLINE void IfxI2c_clearProtocolInterruptSource (Ifx_I2C *i2c, IfxI2c_ProtocolInterruptSource source)
 clears the specified source of protocol interrupt More...
 
IFX_INLINE void IfxI2c_clearSingleRequestInterruptSource (Ifx_I2C *i2c)
 clears single request interrupt source More...
 
IFX_INLINE void IfxI2c_disableBurstRequestInterruptSource (Ifx_I2C *i2c)
 disables burst request interrupt source More...
 
IFX_INLINE void IfxI2c_disableErrorInterruptFlag (Ifx_I2C *i2c)
 disables the error interrupt flag More...
 
IFX_INLINE void IfxI2c_disableErrorInterruptSource (Ifx_I2C *i2c, IfxI2c_ErrorInterruptSource source)
 disables the specified source of error interrupt More...
 
IFX_INLINE void IfxI2c_disableLastBurstRequestInterruptSource (Ifx_I2C *i2c)
 disables last burst request interrupt source More...
 
IFX_INLINE void IfxI2c_disableLastSingleRequestInterruptSource (Ifx_I2C *i2c)
 disables last single request interrupt source More...
 
IFX_INLINE void IfxI2c_disableProtocolInterruptFlag (Ifx_I2C *i2c)
 disables the Protocol interrupt flag More...
 
IFX_INLINE void IfxI2c_disableProtocolInterruptSource (Ifx_I2C *i2c, IfxI2c_ProtocolInterruptSource source)
 disables the specified source of protocol interrupt More...
 
IFX_INLINE void IfxI2c_disableSingleRequestInterruptSource (Ifx_I2C *i2c)
 disables single request interrupt source More...
 
IFX_INLINE void IfxI2c_enableBurstRequestInterruptSource (Ifx_I2C *i2c)
 enables burst request interrupt source More...
 
IFX_INLINE void IfxI2c_enableErrorInterruptFlag (Ifx_I2C *i2c)
 enables the error interrupt flag More...
 
IFX_INLINE void IfxI2c_enableErrorInterruptSource (Ifx_I2C *i2c, IfxI2c_ErrorInterruptSource source)
 enables the specified source of error interrupt More...
 
IFX_INLINE void IfxI2c_enableLastBurstRequestInterruptSource (Ifx_I2C *i2c)
 enables last burst request interrupt source More...
 
IFX_INLINE void IfxI2c_enableLastSingleRequestInterruptSource (Ifx_I2C *i2c)
 enables last single request interrupt source More...
 
IFX_INLINE void IfxI2c_enableProtocolInterruptFlag (Ifx_I2C *i2c)
 enables the protocol interrupt flag More...
 
IFX_INLINE void IfxI2c_enableProtocolInterruptSource (Ifx_I2C *i2c, IfxI2c_ProtocolInterruptSource source)
 enables the specified source of protocol interrupt More...
 
IFX_INLINE void IfxI2c_enableSingleRequestInterruptSource (Ifx_I2C *i2c)
 enables single request interrupt source More...
 
IFX_INLINE volatile Ifx_SRC_SRCR * IfxI2c_getBurstDataTransferSrcPointer (Ifx_I2C *i2c)
 Returns the SRC pointer for I2C burst data transfer request interrupt. More...
 
IFX_INLINE boolean IfxI2c_getBurstRequestInterruptSourceStatus (Ifx_I2C *i2c)
 returns the status of burst request interrupt source status More...
 
IFX_INLINE IfxI2c_BusStatus IfxI2c_getBusStatus (Ifx_I2C *i2c)
 
IFX_INLINE boolean IfxI2c_getErrorInterruptFlagStatus (Ifx_I2C *i2c)
 returns the current status of error interrupt flag More...
 
IFX_INLINE boolean IfxI2c_getErrorInterruptSourceStatus (Ifx_I2C *i2c, IfxI2c_ErrorInterruptSource source)
 returns the status of the error interrupt source More...
 
IFX_INLINE volatile Ifx_SRC_SRCR * IfxI2c_getErrorSrcPointer (Ifx_I2C *i2c)
 Returns the SRC pointer for I2C Error interrupt. More...
 
IFX_INLINE volatile Ifx_SRC_SRCR * IfxI2c_getLastBurstDataTransferSrcPointer (Ifx_I2C *i2c)
 Returns the SRC pointer for I2C last burst data transfer request interrupt. More...
 
IFX_INLINE boolean IfxI2c_getLastBurstRequestInterruptSourceStatus (Ifx_I2C *i2c)
 returns the status of last burst request interrupt source status More...
 
IFX_INLINE volatile Ifx_SRC_SRCR * IfxI2c_getLastSingleDataTransferSrcPointer (Ifx_I2C *i2c)
 Returns the SRC pointer for I2C last single data transfer request interrupt. More...
 
IFX_INLINE boolean IfxI2c_getLastSingleRequestInterruptSourceStatus (Ifx_I2C *i2c)
 returns the status of last single request interrupt source status More...
 
IFX_INLINE boolean IfxI2c_getProtocolInterruptFlagStatus (Ifx_I2C *i2c)
 returns the current raw status of protocol interrupt More...
 
IFX_INLINE boolean IfxI2c_getProtocolInterruptSourceStatus (Ifx_I2C *i2c, IfxI2c_ProtocolInterruptSource source)
 returns the status of specified protocol interrupt source More...
 
IFX_INLINE volatile Ifx_SRC_SRCR * IfxI2c_getProtocolSrcPointer (Ifx_I2C *i2c)
 Returns the SRC pointer for I2C Protocol interrupt. More...
 
IFX_INLINE volatile Ifx_SRC_SRCR * IfxI2c_getSingleDataTransferSrcPointer (Ifx_I2C *i2c)
 Returns the SRC pointer for I2C single data transfer request interrupt. More...
 
IFX_INLINE boolean IfxI2c_getSingleRequestInterruptSourceStatus (Ifx_I2C *i2c)
 returns the status of single request interrupt source status More...
 
IFX_INLINE boolean IfxI2c_isFifoRequest (Ifx_I2C *i2c)
 Returns if the Fifo is requesting new data. More...
 
IFX_INLINE void IfxI2c_run (Ifx_I2C *i2c)
 
IFX_INLINE void IfxI2c_setPinSelection (Ifx_I2C *i2c, IfxI2c_PinSelect pisel)
 selects the pin More...
 
IFX_INLINE void IfxI2c_setReceivePacketSize (Ifx_I2C *i2c, Ifx_SizeT size)
 Sets the number of bytes to be received. More...
 
IFX_INLINE void IfxI2c_setSlaveDeviceAddress (Ifx_I2C *i2c, uint16 address)
 
IFX_INLINE void IfxI2c_setSleepMode (Ifx_I2C *i2c, IfxI2c_SleepMode mode)
 Sets the sensitivity of the module to sleep signal. More...
 
IFX_INLINE void IfxI2c_setTransmitPacketSize (Ifx_I2C *i2c, Ifx_SizeT size)
 Sets the number of bytes to be tansmitted. More...
 
IFX_INLINE void IfxI2c_stop (Ifx_I2C *i2c)
 
IFX_INLINE void IfxI2c_waitBusFree (Ifx_I2C *i2c)
 
IFX_INLINE void IfxI2c_writeFifo (Ifx_I2C *i2c, uint32 packet)
 Writes a packet (4 bytes) into the Fifo. More...
 
IFX_EXTERN void IfxI2c_configureAsMaster (Ifx_I2C *i2c)
 Configures the Module as Master. More...
 
IFX_EXTERN void IfxI2c_disableModule (Ifx_I2C *i2c)
 Disables the I2c Module. More...
 
IFX_EXTERN void IfxI2c_enableBurstDataTransferInterrupt (Ifx_I2C *i2c, IfxSrc_Tos typeOfService, uint16 priority)
 Enables the Burst data transfer interrupt. More...
 
IFX_EXTERN void IfxI2c_enableErrorInterrupt (Ifx_I2C *i2c, IfxSrc_Tos typeOfService, uint16 priority)
 Enables the Error interrupt. More...
 
IFX_EXTERN void IfxI2c_enableLastBurstDataTransferInterrupt (Ifx_I2C *i2c, IfxSrc_Tos typeOfService, uint16 priority)
 enables the last burst data transfer interrupt More...
 
IFX_EXTERN void IfxI2c_enableLastSingleDataTransferInterrupt (Ifx_I2C *i2c, IfxSrc_Tos typeOfService, uint16 priority)
 enables the last single data transfer interrupt More...
 
IFX_EXTERN void IfxI2c_enableModule (Ifx_I2C *i2c)
 Enables the I2c Module. More...
 
IFX_EXTERN void IfxI2c_enableProtocolInterrupt (void *i2c, IfxSrc_Tos typeOfService, uint16 priority)
 Enables the protocol interrupt. More...
 
IFX_EXTERN void IfxI2c_enableSingleDataTransferInterrupt (Ifx_I2C *i2c, IfxSrc_Tos typeOfService, uint16 priority)
 enables the single data transfer interrupt More...
 
IFX_EXTERN float32 IfxI2c_getBaudrate (Ifx_I2C *i2c)
 Returns the real Baudrate. More...
 
IFX_EXTERN void IfxI2c_initSclSdaPin (const IfxI2c_Scl_InOut *scl, const IfxI2c_Sda_InOut *sda, IfxPort_PadDriver padDriver)
 
IFX_EXTERN void IfxI2c_releaseBus (Ifx_I2C *i2c)
 Releases the bus, i.e puts a stop condition on the bus. More...
 
IFX_EXTERN void IfxI2c_resetFifo (Ifx_I2C *i2c)
 
IFX_EXTERN void IfxI2c_resetModule (Ifx_I2C *i2c)
 resets the I2c kernel More...
 
IFX_EXTERN void IfxI2c_setBaudrate (Ifx_I2C *i2c, float32 baudrate)
 Calculates the desired baudrate. More...
 

Detailed Description

I2C basic functionality.

Version
iLLD_1_0_0_11_0
                            IMPORTANT NOTICE

Infineon Technologies AG (Infineon) is supplying this file for use exclusively with Infineon's microcontroller products. This file can be freely distributed within development tools that are supporting such microcontroller products.

THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

Definition in file IfxI2c.h.