From e585d5246b7391d35a5dc4b1ce2f79a310570f5e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 10 Apr 2021 11:09:57 +0200 Subject: Allow software and hardware i2c to be used together (e.g. on different pins) --- include/driver/soft_i2c.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/driver/soft_i2c.h b/include/driver/soft_i2c.h index 05fbce6..b581a38 100644 --- a/include/driver/soft_i2c.h +++ b/include/driver/soft_i2c.h @@ -35,6 +35,8 @@ class SoftI2C { unsigned char rx_len, unsigned char *rx_buf); }; +#ifndef DRIVER_HARDWARE_I2C extern SoftI2C i2c; +#endif #endif -- cgit v1.2.3