#include <drv/i2c.h>
-/**
- * Read PCF8574 \a pcf bit status.
- * \return the pins status or EOF on errors.
- */
-int pcf8574_get_1(Pcf8574 *pcf)
+
+INLINE int pcf8574_get_priv(Pcf8574 *pcf)
{
if (!i2c_start_r(PCF8574ID | ((pcf->addr << 1) & 0xF7)))
return EOF;
return data;
}
+
+/**
+ * Read PCF8574 \a pcf bit status.
+ * \return the pins status or EOF on errors.
+ */
+int pcf8574_get_1(Pcf8574 *pcf)
+{
+ return pcf8574_get_priv(pcf);
+}
+
/**
* Write to PCF8574 \a pcf port \a data.
* \return true if ok, false on errors.
{
MOD_CHECK(i2c);
pcf->addr = addr;
- return pcf8574_get(pcf) != EOF;
+ return pcf8574_get_priv(pcf) != EOF;
}