STM32F479xx HAL User Manual
|
Defines | |
#define | __HAL_SMBUS_RESET_HANDLE_STATE(__HANDLE__) |
Reset SMBUS handle state. | |
#define | __HAL_SMBUS_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__)) |
Enable or disable the specified SMBUS interrupts. | |
#define | __HAL_SMBUS_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__))) |
#define | __HAL_SMBUS_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Checks if the specified SMBUS interrupt source is enabled or disabled. | |
#define | __HAL_SMBUS_GET_FLAG(__HANDLE__, __FLAG__) |
Checks whether the specified SMBUS flag is set or not. | |
#define | __HAL_SMBUS_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR1 = ~((__FLAG__) & SMBUS_FLAG_MASK)) |
Clears the SMBUS pending flags which are cleared by writing 0 in a specific bit. | |
#define | __HAL_SMBUS_CLEAR_ADDRFLAG(__HANDLE__) |
Clears the SMBUS ADDR pending flag. | |
#define | __HAL_SMBUS_CLEAR_STOPFLAG(__HANDLE__) |
Clears the SMBUS STOPF pending flag. | |
#define | __HAL_SMBUS_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE) |
Enable the SMBUS peripheral. | |
#define | __HAL_SMBUS_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE) |
Disable the SMBUS peripheral. | |
#define | __HAL_SMBUS_GENERATE_NACK(__HANDLE__) (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_ACK)) |
Generate a Non-Acknowledge SMBUS peripheral in Slave mode. |
#define __HAL_SMBUS_CLEAR_ADDRFLAG | ( | __HANDLE__ | ) |
do{ \ __IO uint32_t tmpreg = 0x00U; \ tmpreg = (__HANDLE__)->Instance->SR1; \ tmpreg = (__HANDLE__)->Instance->SR2; \ UNUSED(tmpreg); \ } while(0)
Clears the SMBUS ADDR pending flag.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
None |
Definition at line 482 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_IsDeviceReady(), HAL_SMBUS_Slave_Receive_IT(), HAL_SMBUS_Slave_Transmit_IT(), and SMBUS_Master_ADDR().
#define __HAL_SMBUS_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->Instance->SR1 = ~((__FLAG__) & SMBUS_FLAG_MASK)) |
Clears the SMBUS pending flags which are cleared by writing 0 in a specific bit.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
__FLAG__ | specifies the flag to clear. This parameter can be any combination of the following values:
|
None |
Definition at line 475 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_EnableAlert_IT(), HAL_SMBUS_ER_IRQHandler(), HAL_SMBUS_IsDeviceReady(), and SMBUS_Slave_AF().
#define __HAL_SMBUS_CLEAR_STOPFLAG | ( | __HANDLE__ | ) |
do{ \ __IO uint32_t tmpreg = 0x00U; \ tmpreg = (__HANDLE__)->Instance->SR1; \ (__HANDLE__)->Instance->CR1 |= I2C_CR1_PE; \ UNUSED(tmpreg); \ } while(0)
Clears the SMBUS STOPF pending flag.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
None |
Definition at line 495 of file stm32f4xx_hal_smbus.h.
Referenced by SMBUS_Slave_STOPF().
#define __HAL_SMBUS_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE) |
Disable the SMBUS peripheral.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUSx where x: 1 or 2 to select the SMBUS peripheral. |
None |
Definition at line 515 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_ConfigAnalogFilter(), HAL_SMBUS_ConfigDigitalFilter(), HAL_SMBUS_DeInit(), HAL_SMBUS_Init(), and SMBUS_ITError().
#define __HAL_SMBUS_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__))) |
Definition at line 415 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_DisableAlert_IT(), HAL_SMBUS_DisableListen_IT(), HAL_SMBUS_Master_Abort_IT(), SMBUS_MasterReceive_BTF(), SMBUS_MasterReceive_RXNE(), SMBUS_MasterTransmit_BTF(), SMBUS_MasterTransmit_TXE(), SMBUS_Slave_AF(), SMBUS_Slave_STOPF(), SMBUS_SlaveReceive_RXNE(), and SMBUS_SlaveTransmit_TXE().
#define __HAL_SMBUS_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE) |
Enable the SMBUS peripheral.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUSx where x: 1 or 2 to select the SMBUS peripheral. |
None |
Definition at line 508 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_ConfigAnalogFilter(), HAL_SMBUS_ConfigDigitalFilter(), HAL_SMBUS_EnableListen_IT(), HAL_SMBUS_Init(), HAL_SMBUS_IsDeviceReady(), HAL_SMBUS_Master_Receive_IT(), HAL_SMBUS_Master_Transmit_IT(), HAL_SMBUS_Slave_Receive_IT(), and HAL_SMBUS_Slave_Transmit_IT().
#define __HAL_SMBUS_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__)) |
Enable or disable the specified SMBUS interrupts.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
__INTERRUPT__ | specifies the interrupt source to enable or disable. This parameter can be one of the following values:
|
None |
Definition at line 414 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_EnableAlert_IT(), HAL_SMBUS_EnableListen_IT(), HAL_SMBUS_Master_Receive_IT(), HAL_SMBUS_Master_Transmit_IT(), HAL_SMBUS_Slave_Receive_IT(), and HAL_SMBUS_Slave_Transmit_IT().
#define __HAL_SMBUS_GENERATE_NACK | ( | __HANDLE__ | ) | (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_ACK)) |
Generate a Non-Acknowledge SMBUS peripheral in Slave mode.
__HANDLE__ | specifies the SMBUS Handle. |
None |
Definition at line 521 of file stm32f4xx_hal_smbus.h.
#define __HAL_SMBUS_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) |
((((uint8_t)((__FLAG__) >> 16U)) == 0x01U)?((((__HANDLE__)->Instance->SR1) & ((__FLAG__) & SMBUS_FLAG_MASK)) == ((__FLAG__) & SMBUS_FLAG_MASK)): \ ((((__HANDLE__)->Instance->SR2) & ((__FLAG__) & SMBUS_FLAG_MASK)) == ((__FLAG__) & SMBUS_FLAG_MASK)))
Checks whether the specified SMBUS flag is set or not.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
__FLAG__ | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of __FLAG__ (TRUE or FALSE). |
Definition at line 458 of file stm32f4xx_hal_smbus.h.
Referenced by HAL_SMBUS_IsDeviceReady(), HAL_SMBUS_Master_Receive_IT(), HAL_SMBUS_Master_Transmit_IT(), SMBUS_ITError(), SMBUS_Slave_ADDR(), SMBUS_Slave_STOPF(), and SMBUS_WaitOnFlagUntilTimeout().
#define __HAL_SMBUS_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Checks if the specified SMBUS interrupt source is enabled or disabled.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
__INTERRUPT__ | specifies the SMBUS interrupt source to check. This parameter can be one of the following values:
|
The | new state of __INTERRUPT__ (TRUE or FALSE). |
Definition at line 427 of file stm32f4xx_hal_smbus.h.
#define __HAL_SMBUS_RESET_HANDLE_STATE | ( | __HANDLE__ | ) |
do{ \ (__HANDLE__)->State = HAL_SMBUS_STATE_RESET; \ (__HANDLE__)->MspInitCallback = NULL; \ (__HANDLE__)->MspDeInitCallback = NULL; \ } while(0)
Reset SMBUS handle state.
__HANDLE__ | specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral. |
None |
Definition at line 395 of file stm32f4xx_hal_smbus.h.