X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fdrv%2Fpcf8574.c;h=a61893fc213d2a371675d43bb799713f4e2647a0;hb=6a079bab13ad4bef1bc82bc7597180006a11cc02;hp=41d54e0ca8b234ac9e113c203355f9ab641b8f69;hpb=0b5df3da61b25d2a8d39a76300a2f1ca922d4415;p=bertos.git diff --git a/bertos/drv/pcf8574.c b/bertos/drv/pcf8574.c index 41d54e0c..a61893fc 100644 --- a/bertos/drv/pcf8574.c +++ b/bertos/drv/pcf8574.c @@ -40,7 +40,6 @@ * 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 $ * \author Francesco Sacchi */ @@ -68,7 +67,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; } /**