Initialization and Configuration functions.
More...
Initialization and Configuration functions.
===============================================================================
##### Initialization and de-initialization functions #####
===============================================================================
[..] This subsection provides a set of functions allowing to initialize and
deinitialize the SMBUSx peripheral:
(+) User must Implement HAL_SMBUS_MspInit() function in which he configures
all related peripherals resources (CLOCK, GPIO, IT and NVIC).
(+) Call the function HAL_SMBUS_Init() to configure the selected device with
the selected configuration:
(++) Communication Speed
(++) Addressing mode
(++) Own Address 1
(++) Dual Addressing mode
(++) Own Address 2
(++) General call mode
(++) Nostretch mode
(++) Packet Error Check mode
(++) Peripheral mode
(+) Call the function HAL_SMBUS_DeInit() to restore the default configuration
of the selected SMBUSx peripheral.
◆ HAL_SMBUS_ConfigAnalogFilter()
HAL_StatusTypeDef HAL_SMBUS_ConfigAnalogFilter |
( |
SMBUS_HandleTypeDef * |
hsmbus, |
|
|
uint32_t |
AnalogFilter |
|
) |
| |
Configures SMBUS Analog noise filter.
- Parameters
-
hsmbus | pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUSx peripheral. |
AnalogFilter | new state of the Analog filter. |
- Return values
-
Definition at line 473 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_ConfigDigitalFilter()
HAL_StatusTypeDef HAL_SMBUS_ConfigDigitalFilter |
( |
SMBUS_HandleTypeDef * |
hsmbus, |
|
|
uint32_t |
DigitalFilter |
|
) |
| |
Configures SMBUS Digital noise filter.
- Parameters
-
hsmbus | pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUSx peripheral. |
DigitalFilter | Coefficient of digital noise filter between 0x00 and 0x0F. |
- Return values
-
Definition at line 511 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_DeInit()
DeInitializes the SMBUS peripheral.
- Parameters
-
hsmbus | pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS. |
- Return values
-
Definition at line 395 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_Init()
Initializes the SMBUS according to the specified parameters in the SMBUS_InitTypeDef and initialize the associated handle.
- Parameters
-
hsmbus | pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS |
- Return values
-
Definition at line 282 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_MspDeInit()
DeInitialize the SMBUS MSP.
- Parameters
-
hsmbus | pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS |
- Return values
-
Definition at line 456 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_MspInit()
Initialize the SMBUS MSP.
- Parameters
-
hsmbus | pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS |
- Return values
-
Definition at line 441 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_RegisterAddrCallback()
Register the Slave Address Match SMBUS Callback To be used instead of the weak HAL_SMBUS_AddrCallback() predefined callback.
- Parameters
-
hsmbus | Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS. |
pCallback | pointer to the Address Match Callback function |
- Return values
-
Definition at line 786 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_RegisterCallback()
Register a User SMBUS Callback To be used instead of the weak predefined callback.
- Parameters
-
hsmbus | Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS. |
CallbackID | ID of the callback to be registered This parameter can be one of the following values:
|
pCallback | pointer to the Callback function |
- Return values
-
Definition at line 570 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_UnRegisterAddrCallback()
UnRegister the Slave Address Match SMBUS Callback Info Ready SMBUS Callback is redirected to the weak HAL_SMBUS_AddrCallback() predefined callback.
- Parameters
-
hsmbus | Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS. |
- Return values
-
Definition at line 822 of file stm32f4xx_hal_smbus.c.
◆ HAL_SMBUS_UnRegisterCallback()
Unregister an SMBUS Callback SMBUS callback is redirected to the weak predefined callback.
- Parameters
-
hsmbus | Pointer to a SMBUS_HandleTypeDef structure that contains the configuration information for the specified SMBUS. |
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:
|
- Return values
-
Definition at line 687 of file stm32f4xx_hal_smbus.c.