STM32L4xx_HAL_Driver  1.14.0
I2C handle Structure definition

I2C handle Structure definition. More...

Data Structures

struct  __I2C_HandleTypeDef
 

Typedefs

typedef struct __I2C_HandleTypeDef I2C_HandleTypeDef
 
typedef void(* pI2C_CallbackTypeDef) (I2C_HandleTypeDef *hi2c)
 HAL I2C Callback pointer definition. More...
 
typedef void(* pI2C_AddrCallbackTypeDef) (I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode)
 

Enumerations

enum  HAL_I2C_CallbackIDTypeDef {
  HAL_I2C_MASTER_TX_COMPLETE_CB_ID = 0x00U, HAL_I2C_MASTER_RX_COMPLETE_CB_ID = 0x01U, HAL_I2C_SLAVE_TX_COMPLETE_CB_ID = 0x02U, HAL_I2C_SLAVE_RX_COMPLETE_CB_ID = 0x03U,
  HAL_I2C_LISTEN_COMPLETE_CB_ID = 0x04U, HAL_I2C_MEM_TX_COMPLETE_CB_ID = 0x05U, HAL_I2C_MEM_RX_COMPLETE_CB_ID = 0x06U, HAL_I2C_ERROR_CB_ID = 0x07U,
  HAL_I2C_ABORT_CB_ID = 0x08U, HAL_I2C_MSPINIT_CB_ID = 0x09U, HAL_I2C_MSPDEINIT_CB_ID = 0x0AU
}
 HAL I2C Callback ID enumeration definition. More...
 

Detailed Description

I2C handle Structure definition.


Data Structure Documentation

◆ __I2C_HandleTypeDef

struct __I2C_HandleTypeDef

Definition at line 186 of file stm32l4xx_hal_i2c.h.

Data Fields

I2C_TypeDef * Instance
 
I2C_InitTypeDef Init
 
uint8_t * pBuffPtr
 
uint16_t XferSize
 
__IO uint16_t XferCount
 
__IO uint32_t XferOptions
 
__IO uint32_t PreviousState
 
HAL_StatusTypeDef(* XferISR )(struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, uint32_t ITSources)
 
DMA_HandleTypeDefhdmatx
 
DMA_HandleTypeDefhdmarx
 
HAL_LockTypeDef Lock
 
__IO HAL_I2C_StateTypeDef State
 
__IO HAL_I2C_ModeTypeDef Mode
 
__IO uint32_t ErrorCode
 
__IO uint32_t AddrEventCount
 
void(* MasterTxCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* MasterRxCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* SlaveTxCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* SlaveRxCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* ListenCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* MemTxCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* MemRxCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* ErrorCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* AbortCpltCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* AddrCallback )(struct __I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode)
 
void(* MspInitCallback )(struct __I2C_HandleTypeDef *hi2c)
 
void(* MspDeInitCallback )(struct __I2C_HandleTypeDef *hi2c)
 

Field Documentation

◆ AbortCpltCallback

