|
STM32L4xx_HAL_Driver
1.14.0
|
Initialization and Configuration functions. More...
Functions | |
| HAL_StatusTypeDef | HAL_I2C_Init (I2C_HandleTypeDef *hi2c) |
| Initializes the I2C according to the specified parameters in the I2C_InitTypeDef and initialize the associated handle. More... | |
| HAL_StatusTypeDef | HAL_I2C_DeInit (I2C_HandleTypeDef *hi2c) |
| DeInitialize the I2C peripheral. More... | |
| void | HAL_I2C_MspInit (I2C_HandleTypeDef *hi2c) |
| Initialize the I2C MSP. More... | |
| void | HAL_I2C_MspDeInit (I2C_HandleTypeDef *hi2c) |
| DeInitialize the I2C MSP. More... | |
| HAL_StatusTypeDef | HAL_I2C_RegisterCallback (I2C_HandleTypeDef *hi2c, HAL_I2C_CallbackIDTypeDef CallbackID, pI2C_CallbackTypeDef pCallback) |
| Register a User I2C Callback To be used instead of the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_I2C_UnRegisterCallback (I2C_HandleTypeDef *hi2c, HAL_I2C_CallbackIDTypeDef CallbackID) |
| Unregister an I2C Callback I2C callback is redirected to the weak predefined callback. More... | |
| HAL_StatusTypeDef | HAL_I2C_RegisterAddrCallback (I2C_HandleTypeDef *hi2c, pI2C_AddrCallbackTypeDef pCallback) |
| Register the Slave Address Match I2C Callback To be used instead of the weak HAL_I2C_AddrCallback() predefined callback. More... | |
| HAL_StatusTypeDef | HAL_I2C_UnRegisterAddrCallback (I2C_HandleTypeDef *hi2c) |
| UnRegister the Slave Address Match I2C Callback Info Ready I2C Callback is redirected to the weak HAL_I2C_AddrCallback() predefined callback. More... | |
Initialization and Configuration functions.
===============================================================================
##### Initialization and de-initialization functions #####
===============================================================================
[..] This subsection provides a set of functions allowing to initialize and
deinitialize the I2Cx peripheral:
(+) User must Implement HAL_I2C_MspInit() function in which he configures
all related peripherals resources (CLOCK, GPIO, DMA, IT and NVIC ).
(+) Call the function HAL_I2C_Init() to configure the selected device with
the selected configuration:
(++) Clock Timing
(++) Own Address 1
(++) Addressing mode (Master, Slave)
(++) Dual Addressing mode
(++) Own Address 2
(++) Own Address 2 Mask
(++) General call mode
(++) Nostretch mode
(+) Call the function HAL_I2C_DeInit() to restore the default configuration
of the selected I2Cx peripheral. | HAL_StatusTypeDef HAL_I2C_DeInit | ( | I2C_HandleTypeDef * | hi2c | ) |
DeInitialize the I2C peripheral.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| HAL | status |
Definition at line 578 of file stm32l4xx_hal_i2c.c.
| HAL_StatusTypeDef HAL_I2C_Init | ( | I2C_HandleTypeDef * | hi2c | ) |
Initializes the I2C according to the specified parameters in the I2C_InitTypeDef and initialize the associated handle.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| HAL | status |
Definition at line 469 of file stm32l4xx_hal_i2c.c.
| __weak void HAL_I2C_MspDeInit | ( | I2C_HandleTypeDef * | hi2c | ) |
DeInitialize the I2C MSP.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| None |
Definition at line 640 of file stm32l4xx_hal_i2c.c.
| __weak void HAL_I2C_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) |
Initialize the I2C MSP.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| None |
Definition at line 624 of file stm32l4xx_hal_i2c.c.
| HAL_StatusTypeDef HAL_I2C_RegisterAddrCallback | ( | I2C_HandleTypeDef * | hi2c, |
| pI2C_AddrCallbackTypeDef | pCallback | ||
| ) |
Register the Slave Address Match I2C Callback To be used instead of the weak HAL_I2C_AddrCallback() predefined callback.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| pCallback | pointer to the Address Match Callback function |
| HAL | status |
Definition at line 906 of file stm32l4xx_hal_i2c.c.
| HAL_StatusTypeDef HAL_I2C_RegisterCallback | ( | I2C_HandleTypeDef * | hi2c, |
| HAL_I2C_CallbackIDTypeDef | CallbackID, | ||
| pI2C_CallbackTypeDef | pCallback | ||
| ) |
Register a User I2C Callback To be used instead of the weak predefined callback.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| CallbackID | ID of the callback to be registered This parameter can be one of the following values:
|
| pCallback | pointer to the Callback function |
| HAL | status |
Definition at line 672 of file stm32l4xx_hal_i2c.c.
| HAL_StatusTypeDef HAL_I2C_UnRegisterAddrCallback | ( | I2C_HandleTypeDef * | hi2c | ) |
UnRegister the Slave Address Match I2C Callback Info Ready I2C Callback is redirected to the weak HAL_I2C_AddrCallback() predefined callback.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| HAL | status |
Definition at line 945 of file stm32l4xx_hal_i2c.c.
| HAL_StatusTypeDef HAL_I2C_UnRegisterCallback | ( | I2C_HandleTypeDef * | hi2c, |
| HAL_I2C_CallbackIDTypeDef | CallbackID | ||
| ) |
Unregister an I2C Callback I2C callback is redirected to the weak predefined callback.
| hi2c | Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C. |
| CallbackID | ID of the callback to be unregistered This parameter can be one of the following values: This parameter can be one of the following values:
|
| HAL | status |
Definition at line 799 of file stm32l4xx_hal_i2c.c.