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 FMPSMBUSx peripheral:
(+) User must Implement HAL_FMPSMBUS_MspInit() function in which he configures
all related peripherals resources (CLOCK, GPIO, IT and NVIC ).
(+) Call the function HAL_FMPSMBUS_Init() to configure the selected device with
the selected configuration:
(++) Clock Timing
(++) Bus Timeout
(++) Analog Filer mode
(++) Own Address 1
(++) Addressing mode (Master, Slave)
(++) Dual Addressing mode
(++) Own Address 2
(++) Own Address 2 Mask
(++) General call mode
(++) Nostretch mode
(++) Packet Error Check mode
(++) Peripheral mode
(+) Call the function HAL_FMPSMBUS_DeInit() to restore the default configuration
of the selected FMPSMBUSx peripheral.
(+) Enable/Disable Analog/Digital filters with HAL_FMPSMBUS_ConfigAnalogFilter() and
HAL_FMPSMBUS_ConfigDigitalFilter().
◆ HAL_FMPSMBUS_ConfigAnalogFilter()
HAL_StatusTypeDef HAL_FMPSMBUS_ConfigAnalogFilter |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus, |
|
|
uint32_t |
AnalogFilter |
|
) |
| |
Configure Analog noise filter.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
AnalogFilter | This parameter can be one of the following values:
- FMPSMBUS_ANALOGFILTER_ENABLE
- FMPSMBUS_ANALOGFILTER_DISABLE
|
- Return values
-
Definition at line 495 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_ConfigDigitalFilter()
HAL_StatusTypeDef HAL_FMPSMBUS_ConfigDigitalFilter |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus, |
|
|
uint32_t |
DigitalFilter |
|
) |
| |
Configure Digital noise filter.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
DigitalFilter | Coefficient of digital noise filter between Min_Data=0x00 and Max_Data=0x0F. |
- Return values
-
Definition at line 539 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_DeInit()
HAL_StatusTypeDef HAL_FMPSMBUS_DeInit |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus | ) |
|
DeInitialize the FMPSMBUS peripheral.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
- Return values
-
Definition at line 415 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_Init()
HAL_StatusTypeDef HAL_FMPSMBUS_Init |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus | ) |
|
Initialize the FMPSMBUS according to the specified parameters in the FMPSMBUS_InitTypeDef and initialize the associated handle.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
- Return values
-
Definition at line 290 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_MspDeInit()
__weak void HAL_FMPSMBUS_MspDeInit |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus | ) |
|
DeInitialize the FMPSMBUS MSP.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
- Return values
-
Definition at line 476 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_MspInit()
__weak void HAL_FMPSMBUS_MspInit |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus | ) |
|
Initialize the FMPSMBUS MSP.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
- Return values
-
Definition at line 460 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_RegisterAddrCallback()
Register the Slave Address Match FMPSMBUS Callback To be used instead of the weak HAL_FMPSMBUS_AddrCallback() predefined callback.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
pCallback | pointer to the Address Match Callback function |
- Return values
-
Definition at line 810 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_RegisterCallback()
Register a User FMPSMBUS Callback To be used instead of the weak predefined callback.
- Note
- The HAL_FMPSMBUS_RegisterCallback() may be called before HAL_FMPSMBUS_Init() in HAL_FMPSMBUS_STATE_RESET to register callbacks for HAL_FMPSMBUS_MSPINIT_CB_ID and HAL_FMPSMBUS_MSPDEINIT_CB_ID.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
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 606 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_UnRegisterAddrCallback()
HAL_StatusTypeDef HAL_FMPSMBUS_UnRegisterAddrCallback |
( |
FMPSMBUS_HandleTypeDef * |
hfmpsmbus | ) |
|
UnRegister the Slave Address Match FMPSMBUS Callback Info Ready FMPSMBUS Callback is redirected to the weak HAL_FMPSMBUS_AddrCallback() predefined callback.
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
- Return values
-
Definition at line 846 of file stm32f4xx_hal_fmpsmbus.c.
◆ HAL_FMPSMBUS_UnRegisterCallback()
Unregister an FMPSMBUS Callback FMPSMBUS callback is redirected to the weak predefined callback.
- Note
- The HAL_FMPSMBUS_UnRegisterCallback() may be called before HAL_FMPSMBUS_Init() in HAL_FMPSMBUS_STATE_RESET to un-register callbacks for HAL_FMPSMBUS_MSPINIT_CB_ID and HAL_FMPSMBUS_MSPDEINIT_CB_ID
- Parameters
-
hfmpsmbus | Pointer to a FMPSMBUS_HandleTypeDef structure that contains the configuration information for the specified FMPSMBUS. |
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 719 of file stm32f4xx_hal_fmpsmbus.c.