void(* __I2C_HandleTypeDef::AbortCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Abort callback

Definition at line 228 of file stm32l4xx_hal_i2c.h.

◆ AddrCallback

void(* __I2C_HandleTypeDef::AddrCallback) (struct __I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode)

I2C Slave Address Match callback

Definition at line 230 of file stm32l4xx_hal_i2c.h.

◆ AddrEventCount

__IO uint32_t __I2C_HandleTypeDef::AddrEventCount

I2C Address Event counter

Definition at line 217 of file stm32l4xx_hal_i2c.h.

◆ ErrorCallback

void(* __I2C_HandleTypeDef::ErrorCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Error callback

Definition at line 227 of file stm32l4xx_hal_i2c.h.

◆ ErrorCode

__IO uint32_t __I2C_HandleTypeDef::ErrorCode

I2C Error code

Definition at line 215 of file stm32l4xx_hal_i2c.h.

◆ hdmarx

DMA_HandleTypeDef* __I2C_HandleTypeDef::hdmarx

I2C Rx DMA handle parameters

Definition at line 207 of file stm32l4xx_hal_i2c.h.

◆ hdmatx

DMA_HandleTypeDef* __I2C_HandleTypeDef::hdmatx

I2C Tx DMA handle parameters

Definition at line 205 of file stm32l4xx_hal_i2c.h.

◆ Init

I2C_InitTypeDef __I2C_HandleTypeDef::Init

I2C communication parameters

Definition at line 190 of file stm32l4xx_hal_i2c.h.

◆ Instance

I2C_TypeDef* __I2C_HandleTypeDef::Instance

I2C registers base address

Definition at line 188 of file stm32l4xx_hal_i2c.h.

◆ ListenCpltCallback

void(* __I2C_HandleTypeDef::ListenCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Listen Complete callback

Definition at line 224 of file stm32l4xx_hal_i2c.h.

◆ Lock

HAL_LockTypeDef __I2C_HandleTypeDef::Lock

I2C locking object

Definition at line 209 of file stm32l4xx_hal_i2c.h.

◆ MasterRxCpltCallback

void(* __I2C_HandleTypeDef::MasterRxCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Master Rx Transfer completed callback

Definition at line 221 of file stm32l4xx_hal_i2c.h.

◆ MasterTxCpltCallback

void(* __I2C_HandleTypeDef::MasterTxCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Master Tx Transfer completed callback

Definition at line 220 of file stm32l4xx_hal_i2c.h.

◆ MemRxCpltCallback

void(* __I2C_HandleTypeDef::MemRxCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Memory Rx Transfer completed callback

Definition at line 226 of file stm32l4xx_hal_i2c.h.

◆ MemTxCpltCallback

void(* __I2C_HandleTypeDef::MemTxCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Memory Tx Transfer completed callback

Definition at line 225 of file stm32l4xx_hal_i2c.h.

◆ Mode

__IO HAL_I2C_ModeTypeDef __I2C_HandleTypeDef::Mode

I2C communication mode

Definition at line 213 of file stm32l4xx_hal_i2c.h.

◆ MspDeInitCallback

void(* __I2C_HandleTypeDef::MspDeInitCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Msp DeInit callback

Definition at line 233 of file stm32l4xx_hal_i2c.h.

◆ MspInitCallback

void(* __I2C_HandleTypeDef::MspInitCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Msp Init callback

Definition at line 232 of file stm32l4xx_hal_i2c.h.

◆ pBuffPtr

uint8_t* __I2C_HandleTypeDef::pBuffPtr

Pointer to I2C transfer buffer

Definition at line 192 of file stm32l4xx_hal_i2c.h.

◆ PreviousState

__IO uint32_t __I2C_HandleTypeDef::PreviousState

I2C communication Previous state

Definition at line 201 of file stm32l4xx_hal_i2c.h.

◆ SlaveRxCpltCallback

void(* __I2C_HandleTypeDef::SlaveRxCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Slave Rx Transfer completed callback

Definition at line 223 of file stm32l4xx_hal_i2c.h.

◆ SlaveTxCpltCallback

void(* __I2C_HandleTypeDef::SlaveTxCpltCallback) (struct __I2C_HandleTypeDef *hi2c)

I2C Slave Tx Transfer completed callback

Definition at line 222 of file stm32l4xx_hal_i2c.h.

◆ State

__IO HAL_I2C_StateTypeDef __I2C_HandleTypeDef::State

I2C communication state

Definition at line 211 of file stm32l4xx_hal_i2c.h.

◆ XferCount

__IO uint16_t __I2C_HandleTypeDef::XferCount

I2C transfer counter

Definition at line 196 of file stm32l4xx_hal_i2c.h.

◆ XferISR

HAL_StatusTypeDef(* __I2C_HandleTypeDef::XferISR) (struct __I2C_HandleTypeDef *hi2c, uint32_t ITFlags, uint32_t ITSources)

I2C transfer IRQ handler function pointer

Definition at line 203 of file stm32l4xx_hal_i2c.h.

◆ XferOptions

__IO uint32_t __I2C_HandleTypeDef::XferOptions

I2C sequantial transfer options, this parameter can be a value of I2C Sequential Transfer Options

Definition at line 198 of file stm32l4xx_hal_i2c.h.

◆ XferSize

uint16_t __I2C_HandleTypeDef::XferSize

I2C transfer size

Definition at line 194 of file stm32l4xx_hal_i2c.h.

Typedef Documentation

◆ I2C_HandleTypeDef

◆ pI2C_AddrCallbackTypeDef

typedef void(* pI2C_AddrCallbackTypeDef) (I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode)

pointer to an I2C Address Match callback function

Definition at line 263 of file stm32l4xx_hal_i2c.h.

◆ pI2C_CallbackTypeDef

typedef void(* pI2C_CallbackTypeDef) (I2C_HandleTypeDef *hi2c)

HAL I2C Callback pointer definition.

pointer to an I2C callback function

Definition at line 262 of file stm32l4xx_hal_i2c.h.

Enumeration Type Documentation

◆ HAL_I2C_CallbackIDTypeDef

HAL I2C Callback ID enumeration definition.

Enumerator
HAL_I2C_MASTER_TX_COMPLETE_CB_ID 

I2C Master Tx Transfer completed callback ID

HAL_I2C_MASTER_RX_COMPLETE_CB_ID 

I2C Master Rx Transfer completed callback ID

HAL_I2C_SLAVE_TX_COMPLETE_CB_ID 

I2C Slave Tx Transfer completed callback ID

HAL_I2C_SLAVE_RX_COMPLETE_CB_ID 

I2C Slave Rx Transfer completed callback ID

HAL_I2C_LISTEN_COMPLETE_CB_ID 

I2C Listen Complete callback ID

HAL_I2C_MEM_TX_COMPLETE_CB_ID 

I2C Memory Tx Transfer callback ID

HAL_I2C_MEM_RX_COMPLETE_CB_ID 

I2C Memory Rx Transfer completed callback ID

HAL_I2C_ERROR_CB_ID 

I2C Error callback ID

HAL_I2C_ABORT_CB_ID 

I2C Abort callback ID

HAL_I2C_MSPINIT_CB_ID 

I2C Msp Init callback ID

HAL_I2C_MSPDEINIT_CB_ID 

I2C Msp DeInit callback ID

Definition at line 242 of file stm32l4xx_hal_i2c.h.