1
0
Fork 0
mirror of https://github.com/RobotechLille/cdf2018-principal synced 2024-05-01 19:56:44 +00:00
cdf2018-principal/chef/src/i2c.h

20 lines
384 B
C

#ifndef __I2C_H__
#define __I2C_H__
#include <stdint.h>
#define I2C_DRIVEN_HIGH_RETRIES 3
void initI2C();
int openI2C(uint8_t address);
uint8_t readI2C(int fd, uint8_t reg);
void writeI2C(int fd, uint8_t reg, uint8_t data);
// Get full control over the I2C communication
// Note: Don't use methods from this library
// while in this mode
void lockI2C();
void unlockI2C();
#endif