diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -19,7 +19,7 @@ #include "hih61xx.h" #include "hmc5883.h" -#define VERSION 1.25 +#define VERSION 1.26 // extern void lm75_print_help(void); // extern void lm75_read_all(const char *opts); @@ -57,23 +57,23 @@ void print_help(void) { " i2sensors read_all 1 lm75 0x4f \n" " i2sensors read_one 1 lm75 0x4f 00,-1.35\n" "\n" ); - printf ("Version: v%1.2f, build: %s %s\n\n",VERSION,__DATE__,__TIME__); + printf ("Version: v%1.2f, build: %s %s (%s), TS: %s STDC: %s\n\n",VERSION,__DATE__,__TIME__,__VERSION__,__TIMESTAMP__,__STDC_VERSION__); } void bus_err(int ern){ //printf("I2C communication(rd) error. errno: %d\n",errno); - fprintf (stderr, "Internal error %d at %s, line %d. (function: %s/%s)", ern, __FILE__, __LINE__, __func__, __FUNCTION__); + fprintf (stderr, "Internal error %d at %s, line %d. (function: %s/%s)\n", ern, __FILE__, __LINE__, __func__, __FUNCTION__); } void bus_errr(int ern){ //printf("I2C communication(rd) error. errno: %d\n",errno); - fprintf (stderr, "Internal error %d at %s, line %d. (function: %s/%s)", errno, __FILE__, __LINE__, __func__, __FUNCTION__); + fprintf (stderr, "Internal error %d at %s, line %d. (function: %s/%s)\n", errno, __FILE__, __LINE__, __func__, __FUNCTION__); } uchar *xchg_data (uchar *buf, uint16 wrlen, uint16 waitlen, uint16 rdlen){ //# [buf] = 32 byte if(write(devicef, buf, 1) != 1){ //# write one byte to device perror("I2C communication(wrr) error."); - fprintf (stderr, "I2C error (WR) %d at %s, line %d. (function: %s/%s)", errno, __FILE__, __LINE__, __func__, __FUNCTION__); + fprintf (stderr, "I2C error (WR) %d at %s, line %d. (function: %s/%s)\n", errno, __FILE__, __LINE__, __func__, __FUNCTION__); bus_err(errno); bus_errr(0); } @@ -81,7 +81,7 @@ uchar *xchg_data (uchar *buf, uint16 wrlen, uint16 waitlen, uint16 rdlen){ if(read(devicef, buf, rdlen) != rdlen) { //# read the result perror("I2C communication(rd) error."); - fprintf (stderr, "I2C error (WR) %d at %s, line %d. (function: %s/%s)", errno, __FILE__, __LINE__, __func__, __FUNCTION__); + fprintf (stderr, "I2C error (WR) %d at %s, line %d. (function: %s/%s)\n", errno, __FILE__, __LINE__, __func__, __FUNCTION__); bus_err(errno); bus_errr(0); } |