Prusa MINI Firmware overview
I2C Private macros to check input parameters
Collaboration diagram for I2C Private macros to check input parameters:

Macros

#define IS_I2C_DUTY_CYCLE(CYCLE)
 
#define IS_I2C_ADDRESSING_MODE(ADDRESS)
 
#define IS_I2C_DUAL_ADDRESS(ADDRESS)
 
#define IS_I2C_GENERAL_CALL(CALL)
 
#define IS_I2C_NO_STRETCH(STRETCH)
 
#define IS_I2C_MEMADD_SIZE(SIZE)
 
#define IS_I2C_CLOCK_SPEED(SPEED)   (((SPEED) > 0U) && ((SPEED) <= 400000U))
 
#define IS_I2C_OWN_ADDRESS1(ADDRESS1)   (((ADDRESS1) & 0xFFFFFC00U) == 0U)
 
#define IS_I2C_OWN_ADDRESS2(ADDRESS2)   (((ADDRESS2) & 0xFFFFFF01U) == 0U)
 
#define IS_I2C_TRANSFER_OPTIONS_REQUEST(REQUEST)
 

Detailed Description

Macro Definition Documentation

◆ IS_I2C_DUTY_CYCLE

#define IS_I2C_DUTY_CYCLE (   CYCLE)
Value:
(((CYCLE) == I2C_DUTYCYCLE_2) || \
((CYCLE) == I2C_DUTYCYCLE_16_9))

◆ IS_I2C_ADDRESSING_MODE

#define IS_I2C_ADDRESSING_MODE (   ADDRESS)
Value:
(((ADDRESS) == I2C_ADDRESSINGMODE_7BIT) || \
((ADDRESS) == I2C_ADDRESSINGMODE_10BIT))

◆ IS_I2C_DUAL_ADDRESS

#define IS_I2C_DUAL_ADDRESS (   ADDRESS)
Value:
(((ADDRESS) == I2C_DUALADDRESS_DISABLE) || \
((ADDRESS) == I2C_DUALADDRESS_ENABLE))

◆ IS_I2C_GENERAL_CALL

#define IS_I2C_GENERAL_CALL (   CALL)
Value:
(((CALL) == I2C_GENERALCALL_DISABLE) || \

◆ IS_I2C_NO_STRETCH

#define IS_I2C_NO_STRETCH (   STRETCH)
Value:
(((STRETCH) == I2C_NOSTRETCH_DISABLE) || \
((STRETCH) == I2C_NOSTRETCH_ENABLE))

◆ IS_I2C_MEMADD_SIZE

#define IS_I2C_MEMADD_SIZE (   SIZE)
Value:
(((SIZE) == I2C_MEMADD_SIZE_8BIT) || \
((SIZE) == I2C_MEMADD_SIZE_16BIT))

◆ IS_I2C_CLOCK_SPEED

#define IS_I2C_CLOCK_SPEED (   SPEED)    (((SPEED) > 0U) && ((SPEED) <= 400000U))

◆ IS_I2C_OWN_ADDRESS1

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

◆ IS_I2C_OWN_ADDRESS2

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

◆ IS_I2C_TRANSFER_OPTIONS_REQUEST

#define IS_I2C_TRANSFER_OPTIONS_REQUEST (   REQUEST)
Value:
(((REQUEST) == I2C_FIRST_FRAME) || \
((REQUEST) == I2C_NEXT_FRAME) || \
((REQUEST) == I2C_FIRST_AND_LAST_FRAME) || \
((REQUEST) == I2C_LAST_FRAME))
I2C_LAST_FRAME
#define I2C_LAST_FRAME
Definition: stm32f4xx_hal_i2c.h:296
I2C_DUALADDRESS_ENABLE
#define I2C_DUALADDRESS_ENABLE
Definition: stm32f4xx_hal_i2c.h:249
I2C_MEMADD_SIZE_8BIT
#define I2C_MEMADD_SIZE_8BIT
Definition: stm32f4xx_hal_i2c.h:275
I2C_GENERALCALL_DISABLE
#define I2C_GENERALCALL_DISABLE
Definition: stm32f4xx_hal_i2c.h:257
I2C_FIRST_AND_LAST_FRAME
#define I2C_FIRST_AND_LAST_FRAME
Definition: stm32f4xx_hal_i2c.h:295
I2C_FIRST_FRAME
#define I2C_FIRST_FRAME
Definition: stm32f4xx_hal_i2c.h:293
I2C_DUALADDRESS_DISABLE
#define I2C_DUALADDRESS_DISABLE
Definition: stm32f4xx_hal_i2c.h:248
I2C_GENERALCALL_ENABLE
#define I2C_GENERALCALL_ENABLE
Definition: stm32f4xx_hal_i2c.h:258
I2C_DUTYCYCLE_16_9
#define I2C_DUTYCYCLE_16_9
Definition: stm32f4xx_hal_i2c.h:231
I2C_ADDRESSINGMODE_10BIT
#define I2C_ADDRESSINGMODE_10BIT
Definition: stm32f4xx_hal_i2c.h:240
I2C_MEMADD_SIZE_16BIT
#define I2C_MEMADD_SIZE_16BIT
Definition: stm32f4xx_hal_i2c.h:276
I2C_NOSTRETCH_DISABLE
#define I2C_NOSTRETCH_DISABLE
Definition: stm32f4xx_hal_i2c.h:266
I2C_ADDRESSINGMODE_7BIT
#define I2C_ADDRESSINGMODE_7BIT
Definition: stm32f4xx_hal_i2c.h:239
I2C_NEXT_FRAME
#define I2C_NEXT_FRAME
Definition: stm32f4xx_hal_i2c.h:294
I2C_DUTYCYCLE_2
#define I2C_DUTYCYCLE_2
Definition: stm32f4xx_hal_i2c.h:230
I2C_NOSTRETCH_ENABLE
#define I2C_NOSTRETCH_ENABLE
Definition: stm32f4xx_hal_i2c.h:267