diff --git a/include/driver/soft_i2c.h b/include/driver/soft_i2c.h index f3ba14fc82741996d0cd429493155a2eaed9b0f2..7960df23c80d602f6d19095c267821f80107685d 100644 --- a/include/driver/soft_i2c.h +++ b/include/driver/soft_i2c.h @@ -6,7 +6,7 @@ class SoftI2C { SoftI2C(const SoftI2C ©); unsigned char sda, scl; -#if SOFTI2C_PULLUP_EXTERNAL || SOFTI2C_PULLUP_FIXED_GPIO +#if SOFTI2C_PULLUP_EXTERNAL unsigned char sda_pull, scl_pull; #endif @@ -16,7 +16,7 @@ class SoftI2C { unsigned char rx(bool send_ack); public: -#if SOFTI2C_PULLUP_EXTERNAL || SOFTI2C_PULLUP_FIXED_GPIO +#if SOFTI2C_PULLUP_EXTERNAL 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) {} diff --git a/src/driver/soft_i2c.cc b/src/driver/soft_i2c.cc index 652328695c6c8fc14afbd559170fb7ebde799ae4..e16c4a11b24ec5c885aab9b94d42b042595f4e3d 100644 --- a/src/driver/soft_i2c.cc +++ b/src/driver/soft_i2c.cc @@ -46,10 +46,8 @@ signed char SoftI2C::setup() #endif #ifdef SOFTI2C_PULLUP_FIXED_GPIO #if MULTIPASS_ARCH_msp430fr5969lp - gpio.output(GPIO::p1_4); - gpio.output(GPIO::p1_5); - gpio.write(GPIO::p1_4, 1); - gpio.write(GPIO::p1_5, 1); + gpio.output(GPIO::p1_4, 1); + gpio.output(GPIO::p1_5, 1); #else #error "softi2c_pullup=gpio not supported on this architecture" #endif /* MULTIPASS_ARCH_* */