+#endif /* !CONFIG_I2C_DISABLE_OLD_API */
+
+
+/*
+ * New API
+ */
+
+/**
+ * Read PCF8574 \a pcf bit status.
+ * \return the pins status or EOF on errors.
+ */
+int pcf8574_get_2(I2c *i2c, Pcf8574 *pcf)
+{
+ i2c_start_r(i2c, PCF8574ID | ((pcf->addr << 1) & 0xF7), 1, I2C_STOP);
+
+ int data = i2c_getc(i2c);
+
+ if (i2c_error(i2c))
+ data = EOF;
+
+ return data;
+}
+
+/**
+ * Write to PCF8574 \a pcf port \a data.
+ * \return true if ok, false on errors.
+ */
+bool pcf8574_put_3(I2c *i2c, Pcf8574 *pcf, uint8_t data)
+{
+ i2c_start_w(i2c, PCF8574ID | ((pcf->addr << 1) & 0xF7), 1, I2C_STOP);
+ i2c_putc(i2c, data);
+
+ if (i2c_error(i2c))
+ return false;
+
+ return true;
+}
+
+/**
+ * Init a PCF8574 on the bus with addr \a addr.
+ * \return true if device is found, false otherwise.
+ */
+bool pcf8574_init_3(I2c *i2c, Pcf8574 *pcf, pcf8574_addr addr)
+{
+ ASSERT(i2c);
+ pcf->addr = addr;
+
+ return (pcf8574_get(i2c, pcf) != EOF);
+}
+