blob: 6721bb8e3b2ef0f0fecc60badb34463d2f98329c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#ifndef I2C_SLAVE_H_
#define I2C_SLAVE_H_
#include "util.h"
struct i2c_slave_ops {
uint8_t (*transmit)(bool start);
bool (*receive)(bool start, uint8_t byte);
};
void i2cs_add_slave(uint8_t addr, const struct i2c_slave_ops __flash *ops);
void i2cs_init(void);
#endif /* I2C_SLAVE_H_ */
|