STM32L486xx HAL User Manual
Defines
SMBUS Exported Macros
SMBUS

Defines

#define __HAL_SMBUS_RESET_HANDLE_STATE(__HANDLE__)
 Reset SMBUS handle state.
#define __HAL_SMBUS_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR1 |= (__INTERRUPT__))
 Enable the specified SMBUS interrupts.
#define __HAL_SMBUS_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR1 &= (~(__INTERRUPT__)))
 Disable the specified SMBUS interrupts.
#define __HAL_SMBUS_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
 Check whether the specified SMBUS interrupt source is enabled or not.
#define SMBUS_FLAG_MASK   (0x0001FFFFU)
 Check whether the specified SMBUS flag is set or not.
#define __HAL_SMBUS_GET_FLAG(__HANDLE__, __FLAG__)   (((((__HANDLE__)->Instance->ISR) & ((__FLAG__) & SMBUS_FLAG_MASK)) == ((__FLAG__) & SMBUS_FLAG_MASK)))
#define __HAL_SMBUS_CLEAR_FLAG(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ICR = (__FLAG__))
 Clear the SMBUS pending flags which are cleared by writing 1 in a specific bit.
#define __HAL_SMBUS_ENABLE(__HANDLE__)   (SET_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))
 Enable the specified SMBUS peripheral.
#define __HAL_SMBUS_DISABLE(__HANDLE__)   (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))
 Disable the specified SMBUS peripheral.
#define __HAL_SMBUS_GENERATE_NACK(__HANDLE__)   (SET_BIT((__HANDLE__)->Instance->CR2, I2C_CR2_NACK))
 Generate a Non-Acknowledge SMBUS peripheral in Slave mode.

Define Documentation

#define __HAL_SMBUS_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((__HANDLE__)->Instance->ICR = (__FLAG__))

Clear the SMBUS pending flags which are cleared by writing 1 in a specific bit.

Parameters:
__HANDLE__specifies the SMBUS Handle.
__FLAG__specifies the flag to clear. This parameter can be any combination of the following values:
Return values:
None

Definition at line 519 of file stm32l4xx_hal_smbus.h.

Referenced by HAL_SMBUS_EnableAlert_IT(), HAL_SMBUS_IsDeviceReady(), HAL_SMBUS_Slave_Receive_IT(), HAL_SMBUS_Slave_Transmit_IT(), SMBUS_ITErrorHandler(), SMBUS_Master_ISR(), and SMBUS_Slave_ISR().

#define __HAL_SMBUS_DISABLE (   __HANDLE__)    (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))

Disable the specified SMBUS peripheral.

Parameters:
__HANDLE__specifies the SMBUS Handle.
Return values:
None

Definition at line 531 of file stm32l4xx_hal_smbus.h.

Referenced by HAL_SMBUS_ConfigAnalogFilter(), HAL_SMBUS_ConfigDigitalFilter(), HAL_SMBUS_DeInit(), HAL_SMBUS_Init(), and SMBUS_Master_ISR().

#define __HAL_SMBUS_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ((__HANDLE__)->Instance->CR1 &= (~(__INTERRUPT__)))

Disable the specified SMBUS interrupts.

Parameters:
__HANDLE__specifies the SMBUS Handle.
__INTERRUPT__specifies the interrupt source to disable. This parameter can be one of the following values:
Return values:
None

Definition at line 459 of file stm32l4xx_hal_smbus.h.

Referenced by SMBUS_Disable_IRQ(), and SMBUS_Slave_ISR().

#define __HAL_SMBUS_ENABLE (   __HANDLE__)    (SET_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))

Enable the specified SMBUS peripheral.

Parameters:
__HANDLE__specifies the SMBUS Handle.
Return values:
None

Definition at line 525 of file stm32l4xx_hal_smbus.h.

Referenced by HAL_SMBUS_ConfigAnalogFilter(), HAL_SMBUS_ConfigDigitalFilter(), HAL_SMBUS_Init(), and SMBUS_Master_ISR().

#define __HAL_SMBUS_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    ((__HANDLE__)->Instance->CR1 |= (__INTERRUPT__))

Enable the specified SMBUS interrupts.

Parameters:
__HANDLE__specifies the SMBUS Handle.
__INTERRUPT__specifies the interrupt source to enable. This parameter can be one of the following values:
Return values:
None

Definition at line 443 of file stm32l4xx_hal_smbus.h.

Referenced by SMBUS_Enable_IRQ().

#define __HAL_SMBUS_GENERATE_NACK (   __HANDLE__)    (SET_BIT((__HANDLE__)->Instance->CR2, I2C_CR2_NACK))

Generate a Non-Acknowledge SMBUS peripheral in Slave mode.

Parameters:
__HANDLE__specifies the SMBUS Handle.
Return values:
None

Definition at line 537 of file stm32l4xx_hal_smbus.h.

#define __HAL_SMBUS_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    (((((__HANDLE__)->Instance->ISR) & ((__FLAG__) & SMBUS_FLAG_MASK)) == ((__FLAG__) & SMBUS_FLAG_MASK)))
#define __HAL_SMBUS_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    ((((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)

Check whether the specified SMBUS interrupt source is enabled or not.

Parameters:
__HANDLE__specifies the SMBUS Handle.
__INTERRUPT__specifies the SMBUS interrupt source to check. This parameter can be one of the following values:
Return values:
Thenew state of __IT__ (TRUE or FALSE).

Definition at line 475 of file stm32l4xx_hal_smbus.h.

Referenced by HAL_SMBUS_EV_IRQHandler().

#define __HAL_SMBUS_RESET_HANDLE_STATE (   __HANDLE__)
Value:
do{                                                   \
                                                                (__HANDLE__)->State = HAL_SMBUS_STATE_RESET;       \
                                                                (__HANDLE__)->MspInitCallback = NULL;            \
                                                                (__HANDLE__)->MspDeInitCallback = NULL;          \
                                                             } while(0)

Reset SMBUS handle state.

Parameters:
__HANDLE__specifies the SMBUS Handle.
Return values:
None

Definition at line 420 of file stm32l4xx_hal_smbus.h.

#define SMBUS_FLAG_MASK   (0x0001FFFFU)

Check whether the specified SMBUS flag is set or not.

Parameters:
__HANDLE__specifies the SMBUS Handle.
__FLAG__specifies the flag to check. This parameter can be one of the following values:
Return values:
Thenew state of __FLAG__ (TRUE or FALSE).

Definition at line 500 of file stm32l4xx_hal_smbus.h.