Macros
Collaboration diagram for SMBUS Private Macros:

Macros

#define IS_SMBUS_ADDRESSING_MODE(ADDRESS)
 
#define IS_SMBUS_CLOCK_SPEED(SPEED)   (((SPEED) > 0U) && ((SPEED) <= 100000U))
 
#define IS_SMBUS_DUAL_ADDRESS(ADDRESS)
 
#define IS_SMBUS_GENERAL_CALL(CALL)
 
#define IS_SMBUS_NO_STRETCH(STRETCH)
 
#define IS_SMBUS_OWN_ADDRESS1(ADDRESS1)   (((ADDRESS1) & 0xFFFFFC00U) == 0U)
 
#define IS_SMBUS_OWN_ADDRESS2(ADDRESS2)   (((ADDRESS2) & 0xFFFFFF01U) == 0U)
 
#define IS_SMBUS_PEC(PEC)
 
#define IS_SMBUS_PERIPHERAL_MODE(MODE)
 
#define IS_SMBUS_TRANSFER_OPTIONS_REQUEST(REQUEST)
 
#define SMBUS_10BIT_ADDRESS(__ADDRESS__)   ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)0x00FF)))
 
#define SMBUS_10BIT_HEADER_READ(__ADDRESS__)   ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)(0x00F1))))
 
#define SMBUS_10BIT_HEADER_WRITE(__ADDRESS__)   ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)0x00F0)))
 
#define SMBUS_7BIT_ADD_READ(__ADDRESS__)   ((uint8_t)((__ADDRESS__) | I2C_OAR1_ADD0))
 
#define SMBUS_7BIT_ADD_WRITE(__ADDRESS__)   ((uint8_t)((__ADDRESS__) & (~I2C_OAR1_ADD0)))
 
#define SMBUS_FREQRANGE(__PCLK__)   ((__PCLK__)/1000000U)
 
#define SMBUS_GET_PEC_MODE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 & I2C_CR1_ENPEC)
 
#define SMBUS_GET_PEC_VALUE(__HANDLE__)   ((__HANDLE__)->XferPEC)
 
#define SMBUS_RISE_TIME(__FREQRANGE__)   ( ((__FREQRANGE__) + 1U))
 
#define SMBUS_SPEED_STANDARD(__PCLK__, __SPEED__)   (((((__PCLK__)/((__SPEED__) << 1U)) & I2C_CCR_CCR) < 4U)? 4U:((__PCLK__) / ((__SPEED__) << 1U)))
 

Detailed Description

Macro Definition Documentation

◆ IS_SMBUS_ADDRESSING_MODE

