RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Macros

Macros

#define IS_SMBUS_ANALOG_FILTER(FILTER)
 
#define IS_SMBUS_DIGITAL_FILTER(FILTER)   ((FILTER) <= 0x0000000FU)
 
#define IS_SMBUS_ADDRESSING_MODE(MODE)
 
#define IS_SMBUS_DUAL_ADDRESS(ADDRESS)
 
#define IS_SMBUS_OWN_ADDRESS2_MASK(MASK)
 
#define IS_SMBUS_GENERAL_CALL(CALL)
 
#define IS_SMBUS_NO_STRETCH(STRETCH)
 
#define IS_SMBUS_PEC(PEC)
 
#define IS_SMBUS_PERIPHERAL_MODE(MODE)
 
#define IS_SMBUS_TRANSFER_MODE(MODE)
 
#define IS_SMBUS_TRANSFER_REQUEST(REQUEST)
 
#define IS_SMBUS_TRANSFER_OPTIONS_REQUEST(REQUEST)
 
#define IS_SMBUS_TRANSFER_OTHER_OPTIONS_REQUEST(REQUEST)
 
#define SMBUS_RESET_CR1(__HANDLE__)
 
#define SMBUS_RESET_CR2(__HANDLE__)
 
#define SMBUS_GENERATE_START(__ADDMODE__, __ADDRESS__)
 
#define SMBUS_GET_ADDR_MATCH(__HANDLE__)   (((__HANDLE__)->Instance->ISR & I2C_ISR_ADDCODE) >> 17U)
 
#define SMBUS_GET_DIR(__HANDLE__)   (((__HANDLE__)->Instance->ISR & I2C_ISR_DIR) >> 16U)
 
#define SMBUS_GET_STOP_MODE(__HANDLE__)   ((__HANDLE__)->Instance->CR2 & I2C_CR2_AUTOEND)
 
#define SMBUS_GET_PEC_MODE(__HANDLE__)   ((__HANDLE__)->Instance->CR2 & I2C_CR2_PECBYTE)
 
#define SMBUS_GET_ALERT_ENABLED(__HANDLE__)   ((__HANDLE__)->Instance->CR1 & I2C_CR1_ALERTEN)
 
#define SMBUS_CHECK_FLAG(__ISR__, __FLAG__)
 
#define SMBUS_CHECK_IT_SOURCE(__CR1__, __IT__)   ((((__CR1__) & (__IT__)) == (__IT__)) ? SET : RESET)
 
#define IS_SMBUS_OWN_ADDRESS1(ADDRESS1)   ((ADDRESS1) <= 0x000003FFU)
 
#define IS_SMBUS_OWN_ADDRESS2(ADDRESS2)   ((ADDRESS2) <= (uint16_t)0x00FFU)
 

Detailed Description

Macro Definition Documentation

◆ IS_SMBUS_ADDRESSING_MODE

#define IS_SMBUS_ADDRESSING_MODE (   MODE)
Value:
(((MODE) == SMBUS_ADDRESSINGMODE_7BIT) || \
((MODE) == SMBUS_ADDRESSINGMODE_10BIT))

◆ IS_SMBUS_ANALOG_FILTER

#define IS_SMBUS_ANALOG_FILTER (   FILTER)
Value:
(((FILTER) == SMBUS_ANALOGFILTER_ENABLE) || \
((FILTER) == SMBUS_ANALOGFILTER_DISABLE))

◆ IS_SMBUS_DUAL_ADDRESS

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

◆ IS_SMBUS_GENERAL_CALL

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

◆ IS_SMBUS_NO_STRETCH

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

◆ IS_SMBUS_OWN_ADDRESS2_MASK

#define IS_SMBUS_OWN_ADDRESS2_MASK (   MASK)
Value:
(((MASK) == SMBUS_OA2_NOMASK) || \
((MASK) == SMBUS_OA2_MASK01) || \
((MASK) == SMBUS_OA2_MASK02) || \
((MASK) == SMBUS_OA2_MASK03) || \
((MASK) == SMBUS_OA2_MASK04) || \
((MASK) == SMBUS_OA2_MASK05) || \
((MASK) == SMBUS_OA2_MASK06) || \
((MASK) == SMBUS_OA2_MASK07))

◆ IS_SMBUS_PEC

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

◆ IS_SMBUS_PERIPHERAL_MODE

#define IS_SMBUS_PERIPHERAL_MODE (   MODE)
Value:
(((MODE) == SMBUS_PERIPHERAL_MODE_SMBUS_HOST) || \
((MODE) == SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE) || \
((MODE) == SMBUS_PERIPHERAL_MODE_SMBUS_SLAVE_ARP))

◆ IS_SMBUS_TRANSFER_MODE

