Macros
Exported_Macros_Helper
Peripheral Driver » LL Driver » I2C » Defines » I2C Exported Macros
Collaboration diagram for Exported_Macros_Helper:

## Macros
#define | __LL_I2C_CONVERT_CLK_SSL_CNT(__PERIPHCLK__, __SPEED__) ((__PERIPHCLK__) / 2 / (__SPEED__))
| Compute CLK_SSL_CNT value according to Peripheral Clock and expected Speed. More...
#define | __LL_I2C_CONVERT_SPEED_MODE(__SPEED__)
| Get Speed Mode according to expected Speed. More...

## Detailed Description

## Macro Definition Documentation

## ◆ __LL_I2C_CONVERT_CLK_SSL_CNT

#define __LL_I2C_CONVERT_CLK_SSL_CNT | ( |  | __PERIPHCLK__,
|  |  | __SPEED__
| ) |  | ((__PERIPHCLK__) / 2 / (__SPEED__))

Compute CLK_SSL_CNT value according to Peripheral Clock and expected Speed.

Parameters

  <strong>PERIPHCLK</strong> | Peripheral Clock frequency used for I2C instance
  <strong>SPEED</strong> | Speed value to achieve

Return values

  CLK_SSL_CNT | value to be used for XS_SCL_HCNT, XS_SCL_LCNT registers where X can be (S, F, H)

Definition at line 342 of file gr55xx_ll_i2c.h.

## ◆ __LL_I2C_CONVERT_SPEED_MODE

#define __LL_I2C_CONVERT_SPEED_MODE | ( |  | __SPEED__ | ) |

Value:
((__SPEED__ <= LL_I2C_SPEED_100K) ? LL_I2C_SPEED_MODE_STANDARD : \
((__SPEED__ <= LL_I2C_SPEED_1000K) ? LL_I2C_SPEED_MODE_FAST : LL_I2C_SPEED_MODE_HIGH))

Get Speed Mode according to expected Speed.

Parameters

  <strong>SPEED</strong> | Speed value to achieve

Return values

  Returned | value can be one of the following values: LL_I2C_SPEED_MODE_STANDARD LL_I2C_SPEED_MODE_FAST LL_I2C_SPEED_MODE_HIGH

Definition at line 352 of file gr55xx_ll_i2c.h.

LL_I2C_SPEED_MODE_FAST
#define LL_I2C_SPEED_MODE_FAST
Fast (400 Kb/s) or Fast Plus mode (1000 Kb/s) of operation.
Definition: gr55xx_ll_i2c.h:198
LL_I2C_SPEED_MODE_HIGH
#define LL_I2C_SPEED_MODE_HIGH
High Speed mode (3.4 Mb/s) of operation.
Definition: gr55xx_ll_i2c.h:199
LL_I2C_SPEED_MODE_STANDARD
#define LL_I2C_SPEED_MODE_STANDARD
Standard Speed mode(0 to 100 Kb/s) of operation.
Definition: gr55xx_ll_i2c.h:197
LL_I2C_SPEED_100K
#define LL_I2C_SPEED_100K
Standard Speed.
Definition: gr55xx_ll_i2c.h:205
LL_I2C_SPEED_1000K
#define LL_I2C_SPEED_1000K
Fast Plus Speed.
Definition: gr55xx_ll_i2c.h:207