Macros
Collaboration diagram for SMBUS Exported Macros:

Macros

#define __HAL_SMBUS_CLEAR_ADDRFLAG(__HANDLE__)
 Clears the SMBUS ADDR pending flag. More...
 
#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. More...
 
#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. More...
 
#define __HAL_SMBUS_CLEAR_STOPFLAG(__HANDLE__)
 Clears the SMBUS STOPF pending flag. More...
 
#define __HAL_SMBUS_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE)
 Disable the SMBUS peripheral. More...
 
#define __HAL_SMBUS_DISABLE(__HANDLE__)   (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))
 Disable the specified SMBUS peripheral. More...
 
#define __HAL_SMBUS_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__)))
 
#define __HAL_SMBUS_DISABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR1 &= (~(__INTERRUPT__)))
 Disable the specified SMBUS interrupts. More...
 
#define __HAL_SMBUS_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE)
 Enable the SMBUS peripheral. More...
 
#define __HAL_SMBUS_ENABLE(__HANDLE__)   (SET_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_PE))
 Enable the specified SMBUS peripheral. More...
 
#define __HAL_SMBUS_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__))
 Enable or disable the specified SMBUS interrupts. More...
 
#define __HAL_SMBUS_ENABLE_IT(__HANDLE__, __INTERRUPT__)   ((__HANDLE__)->Instance->CR1 |= (__INTERRUPT__))
 Enable the specified SMBUS interrupts. More...
 
#define __HAL_SMBUS_GENERATE_NACK(__HANDLE__)   (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_ACK))
 Generate a Non-Acknowledge SMBUS peripheral in Slave mode. More...
 
#define __HAL_SMBUS_GENERATE_NACK(__HANDLE__)   (SET_BIT((__HANDLE__)->Instance->CR2, I2C_CR2_NACK))
 Generate a Non-Acknowledge SMBUS peripheral in Slave mode. More...
 
#define __HAL_SMBUS_GET_FLAG(__HANDLE__, __FLAG__)
 Checks whether the specified SMBUS flag is set or not. More...
 
#define __HAL_SMBUS_GET_FLAG(__HANDLE__, __FLAG__)   (((((__HANDLE__)->Instance->ISR) & ((__FLAG__) & SMBUS_FLAG_MASK)) == ((__FLAG__) & SMBUS_FLAG_MASK)) ? SET : RESET)
 
#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. More...
 
#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. More...
 
#define __HAL_SMBUS_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SMBUS_STATE_RESET)
 Reset SMBUS handle state. More...
 
#define __HAL_SMBUS_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_SMBUS_STATE_RESET)
 Reset SMBUS handle state. More...
 
#define SMBUS_FLAG_MASK   (0x0001FFFFU)
 Check whether the specified SMBUS flag is set or not. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_SMBUS_CLEAR_ADDRFLAG

#define __HAL_SMBUS_CLEAR_ADDRFLAG (   __HANDLE__)
Value:
do{ \
__IO uint32_t tmpreg = 0x00U; \
tmpreg = (__HANDLE__)->Instance->SR1; \
tmpreg = (__HANDLE__)->Instance->SR2; \
UNUSED(tmpreg); \
} while(0)

Clears the SMBUS ADDR pending flag.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
Return values
None

Definition at line 482 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_CLEAR_FLAG [1/2]

#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.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
<strong>FLAG</strong>specifies the flag to clear. This parameter can be any combination of the following values:
  • SMBUS_FLAG_SMBALERT: SMBus Alert flag
  • SMBUS_FLAG_TIMEOUT: Timeout or Tlow error flag
  • SMBUS_FLAG_PECERR: PEC error in reception flag
  • SMBUS_FLAG_OVR: Overrun/Underrun flag (Slave mode)
  • SMBUS_FLAG_AF: Acknowledge failure flag
  • SMBUS_FLAG_ARLO: Arbitration lost flag (Master mode)
  • SMBUS_FLAG_BERR: Bus error flag
Return values
None

Definition at line 475 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_CLEAR_FLAG [2/2]

#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
<strong>HANDLE</strong>specifies the SMBUS Handle.
<strong>FLAG</strong>specifies the flag to clear. This parameter can be any combination of the following values:
Return values
None

Definition at line 504 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_CLEAR_STOPFLAG

#define __HAL_SMBUS_CLEAR_STOPFLAG (   __HANDLE__)
Value:
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.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
Return values
None

Definition at line 495 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_DISABLE [1/2]

#define __HAL_SMBUS_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE)

Disable the SMBUS peripheral.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUSx where x: 1 or 2 to select the SMBUS peripheral.
Return values
None

Definition at line 515 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_DISABLE [2/2]

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

Disable the specified SMBUS peripheral.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
Return values
None

Definition at line 516 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_DISABLE_IT [1/2]

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

Definition at line 415 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_DISABLE_IT [2/2]

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

Disable the specified SMBUS interrupts.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
<strong>INTERRUPT</strong>specifies the interrupt source to disable. This parameter can be one of the following values:
Return values
None

Definition at line 444 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_ENABLE [1/2]

#define __HAL_SMBUS_ENABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE)

