STM32L4xx_HAL_Driver  1.14.0
Peripheral State, Mode and Error functions

Peripheral State, Mode and Error functions. More...

Functions

HAL_I2C_StateTypeDef HAL_I2C_GetState (I2C_HandleTypeDef *hi2c)
 Return the I2C handle state. More...
 
HAL_I2C_ModeTypeDef HAL_I2C_GetMode (I2C_HandleTypeDef *hi2c)
 Returns the I2C Master, Slave, Memory or no mode. More...
 
uint32_t HAL_I2C_GetError (I2C_HandleTypeDef *hi2c)
 Return the I2C error code. More...
 

Detailed Description

Peripheral State, Mode and Error functions.

 ===============================================================================
            ##### Peripheral State, Mode and Error functions #####
 ===============================================================================
    [..]
    This subsection permit to get in run-time the status of the peripheral
    and the data flow.

Function Documentation

◆ HAL_I2C_GetError()

uint32_t HAL_I2C_GetError ( I2C_HandleTypeDef hi2c)

Return the I2C error code.

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

Definition at line 4570 of file stm32l4xx_hal_i2c.c.

4571 {
4572  return hi2c->ErrorCode;
4573 }

◆ HAL_I2C_GetMode()

HAL_I2C_ModeTypeDef HAL_I2C_GetMode ( I2C_HandleTypeDef hi2c)

Returns the I2C Master, Slave, Memory or no mode.

Parameters
hi2cPointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module
Return values
HALmode

Definition at line 4559 of file stm32l4xx_hal_i2c.c.

4560 {
4561  return hi2c->Mode;
4562 }
__IO HAL_I2C_ModeTypeDef Mode

◆ HAL_I2C_GetState()

HAL_I2C_StateTypeDef HAL_I2C_GetState ( I2C_HandleTypeDef hi2c)

Return the I2C handle state.

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

Definition at line 4547 of file stm32l4xx_hal_i2c.c.

4548 {
4549  /* Return I2C handle state */
4550  return hi2c->State;
4551 }
__IO HAL_I2C_StateTypeDef State