diff options
author | Gergő J. Miklós | 2020-10-09 02:39:29 +0200 |
---|---|---|
committer | Gergő J. Miklós | 2020-10-09 02:39:29 +0200 |
commit | 6bbb8b9e6639125b5539bd8d14e422a9c79c3f0a (patch) | |
tree | 852c56cc717c11260eaa8ddd4e684cb20f08ea64 /src | |
parent | e6d02c5809381911236d6384ff5826e419de9939 (diff) | |
download | i2sensors-6bbb8b9e6639125b5539bd8d14e422a9c79c3f0a.tar.gz i2sensors-6bbb8b9e6639125b5539bd8d14e422a9c79c3f0a.zip |
Makefile
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -18,7 +18,7 @@ #include "hih61xx.h" #include "hmc5883.h" -#define VERSION 1.22 +#define VERSION 1.24 // extern void lm75_print_help(void); // extern void lm75_read_all(const char *opts); @@ -66,8 +66,8 @@ void bus_err(int ern){ uchar *xchg_data (uchar *buf, uint16 wrlen, uint16 waitlen, uint16 rdlen){ //# [buf] = 32 byte - if(write(devicef, buf, wrlen) != wrlen){ //# write one byte to device - perror("I2C communication(wr) error."); + if(write(devicef, buf, 1) != 1){ //# write one byte to device + perror("I2C communication(wrr) error."); printf("errno: %d\n",errno); } usleep(waitlen*1000); //# Wait 10ms for reading |