#define IS_SMBUS_TRANSFER_MODE (   MODE)
Value:
(((MODE) == SMBUS_RELOAD_MODE) || \
((MODE) == SMBUS_AUTOEND_MODE) || \
((MODE) == SMBUS_SOFTEND_MODE) || \
((MODE) == SMBUS_SENDPEC_MODE) || \
((MODE) == (SMBUS_RELOAD_MODE | SMBUS_SENDPEC_MODE)) || \
((MODE) == (SMBUS_AUTOEND_MODE | SMBUS_SENDPEC_MODE)) || \
((MODE) == (SMBUS_AUTOEND_MODE | SMBUS_RELOAD_MODE)) || \
((MODE) == (SMBUS_AUTOEND_MODE | SMBUS_SENDPEC_MODE | \
SMBUS_RELOAD_MODE )))

◆ IS_SMBUS_TRANSFER_OPTIONS_REQUEST

#define IS_SMBUS_TRANSFER_OPTIONS_REQUEST (   REQUEST)
Value:
(IS_SMBUS_TRANSFER_OTHER_OPTIONS_REQUEST(REQUEST) || \
((REQUEST) == SMBUS_FIRST_FRAME) || \
((REQUEST) == SMBUS_NEXT_FRAME) || \
((REQUEST) == SMBUS_FIRST_AND_LAST_FRAME_NO_PEC) || \
((REQUEST) == SMBUS_LAST_FRAME_NO_PEC) || \
((REQUEST) == SMBUS_FIRST_FRAME_WITH_PEC) || \
((REQUEST) == SMBUS_FIRST_AND_LAST_FRAME_WITH_PEC) || \
((REQUEST) == SMBUS_LAST_FRAME_WITH_PEC))

◆ IS_SMBUS_TRANSFER_OTHER_OPTIONS_REQUEST

#define IS_SMBUS_TRANSFER_OTHER_OPTIONS_REQUEST (   REQUEST)
Value:
(((REQUEST) == SMBUS_OTHER_FRAME_NO_PEC) || \
((REQUEST) == SMBUS_OTHER_AND_LAST_FRAME_NO_PEC) || \
((REQUEST) == SMBUS_OTHER_FRAME_WITH_PEC) || \
((REQUEST) == SMBUS_OTHER_AND_LAST_FRAME_WITH_PEC))

◆ IS_SMBUS_TRANSFER_REQUEST

#define IS_SMBUS_TRANSFER_REQUEST (   REQUEST)
Value:
(((REQUEST) == SMBUS_GENERATE_STOP) || \
((REQUEST) == SMBUS_GENERATE_START_READ) || \
((REQUEST) == SMBUS_GENERATE_START_WRITE) || \
((REQUEST) == SMBUS_NO_STARTSTOP))

◆ SMBUS_CHECK_FLAG

#define SMBUS_CHECK_FLAG (   __ISR__,
  __FLAG__ 
)
Value:
((((__ISR__) & ((__FLAG__) & SMBUS_FLAG_MASK)) == \
((__FLAG__) & SMBUS_FLAG_MASK)) ? SET : RESET)
#define SMBUS_FLAG_MASK
Check whether the specified SMBUS flag is set or not.
Definition: stm32h7xx_hal_smbus.h:525

◆ SMBUS_GENERATE_START

#define SMBUS_GENERATE_START (   __ADDMODE__,
  __ADDRESS__ 
)
Value:
(((__ADDMODE__) == SMBUS_ADDRESSINGMODE_7BIT) ? \
(uint32_t)((((uint32_t)(__ADDRESS__) & (I2C_CR2_SADD)) | \
(~I2C_CR2_RD_WRN)) : \
(uint32_t)((((uint32_t)(__ADDRESS__) & \
(I2C_CR2_START)) & (~I2C_CR2_RD_WRN)))
#define I2C_CR2_SADD
Definition: stm32h723xx.h:13009
#define I2C_CR2_ADD10
Definition: stm32h723xx.h:13015
#define I2C_CR2_START
Definition: stm32h723xx.h:13021
#define I2C_CR2_AUTOEND
Definition: stm32h723xx.h:13036

◆ SMBUS_RESET_CR1

#define SMBUS_RESET_CR1 (   __HANDLE__)
Value:
((__HANDLE__)->Instance->CR1 &= \
(uint32_t)~((uint32_t)(I2C_CR1_SMBHEN | I2C_CR1_SMBDEN | \
#define I2C_CR1_PECEN
Definition: stm32h723xx.h:13004
#define I2C_CR1_SMBDEN
Definition: stm32h723xx.h:12998
#define I2C_CR1_SMBHEN
Definition: stm32h723xx.h:12995

◆ SMBUS_RESET_CR2

#define SMBUS_RESET_CR2 (   __HANDLE__)
Value:
((__HANDLE__)->Instance->CR2 &= \
(uint32_t)~((uint32_t)(I2C_CR2_SADD | I2C_CR2_HEAD10R | \
#define I2C_CR2_RELOAD
Definition: stm32h723xx.h:13033
#define I2C_CR2_NBYTES
Definition: stm32h723xx.h:13030
#define I2C_CR2_RD_WRN
Definition: stm32h723xx.h:13012
#define I2C_CR2_HEAD10R
Definition: stm32h723xx.h:13018