Initialization and de-initialization functions.
More...
Initialization and de-initialization functions.
===============================================================================
##### Initialization and de-initialization functions #####
===============================================================================
[..] This subsection provides a set of functions allowing to initialize and
de-initialize the I2Cx peripheral:
(+) User must Implement hal_i2c_msp_init() 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:
(++) Speed
(++) Own Address
(++) Addressing mode (Master, Slave)
(++) General call mode
(+) Call the function hal_i2c_deinit() to restore the default configuration
of the selected I2Cx peripheral.
◆ hal_i2c_deinit()
De-initialize the I2C peripheral.
- Parameters
-
[in] | p_i2c | Pointer to an I2C handle which contains the configuration information for the specified I2C. |
- Return values
-
◆ hal_i2c_init()
Initializes the I2C according to the specified parameters in the i2c_init_t and initialize the associated handle.
- Parameters
-
[in] | p_i2c | Pointer to an I2C handle which contains the configuration information for the specified I2C. |
- Return values
-
◆ hal_i2c_msp_deinit()
De-initialize the I2C MSP.
- Note
- This function should not be modified. When the callback is needed, the hal_i2c_msp_deinit could be implemented in the user file.
- Parameters
-
[in] | p_i2c | Pointer to an I2C handle which contains the configuration information for the specified I2C. |
◆ hal_i2c_msp_init()
Initialize the I2C MSP.
- Note
- This function should not be modified. When the callback is needed, the hal_i2c_msp_init could be implemented in the user file.
- Parameters
-
[in] | p_i2c | Pointer to an I2C handle which contains the configuration information for the specified I2C. |