Enable the SMBUS peripheral.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUSx where x: 1 or 2 to select the SMBUS peripheral.
Return values
None

Definition at line 508 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_ENABLE [2/2]

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

Enable the specified SMBUS peripheral.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
Return values
None

Definition at line 510 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_ENABLE_IT [1/2]

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

Enable or disable the specified SMBUS interrupts.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
<strong>INTERRUPT</strong>specifies the interrupt source to enable or disable. This parameter can be one of the following values:
  • SMBUS_IT_BUF: Buffer interrupt enable
  • SMBUS_IT_EVT: Event interrupt enable
  • SMBUS_IT_ERR: Error interrupt enable
Return values
None

Definition at line 414 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_ENABLE_IT [2/2]

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

Enable the specified SMBUS interrupts.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
<strong>INTERRUPT</strong>specifies the interrupt source to enable. This parameter can be one of the following values:
Return values
None

Definition at line 428 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_GENERATE_NACK [1/2]

#define __HAL_SMBUS_GENERATE_NACK (   __HANDLE__)    (CLEAR_BIT((__HANDLE__)->Instance->CR1, I2C_CR1_ACK))

Generate a Non-Acknowledge SMBUS peripheral in Slave mode.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
Return values
None

Definition at line 521 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_GENERATE_NACK [2/2]

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

Generate a Non-Acknowledge SMBUS peripheral in Slave mode.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
Return values
None

Definition at line 522 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_GET_FLAG [1/2]

#define __HAL_SMBUS_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)
Value:
((((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.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • SMBUS_FLAG_SMBALERT: SMBus Alert flag
  • SMBUS_FLAG_TIMEOUT: Timeout or Tlow error flag
  • SMBUS_FLAG_PECERR: PEC error in reception flag
  • SMBUS_FLAG_OVR: Overrun/Underrun flag
  • SMBUS_FLAG_AF: Acknowledge failure flag
  • SMBUS_FLAG_ARLO: Arbitration lost flag
  • SMBUS_FLAG_BERR: Bus error flag
  • SMBUS_FLAG_TXE: Data register empty flag
  • SMBUS_FLAG_RXNE: Data register not empty flag
  • SMBUS_FLAG_STOPF: Stop detection flag
  • SMBUS_FLAG_ADD10: 10-bit header sent flag
  • SMBUS_FLAG_BTF: Byte transfer finished flag
  • SMBUS_FLAG_ADDR: Address sent flag Address matched flag
  • SMBUS_FLAG_SB: Start bit flag
  • SMBUS_FLAG_DUALF: Dual flag
  • SMBUS_FLAG_SMBHOST: SMBus host header
  • SMBUS_FLAG_SMBDEFAULT: SMBus default header
  • SMBUS_FLAG_GENCALL: General call header flag
  • SMBUS_FLAG_TRA: Transmitter/Receiver flag
  • SMBUS_FLAG_BUSY: Bus busy flag
  • SMBUS_FLAG_MSL: Master/Slave flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 458 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_GET_FLAG [2/2]

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

Definition at line 486 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_GET_IT_SOURCE [1/2]

#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.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
<strong>INTERRUPT</strong>specifies the SMBUS interrupt source to check. This parameter can be one of the following values:
  • SMBUS_IT_BUF: Buffer interrupt enable
  • SMBUS_IT_EVT: Event interrupt enable
  • SMBUS_IT_ERR: Error interrupt enable
Return values
Thenew state of INTERRUPT (TRUE or FALSE).

Definition at line 427 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_GET_IT_SOURCE [2/2]

#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
<strong>HANDLE</strong>specifies the SMBUS Handle.
<strong>INTERRUPT</strong>specifies the SMBUS interrupt source to check. This parameter can be one of the following values:
Return values
Thenew state of IT (SET or RESET).

Definition at line 460 of file stm32f7xx_hal_smbus.h.

◆ __HAL_SMBUS_RESET_HANDLE_STATE [1/2]

#define __HAL_SMBUS_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_SMBUS_STATE_RESET)

Reset SMBUS handle state.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle. This parameter can be SMBUS where x: 1, 2, or 3 to select the SMBUS peripheral.
Return values
None

Definition at line 401 of file stm32f4xx_hal_smbus.h.

◆ __HAL_SMBUS_RESET_HANDLE_STATE [2/2]

#define __HAL_SMBUS_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_SMBUS_STATE_RESET)

Reset SMBUS handle state.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
Return values
None

Definition at line 411 of file stm32f7xx_hal_smbus.h.

◆ SMBUS_FLAG_MASK

#define SMBUS_FLAG_MASK   (0x0001FFFFU)

Check whether the specified SMBUS flag is set or not.

Parameters
<strong>HANDLE</strong>specifies the SMBUS Handle.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
Return values
Thenew state of FLAG (SET or RESET).

Definition at line 485 of file stm32f7xx_hal_smbus.h.

SMBUS_FLAG_MASK
#define SMBUS_FLAG_MASK
Definition: stm32f4xx_hal_smbus.h:634
I2C_CR1_PE
#define I2C_CR1_PE
Definition: stm32f407xx.h:9103


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:07