libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
I2C frequency constants
Collaboration diagram for I2C frequency constants:

Macros

#define I2C_FREQUENCY_100K   (0x01980000)
 100kHz More...
 
#define I2C_FREQUENCY_250K   (0x04000000)
 250kHz More...
 
#define I2C_FREQUENCY_390K   (0x06200000)
 390kHz More...
 
#define I2C_FREQUENCY_400K   (0x06680000)
 400kHz More...
 

Detailed Description

Macro Definition Documentation

◆ I2C_FREQUENCY_100K

#define I2C_FREQUENCY_100K   (0x01980000)

100kHz

Definition at line 122 of file common/i2c.h.

◆ I2C_FREQUENCY_250K

#define I2C_FREQUENCY_250K   (0x04000000)

250kHz

Definition at line 124 of file common/i2c.h.

◆ I2C_FREQUENCY_390K

#define I2C_FREQUENCY_390K   (0x06200000)

390kHz

Note
: This value is not documented in datasheet. It provides ~390kHz clock with correct timing.

Definition at line 129 of file common/i2c.h.

◆ I2C_FREQUENCY_400K

#define I2C_FREQUENCY_400K   (0x06680000)

400kHz

Note
: According to datasheet, there is HW bug which prevents MCU from generating correct timings, therefore it might be unusable. Use I2C_FREQUENCY_390K instead, if this affects you.

Definition at line 136 of file common/i2c.h.