projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modify the getString function
[bertos.git]
/
bertos
/
drv
/
pcf8574.c
diff --git
a/bertos/drv/pcf8574.c
b/bertos/drv/pcf8574.c
index a9ed659e29191ecf32327a06f27e8bf7d634de54..c4477efce2df8c9d39c41048c315e82c41e81129 100644
(file)
--- a/
bertos/drv/pcf8574.c
+++ b/
bertos/drv/pcf8574.c
@@
-45,6
+45,7
@@
*/
#include "pcf8574.h"
*/
#include "pcf8574.h"
+#include <cfg/module.h>
#include <drv/i2c.h>
/**
#include <drv/i2c.h>
/**
@@
-67,7
+68,9
@@
int pcf8574_get(Pcf8574 *pcf)
*/
bool pcf8574_put(Pcf8574 *pcf, uint8_t data)
{
*/
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;
}
/**
}
/**