X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fpcf8574.c;h=71150427c05cf64d66cae6ceab758304fb9ab646;hb=32d1445272120a254d77ce8d1af1f527da7a2c17;hp=a9ed659e29191ecf32327a06f27e8bf7d634de54;hpb=830e0e12736975e4da0440cc225ff6a4e98d45ca;p=bertos.git diff --git a/bertos/drv/pcf8574.c b/bertos/drv/pcf8574.c index a9ed659e..71150427 100644 --- a/bertos/drv/pcf8574.c +++ b/bertos/drv/pcf8574.c @@ -40,11 +40,12 @@ * each pin as input or output, see datasheet on how this * is achieved. * - * \version $Id: ft245rl.c 22301 2008-09-09 16:53:17Z batt $ + * \version $Id$ * \author Francesco Sacchi */ #include "pcf8574.h" +#include #include /** @@ -67,7 +68,9 @@ int pcf8574_get(Pcf8574 *pcf) */ bool pcf8574_put(Pcf8574 *pcf, uint8_t data) { - return i2c_start_w(PCF8574ID | ((pcf->addr << 1) & 0xF7)) && i2c_put(data) && i2c_stop(); + bool res = i2c_start_w(PCF8574ID | ((pcf->addr << 1) & 0xF7)) && i2c_put(data); + i2c_stop(); + return res; } /**