libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
i2c_common.c File Reference
Include dependency graph for i2c_common.c:

Go to the source code of this file.

Functions

void i2c_enable (uint32_t i2c, uint32_t mode)
 Enable I2C peripheral. More...
 
void i2c_disable (uint32_t i2c)
 Disable I2C peripheral. More...
 
void i2c_start_tx (uint32_t i2c)
 Start I2C transmission. More...
 
void i2c_start_rx (uint32_t i2c)
 Start I2C reception. More...
 
void i2c_send_stop (uint32_t i2c)
 Signal stop on I2C line. More...
 
void i2c_set_fast_mode (uint32_t i2c)
 Select Fast (400kHz) mode. More...
 
void i2c_set_standard_mode (uint32_t i2c)
 Select Standard (100kHz) mode. More...
 
void i2c_set_frequency (uint32_t i2c, uint32_t freq)
 Set I2C frequency. More...
 
void i2c_send_data (uint32_t i2c, uint8_t data)
 Write Data to TXD register to be sent. More...
 
uint8_t i2c_get_data (uint32_t i2c)
 Read Data from RXD register. More...
 
void i2c_select_pins (uint32_t i2c, uint32_t scl_pin, uint32_t sda_pin)
 Select GPIO pins to be used by this peripheral. More...
 
void i2c_set_address (uint32_t i2c, uint8_t addr)
 Set 7bit I2C address of the device you wish to communicate with. More...
 
void i2c_resume (uint32_t i2c)
 Resume I2C transaction. More...
 
void i2c_set_shorts (uint32_t i2c, uint32_t shorts)
 Configure event -> task shortcuts. More...