STM32L486xx HAL User Manual
Functions
IRQ Handler and Callbacks
I2C Exported Functions

Functions

void HAL_I2C_EV_IRQHandler (I2C_HandleTypeDef *hi2c)
 This function handles I2C event interrupt request.
void HAL_I2C_ER_IRQHandler (I2C_HandleTypeDef *hi2c)
 This function handles I2C error interrupt request.
__weak void HAL_I2C_MasterTxCpltCallback (I2C_HandleTypeDef *hi2c)
 Master Tx Transfer completed callback.
__weak void HAL_I2C_MasterRxCpltCallback (I2C_HandleTypeDef *hi2c)
 Master Rx Transfer completed callback.
__weak void HAL_I2C_SlaveTxCpltCallback (I2C_HandleTypeDef *hi2c)
 Slave Tx Transfer completed callback.
__weak void HAL_I2C_SlaveRxCpltCallback (I2C_HandleTypeDef *hi2c)
 Slave Rx Transfer completed callback.
__weak void HAL_I2C_AddrCallback (I2C_HandleTypeDef *hi2c, uint8_t TransferDirection, uint16_t AddrMatchCode)
 Slave Address Match callback.
__weak void HAL_I2C_ListenCpltCallback (I2C_HandleTypeDef *hi2c)
 Listen Complete callback.
__weak void HAL_I2C_MemTxCpltCallback (I2C_HandleTypeDef *hi2c)
 Memory Tx Transfer completed callback.
__weak void HAL_I2C_MemRxCpltCallback (I2C_HandleTypeDef *hi2c)
 Memory Rx Transfer completed callback.
__weak void HAL_I2C_ErrorCallback (I2C_HandleTypeDef *hi2c)
 I2C error callback.
__weak void HAL_I2C_AbortCpltCallback (I2C_HandleTypeDef *hi2c)
 I2C abort callback.

Function Documentation

I2C abort callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4347 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_DMAAbort(), and I2C_ITError().

void HAL_I2C_AddrCallback ( I2C_HandleTypeDef hi2c,
uint8_t  TransferDirection,
uint16_t  AddrMatchCode 
)

Slave Address Match callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
TransferDirectionMaster request Transfer Direction (Write/Read), value of I2C Transfer Direction Master Point of View
AddrMatchCodeAddress Match Code
Return values:
None

Definition at line 4265 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterAddrCallback(), and I2C_ITAddrCplt().

This function handles I2C error interrupt request.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4155 of file stm32l4xx_hal_i2c.c.

References __HAL_I2C_CLEAR_FLAG, __I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_ARLO, HAL_I2C_ERROR_BERR, HAL_I2C_ERROR_NONE, HAL_I2C_ERROR_OVR, I2C_FLAG_ARLO, I2C_FLAG_BERR, I2C_FLAG_OVR, I2C_IT_ERRI, I2C_ITError(), and __I2C_HandleTypeDef::Instance.

I2C error callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4331 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_DMAAbort(), and I2C_ITError().

This function handles I2C event interrupt request.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4136 of file stm32l4xx_hal_i2c.c.

References __I2C_HandleTypeDef::Instance, and __I2C_HandleTypeDef::XferISR.

Listen Complete callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4283 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_ITListenCplt(), and I2C_ITSlaveCplt().

Master Rx Transfer completed callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4216 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_ITMasterCplt(), and I2C_ITMasterSequentialCplt().

Master Tx Transfer completed callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4200 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_ITMasterCplt(), and I2C_ITMasterSequentialCplt().

Memory Rx Transfer completed callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4315 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), and I2C_ITMasterCplt().

Memory Tx Transfer completed callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4299 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), and I2C_ITMasterCplt().

Slave Rx Transfer completed callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4247 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_ITSlaveCplt(), and I2C_ITSlaveSequentialCplt().

Slave Tx Transfer completed callback.

Parameters:
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.
Return values:
None

Definition at line 4231 of file stm32l4xx_hal_i2c.c.

Referenced by HAL_I2C_Init(), HAL_I2C_UnRegisterCallback(), I2C_ITSlaveCplt(), and I2C_ITSlaveSequentialCplt().