STM32F10x library
i2c.h
1 #ifndef I2C_H
2 #define I2C_H
3 
4 #include <stm32f10x_i2c.h>
5 
6 #define I2C_100K 100000
7 
8 void i2c_init(uint8_t devnum, const uint32_t clkspd);
9 uint8_t i2c_rd(uint8_t devnum, uint8_t adr, uint8_t* buf, uint32_t len);
10 uint8_t i2c_wr(uint8_t devnum, uint8_t adr, const uint8_t* buf, uint32_t len);
11 
12 #endif
uint8_t i2c_wr(uint8_t devnum, uint8_t adr, const uint8_t *buf, uint32_t nbyte)
Write to I2C.
Definition: i2c.c:197
void i2c_init(uint8_t devnum, const uint32_t clkspd)
Init I2C.
Definition: i2c.c:55
uint8_t i2c_rd(uint8_t devnum, uint8_t adr, uint8_t *buf, uint32_t nbyte)
Read from I2C.
Definition: i2c.c:97