1
0
Fork 0

adds immediate i2c return, fixes ez matrix code

This commit is contained in:
Jack Humbert 2018-06-23 14:18:47 -04:00
parent 6380f83190
commit 7a44ad83fc
5 changed files with 35 additions and 31 deletions

View file

@ -14,6 +14,9 @@ typedef int16_t i2c_status_t;
#define I2C_STATUS_ERROR (-1)
#define I2C_STATUS_TIMEOUT (-2)
#define I2C_TIMEOUT_IMMEDIATE (0)
#define I2C_TIMEOUT_INFINITE (0xFFFF)
void i2c_init(void);
i2c_status_t i2c_start(uint8_t address, uint16_t timeout);
i2c_status_t i2c_write(uint8_t data, uint16_t timeout);