3cd035d863
Reqrite bitbanging I2C implementation. New code improves stop/start condition handling, and gives more accurate input line level. Introduce intermediate abstraction layer for I2C bitbanging that is not connected via a GPIO port. Signed-off-by: Paul Brook <paul@codesourcery.com>
15 lines
310 B
C
15 lines
310 B
C
#ifndef BITBANG_I2C_H
|
|
#define BITBANG_I2C_H
|
|
|
|
#include "i2c.h"
|
|
|
|
typedef struct bitbang_i2c_interface bitbang_i2c_interface;
|
|
|
|
#define BITBANG_I2C_SDA 0
|
|
#define BITBANG_I2C_SCL 1
|
|
|
|
bitbang_i2c_interface *bitbang_i2c_init(i2c_bus *bus);
|
|
int bitbang_i2c_set(bitbang_i2c_interface *i2c, int line, int level);
|
|
|
|
#endif
|