#define IS_SMBUS_ADDRESSING_MODE (   ADDRESS)
Value:
(((ADDRESS) == SMBUS_ADDRESSINGMODE_7BIT) || \

Definition at line 669 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_CLOCK_SPEED

#define IS_SMBUS_CLOCK_SPEED (   SPEED)    (((SPEED) > 0U) && ((SPEED) <= 100000U))

Definition at line 688 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_DUAL_ADDRESS

#define IS_SMBUS_DUAL_ADDRESS (   ADDRESS)
Value:
(((ADDRESS) == SMBUS_DUALADDRESS_DISABLE) || \
((ADDRESS) == SMBUS_DUALADDRESS_ENABLE))

Definition at line 672 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_GENERAL_CALL

#define IS_SMBUS_GENERAL_CALL (   CALL)
Value:
(((CALL) == SMBUS_GENERALCALL_DISABLE) || \

Definition at line 675 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_NO_STRETCH

#define IS_SMBUS_NO_STRETCH (   STRETCH)
Value:
(((STRETCH) == SMBUS_NOSTRETCH_DISABLE) || \
((STRETCH) == SMBUS_NOSTRETCH_ENABLE))

Definition at line 678 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_OWN_ADDRESS1

#define IS_SMBUS_OWN_ADDRESS1 (   ADDRESS1)    (((ADDRESS1) & 0xFFFFFC00U) == 0U)

Definition at line 690 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_OWN_ADDRESS2

#define IS_SMBUS_OWN_ADDRESS2 (   ADDRESS2)    (((ADDRESS2) & 0xFFFFFF01U) == 0U)

Definition at line 692 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_PEC

#define IS_SMBUS_PEC (   PEC)
Value:
(((PEC) == SMBUS_PEC_DISABLE) || \
((PEC) == SMBUS_PEC_ENABLE))

Definition at line 681 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_PERIPHERAL_MODE

#define IS_SMBUS_PERIPHERAL_MODE (   MODE)
Value:

Definition at line 684 of file stm32f4xx_hal_smbus.h.

◆ IS_SMBUS_TRANSFER_OPTIONS_REQUEST

#define IS_SMBUS_TRANSFER_OPTIONS_REQUEST (   REQUEST)
Value:
(((REQUEST) == SMBUS_FIRST_FRAME) || \
((REQUEST) == SMBUS_NEXT_FRAME) || \
((REQUEST) == SMBUS_LAST_FRAME_NO_PEC) || \
((REQUEST) == SMBUS_LAST_FRAME_WITH_PEC))

Definition at line 694 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_10BIT_ADDRESS

#define SMBUS_10BIT_ADDRESS (   __ADDRESS__)    ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)0x00FF)))

Definition at line 654 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_10BIT_HEADER_READ

#define SMBUS_10BIT_HEADER_READ (   __ADDRESS__)    ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)(0x00F1))))

Definition at line 658 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_10BIT_HEADER_WRITE

#define SMBUS_10BIT_HEADER_WRITE (   __ADDRESS__)    ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)0x00F0)))

Definition at line 656 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_7BIT_ADD_READ

#define SMBUS_7BIT_ADD_READ (   __ADDRESS__)    ((uint8_t)((__ADDRESS__) | I2C_OAR1_ADD0))

Definition at line 652 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_7BIT_ADD_WRITE

#define SMBUS_7BIT_ADD_WRITE (   __ADDRESS__)    ((uint8_t)((__ADDRESS__) & (~I2C_OAR1_ADD0)))

Definition at line 650 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_FREQRANGE

#define SMBUS_FREQRANGE (   __PCLK__)    ((__PCLK__)/1000000U)

Definition at line 644 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_GET_PEC_MODE

#define SMBUS_GET_PEC_MODE (   __HANDLE__)    ((__HANDLE__)->Instance->CR1 & I2C_CR1_ENPEC)

Definition at line 660 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_GET_PEC_VALUE

#define SMBUS_GET_PEC_VALUE (   __HANDLE__)    ((__HANDLE__)->XferPEC)

Definition at line 662 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_RISE_TIME

#define SMBUS_RISE_TIME (   __FREQRANGE__)    ( ((__FREQRANGE__) + 1U))

Definition at line 646 of file stm32f4xx_hal_smbus.h.

◆ SMBUS_SPEED_STANDARD

#define SMBUS_SPEED_STANDARD (   __PCLK__,
  __SPEED__ 
)    (((((__PCLK__)/((__SPEED__) << 1U)) & I2C_CCR_CCR) < 4U)? 4U:((__PCLK__) / ((__SPEED__) << 1U)))

Definition at line 648 of file stm32f4xx_hal_smbus.h.

SMBUS_ADDRESSINGMODE_7BIT
#define SMBUS_ADDRESSINGMODE_7BIT
Definition: stm32f4xx_hal_smbus.h:268
SMBUS_GENERALCALL_ENABLE
#define SMBUS_GENERALCALL_ENABLE
Definition: stm32f4xx_hal_smbus.h:287
SMBUS_NEXT_FRAME
#define SMBUS_NEXT_FRAME
Definition: stm32f4xx_hal_smbus.h:333
SMBUS_LAST_FRAME_WITH_PEC
#define SMBUS_LAST_FRAME_WITH_PEC
Definition: stm32f4xx_hal_smbus.h:337
SMBUS_ADDRESSINGMODE_10BIT
#define SMBUS_ADDRESSINGMODE_10BIT
Definition: stm32f4xx_hal_smbus.h:269
SMBUS_PEC_ENABLE
#define SMBUS_PEC_ENABLE
Definition: stm32f4xx_hal_smbus.h:305
SMBUS_FIRST_AND_LAST_FRAME_NO_PEC
#define SMBUS_FIRST_AND_LAST_FRAME_NO_PEC
Definition: stm32f4xx_hal_smbus.h:334
SMBUS_FIRST_AND_LAST_FRAME_WITH_PEC
#define SMBUS_FIRST_AND_LAST_FRAME_WITH_PEC
Definition: stm32f4xx_hal_smbus.h:336
SMBUS_FIRST_FRAME
#define SMBUS_FIRST_FRAME
Definition: stm32f4xx_hal_smbus.h:332
SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE_ARP
#define SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE_ARP
Definition: stm32f4xx_hal_smbus.h:315
SMBUS_PERIPHERAL_MODE_SMBUS_HOST
#define SMBUS_PERIPHERAL_MODE_SMBUS_HOST
Definition: stm32f4xx_hal_smbus.h:313
SMBUS_GENERALCALL_DISABLE
#define SMBUS_GENERALCALL_DISABLE
Definition: stm32f4xx_hal_smbus.h:286
SMBUS_DUALADDRESS_DISABLE
#define SMBUS_DUALADDRESS_DISABLE
Definition: stm32f4xx_hal_smbus.h:277
SMBUS_DUALADDRESS_ENABLE
#define SMBUS_DUALADDRESS_ENABLE
Definition: stm32f4xx_hal_smbus.h:278
SMBUS_NOSTRETCH_DISABLE
#define SMBUS_NOSTRETCH_DISABLE
Definition: stm32f4xx_hal_smbus.h:295
SMBUS_PEC_DISABLE
#define SMBUS_PEC_DISABLE
Definition: stm32f4xx_hal_smbus.h:304
SMBUS_LAST_FRAME_NO_PEC
#define SMBUS_LAST_FRAME_NO_PEC
Definition: stm32f4xx_hal_smbus.h:335
SMBUS_NOSTRETCH_ENABLE
#define SMBUS_NOSTRETCH_ENABLE
Definition: stm32f4xx_hal_smbus.h:296
SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE
#define SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE
Definition: stm32f4xx_hal_smbus.h:314


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