-#define SCL_IN (true) /* Implement me: read SDA pin state */
-#define SDA_IN (true) /* Implement me: read SCL pin state */
+#define SDA_PIN BV(0)
+#define SCL_PIN BV(1)
+
+#define SDA_HI \
+ stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, SDA_PIN, GPIO_MODE_IN_FLOATING, GPIO_SPEED_50MHZ)
+
+#define SDA_LO \
+ stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, SDA_PIN, GPIO_MODE_OUT_PP, GPIO_SPEED_50MHZ)
+
+#define SCL_HI \
+ stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, SCL_PIN, GPIO_MODE_IN_FLOATING, GPIO_SPEED_50MHZ)
+
+#define SCL_LO \
+ stm32_gpioPinConfig((struct stm32_gpio *)GPIOB_BASE, SCL_PIN, GPIO_MODE_OUT_PP, GPIO_SPEED_50MHZ)
+
+
+#define SCL_IN \
+ ({ \
+ (stm32_gpioPinRead((struct stm32_gpio *)GPIOB_BASE, SCL_PIN)); \
+ })
+
+#define SDA_IN \
+ ({ \
+ (stm32_gpioPinRead((struct stm32_gpio *)GPIOB_BASE, SDA_PIN)); \
+ })