summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/driver/soft_i2c.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/driver/soft_i2c.h b/include/driver/soft_i2c.h
index aff63e3..f3ba14f 100644
--- a/include/driver/soft_i2c.h
+++ b/include/driver/soft_i2c.h
@@ -6,6 +6,9 @@ class SoftI2C {
SoftI2C(const SoftI2C &copy);
unsigned char sda, scl;
+#if SOFTI2C_PULLUP_EXTERNAL || SOFTI2C_PULLUP_FIXED_GPIO
+ unsigned char sda_pull, scl_pull;
+#endif
void start();
void stop();
@@ -13,7 +16,13 @@ class SoftI2C {
unsigned char rx(bool send_ack);
public:
+#if SOFTI2C_PULLUP_EXTERNAL || SOFTI2C_PULLUP_FIXED_GPIO
+ SoftI2C(unsigned char sda, unsigned char scl,
+ unsigned char sda_pull, unsigned char scl_pull) :
+ sda(sda), scl(scl), sda_pull(sda_pull), scl_pull(scl_pull) {}
+#else
SoftI2C(unsigned char sda, unsigned char scl) : sda(sda), scl(scl) {}
+#endif
signed char setup();
void scan(unsigned int *results);
signed char xmit(unsigned char address,