Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame^] | 1 | #ifndef __I2C_LIB_H__
|
| 2 | #define __I2C_LIB_H__
|
| 3 |
|
| 4 | #ifdef __cplusplus
|
| 5 | extern "C" {
|
| 6 | #endif
|
| 7 | int i2clib_open(const char *device);
|
| 8 | void i2clib_close(int handle);
|
| 9 | int i2clib_read(int handle, uint8_t dev_addr, char *recv_buf, int32_t recv_size);
|
| 10 | int i2clib_write(int handle, uint8_t dev_addr, const char *send_buf, int32_t send_size);
|
| 11 | int i2clib_writeread(int handle, uint8_t dev_addr, const char *send_buf, int32_t send_size, char *recv_buf, int32_t recv_size);
|
| 12 | #ifdef __cplusplus
|
| 13 | }
|
| 14 | #endif
|
| 15 |
|
| 16 | #endif /* __I2C_LIB_H__ */ |