summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/arm_atsam/i2c_master.h
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-10-22 00:49:58 +0100
committerGitHub <noreply@github.com>2021-10-22 00:49:58 +0100
commit0093d3d761e60a31bb2a15a5859dbd0c08ef9999 (patch)
tree144db2e99236bd0fc2654cbeaecc57bbb5409b39 /tmk_core/protocol/arm_atsam/i2c_master.h
parent1b1f3ec68ee1e7abe436a46bcfedf30f21330aef (diff)
Initial USB2422 driver (#14835)
Diffstat (limited to 'tmk_core/protocol/arm_atsam/i2c_master.h')
-rw-r--r--tmk_core/protocol/arm_atsam/i2c_master.h9
1 files changed, 9 insertions, 0 deletions
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_