summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/soft_i2c.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/driver/soft_i2c.cc b/src/driver/soft_i2c.cc
index 6c36b6f..76042f2 100644
--- a/src/driver/soft_i2c.cc
+++ b/src/driver/soft_i2c.cc
@@ -20,10 +20,10 @@ volatile unsigned char timer_done = 0;
#define SCL_HIGH gpio.input(scl, 1)
#define SCL_LOW gpio.output(scl, 0)
#elif SOFTI2C_PULLUP_EXTERNAL
-#define SDA_HIGH do { gpio.input(sda); gpio.write(sda_pull, 1); } while (0)
-#define SDA_LOW do { gpio.write(sda_pull, 0); gpio.output(sda); } while (0)
-#define SCL_HIGH do { gpio.input(scl); gpio.write(scl_pull, 1); } while (0)
-#define SCL_LOW do { gpio.write(scl_pull, 0); gpio.output(scl); } while (0)
+#define SDA_HIGH { gpio.input(sda); gpio.write(sda_pull, 1); }
+#define SDA_LOW { gpio.write(sda_pull, 0); gpio.output(sda); }
+#define SCL_HIGH { gpio.input(scl); gpio.write(scl_pull, 1); }
+#define SCL_LOW { gpio.write(scl_pull, 0); gpio.output(scl); }
#else /* !SOFTI2C_PULLUP_{INTERNAL,EXTERNAL} */
#define SDA_HIGH gpio.input(sda)
#define SDA_LOW gpio.output(sda)