STM32F439xx HAL User Manual
|
Modules | |
I2C Private macros to check input parameters | |
Defines | |
#define | I2C_FREQRANGE(__PCLK__) ((__PCLK__)/1000000U) |
#define | I2C_RISE_TIME(__FREQRANGE__, __SPEED__) (((__SPEED__) <= 100000U) ? ((__FREQRANGE__) + 1U) : ((((__FREQRANGE__) * 300U) / 1000U) + 1U)) |
#define | I2C_SPEED_STANDARD(__PCLK__, __SPEED__) (((((__PCLK__)/((__SPEED__) << 1U)) & I2C_CCR_CCR) < 4U)? 4U:((__PCLK__) / ((__SPEED__) << 1U))) |
#define | I2C_SPEED_FAST(__PCLK__, __SPEED__, __DUTYCYCLE__) (((__DUTYCYCLE__) == I2C_DUTYCYCLE_2)? ((__PCLK__) / ((__SPEED__) * 3U)) : (((__PCLK__) / ((__SPEED__) * 25U)) | I2C_DUTYCYCLE_16_9)) |
#define | I2C_SPEED(__PCLK__, __SPEED__, __DUTYCYCLE__) |
#define | I2C_7BIT_ADD_WRITE(__ADDRESS__) ((uint8_t)((__ADDRESS__) & (~I2C_OAR1_ADD0))) |
#define | I2C_7BIT_ADD_READ(__ADDRESS__) ((uint8_t)((__ADDRESS__) | I2C_OAR1_ADD0)) |
#define | I2C_10BIT_ADDRESS(__ADDRESS__) ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)0x00FF))) |
#define | I2C_10BIT_HEADER_WRITE(__ADDRESS__) ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)0x00F0))) |
#define | I2C_10BIT_HEADER_READ(__ADDRESS__) ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)(0x00F1)))) |
#define | I2C_MEM_ADD_MSB(__ADDRESS__) ((uint8_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0xFF00)) >> 8))) |
#define | I2C_MEM_ADD_LSB(__ADDRESS__) ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)0x00FF))) |
#define I2C_10BIT_ADDRESS | ( | __ADDRESS__ | ) | ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)0x00FF))) |
Definition at line 588 of file stm32f4xx_hal_i2c.h.
Referenced by I2C_Master_ADD10(), I2C_MasterRequestRead(), and I2C_MasterRequestWrite().
#define I2C_10BIT_HEADER_READ | ( | __ADDRESS__ | ) | ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)(0x00F1)))) |
Definition at line 590 of file stm32f4xx_hal_i2c.h.
Referenced by I2C_Master_SB(), and I2C_MasterRequestRead().
#define I2C_10BIT_HEADER_WRITE | ( | __ADDRESS__ | ) | ((uint8_t)((uint16_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0x0300)) >> 7) | (uint16_t)0x00F0))) |
Definition at line 589 of file stm32f4xx_hal_i2c.h.
Referenced by I2C_Master_SB(), I2C_MasterRequestRead(), and I2C_MasterRequestWrite().
#define I2C_7BIT_ADD_READ | ( | __ADDRESS__ | ) | ((uint8_t)((__ADDRESS__) | I2C_OAR1_ADD0)) |
Definition at line 586 of file stm32f4xx_hal_i2c.h.
Referenced by I2C_Master_SB(), I2C_MasterRequestRead(), and I2C_RequestMemoryRead().
#define I2C_7BIT_ADD_WRITE | ( | __ADDRESS__ | ) | ((uint8_t)((__ADDRESS__) & (~I2C_OAR1_ADD0))) |
Definition at line 585 of file stm32f4xx_hal_i2c.h.
Referenced by HAL_I2C_IsDeviceReady(), I2C_Master_SB(), I2C_MasterRequestWrite(), I2C_RequestMemoryRead(), and I2C_RequestMemoryWrite().
#define I2C_FREQRANGE | ( | __PCLK__ | ) | ((__PCLK__)/1000000U) |
Definition at line 577 of file stm32f4xx_hal_i2c.h.
Referenced by HAL_I2C_Init().
#define I2C_MEM_ADD_LSB | ( | __ADDRESS__ | ) | ((uint8_t)((uint16_t)((__ADDRESS__) & (uint16_t)0x00FF))) |
Definition at line 593 of file stm32f4xx_hal_i2c.h.
Referenced by I2C_MasterTransmit_TXE(), I2C_RequestMemoryRead(), and I2C_RequestMemoryWrite().
#define I2C_MEM_ADD_MSB | ( | __ADDRESS__ | ) | ((uint8_t)((uint16_t)(((uint16_t)((__ADDRESS__) & (uint16_t)0xFF00)) >> 8))) |
Definition at line 592 of file stm32f4xx_hal_i2c.h.
Referenced by I2C_MasterTransmit_TXE(), I2C_RequestMemoryRead(), and I2C_RequestMemoryWrite().
#define I2C_RISE_TIME | ( | __FREQRANGE__, | |
__SPEED__ | |||
) | (((__SPEED__) <= 100000U) ? ((__FREQRANGE__) + 1U) : ((((__FREQRANGE__) * 300U) / 1000U) + 1U)) |
Definition at line 578 of file stm32f4xx_hal_i2c.h.
Referenced by HAL_I2C_Init().
#define I2C_SPEED | ( | __PCLK__, | |
__SPEED__, | |||
__DUTYCYCLE__ | |||
) |
(((__SPEED__) <= 100000U)? (I2C_SPEED_STANDARD((__PCLK__), (__SPEED__))) : \ ((I2C_SPEED_FAST((__PCLK__), (__SPEED__), (__DUTYCYCLE__)) & I2C_CCR_CCR) == 0U)? 1U : \ ((I2C_SPEED_FAST((__PCLK__), (__SPEED__), (__DUTYCYCLE__))) | I2C_CCR_FS))
Definition at line 581 of file stm32f4xx_hal_i2c.h.
Referenced by HAL_I2C_Init().
#define I2C_SPEED_FAST | ( | __PCLK__, | |
__SPEED__, | |||
__DUTYCYCLE__ | |||
) | (((__DUTYCYCLE__) == I2C_DUTYCYCLE_2)? ((__PCLK__) / ((__SPEED__) * 3U)) : (((__PCLK__) / ((__SPEED__) * 25U)) | I2C_DUTYCYCLE_16_9)) |
Definition at line 580 of file stm32f4xx_hal_i2c.h.
#define I2C_SPEED_STANDARD | ( | __PCLK__, | |
__SPEED__ | |||
) | (((((__PCLK__)/((__SPEED__) << 1U)) & I2C_CCR_CCR) < 4U)? 4U:((__PCLK__) / ((__SPEED__) << 1U))) |
Definition at line 579 of file stm32f4xx_hal_i2c.h.