|
STM32F439xx HAL User Manual
|
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 create the associated handle. | |
| HAL_StatusTypeDef | HAL_I2C_DeInit (I2C_HandleTypeDef *hi2c) |
| DeInitializes the I2C peripheral. | |
| __weak void | HAL_I2C_MspInit (I2C_HandleTypeDef *hi2c) |
| I2C MSP Init. | |
| __weak void | HAL_I2C_MspDeInit (I2C_HandleTypeDef *hi2c) |
| I2C MSP DeInit. | |
Initialization and Configuration 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_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:
(++) Communication Speed
(++) Duty cycle
(++) Addressing mode
(++) Own Address 1
(++) Dual Addressing mode
(++) Own Address 2
(++) 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 | ) |
DeInitializes the I2C peripheral.
| hi2c | pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
| HAL | status |
Definition at line 436 of file stm32f4xx_hal_i2c.c.
References __HAL_I2C_DISABLE, assert_param, I2C_HandleTypeDef::ErrorCode, HAL_I2C_ERROR_NONE, HAL_I2C_MODE_NONE, HAL_I2C_MspDeInit(), HAL_I2C_STATE_BUSY, HAL_I2C_STATE_RESET, I2C_STATE_NONE, I2C_HandleTypeDef::Instance, I2C_HandleTypeDef::Mode, I2C_HandleTypeDef::PreviousState, and I2C_HandleTypeDef::State.
| HAL_StatusTypeDef HAL_I2C_Init | ( | I2C_HandleTypeDef * | hi2c | ) |
Initializes the I2C according to the specified parameters in the I2C_InitTypeDef and create the associated handle.
| hi2c | pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
| HAL | status |
Definition at line 354 of file stm32f4xx_hal_i2c.c.
References __HAL_I2C_DISABLE, __HAL_I2C_ENABLE, I2C_InitTypeDef::AddressingMode, assert_param, I2C_InitTypeDef::ClockSpeed, I2C_InitTypeDef::DualAddressMode, I2C_InitTypeDef::DutyCycle, I2C_HandleTypeDef::ErrorCode, I2C_InitTypeDef::GeneralCallMode, HAL_I2C_ERROR_NONE, HAL_I2C_MODE_NONE, HAL_I2C_MspInit(), HAL_I2C_STATE_BUSY, HAL_I2C_STATE_READY, HAL_I2C_STATE_RESET, HAL_RCC_GetPCLK1Freq(), I2C_FREQRANGE, I2C_RISE_TIME, I2C_SPEED, I2C_STATE_NONE, I2C_HandleTypeDef::Init, I2C_HandleTypeDef::Instance, IS_I2C_ADDRESSING_MODE, IS_I2C_CLOCK_SPEED, IS_I2C_DUAL_ADDRESS, IS_I2C_DUTY_CYCLE, IS_I2C_GENERAL_CALL, IS_I2C_NO_STRETCH, IS_I2C_OWN_ADDRESS1, IS_I2C_OWN_ADDRESS2, I2C_HandleTypeDef::Lock, I2C_HandleTypeDef::Mode, I2C_InitTypeDef::NoStretchMode, I2C_InitTypeDef::OwnAddress1, I2C_InitTypeDef::OwnAddress2, I2C_HandleTypeDef::PreviousState, and I2C_HandleTypeDef::State.
| void HAL_I2C_MspDeInit | ( | I2C_HandleTypeDef * | hi2c | ) |
I2C MSP DeInit.
| hi2c | pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
| None |
Definition at line 487 of file stm32f4xx_hal_i2c.c.
Referenced by HAL_I2C_DeInit().
| void HAL_I2C_MspInit | ( | I2C_HandleTypeDef * | hi2c | ) |
I2C MSP Init.
| hi2c | pointer to a I2C_HandleTypeDef structure that contains the configuration information for I2C module |
| None |
Definition at line 472 of file stm32f4xx_hal_i2c.c.
Referenced by HAL_I2C_Init().
1.7.6.1