From 0093d3d761e60a31bb2a15a5859dbd0c08ef9999 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 22 Oct 2021 00:49:58 +0100 Subject: Initial USB2422 driver (#14835) --- tmk_core/protocol/arm_atsam/i2c_master.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tmk_core/protocol/arm_atsam/i2c_master.h') diff --git a/tmk_core/protocol/arm_atsam/i2c_master.h b/tmk_core/protocol/arm_atsam/i2c_master.h index 68773f213f..e11235d447 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.h +++ b/tmk_core/protocol/arm_atsam/i2c_master.h @@ -101,4 +101,13 @@ void i2c0_init(void); uint8_t i2c0_transmit(uint8_t address, uint8_t *data, uint16_t length, uint16_t timeout); void i2c0_stop(void); +// Terrible interface compatiblity... +#define I2C_STATUS_SUCCESS (0) +#define I2C_STATUS_ERROR (-1) + +typedef int16_t i2c_status_t; + +void i2c_init(void); +i2c_status_t i2c_transmit(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout); + #endif // _I2C_MASTER_H_ -- cgit v1.2.3