diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-07-22 16:24:43 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-07-22 16:55:41 +0200 |
commit | 5055ee55d1330b52182a35378f5b4f8055cefc54 (patch) | |
tree | c05e12595509b2a744cba542dcb5eda879345f20 /accel.c | |
parent | bedbcdc4de680720deff4b6e113a3ec1a0690482 (diff) | |
download | hourglass-5055ee55d1330b52182a35378f5b4f8055cefc54.tar.gz hourglass-5055ee55d1330b52182a35378f5b4f8055cefc54.tar.bz2 hourglass-5055ee55d1330b52182a35378f5b4f8055cefc54.zip |
Convert printf into puts
Removes ~1.5k code size, still not working.
Diffstat (limited to 'accel.c')
-rw-r--r-- | accel.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -75,10 +75,10 @@ void accelStart () { if (!twRequest (TWM_WRITE, LIS302DL, LIS302DL_CTRLREG1, data, sizeof (data)/sizeof (*data))) { - printf ("cannot start write\n"); + puts ("cannot start write"); } sleepwhile (twr.status == TWST_WAIT); - printf ("final twi status was %i\n", twr.status); + puts ("accelStart done"); } /* register shake gesture @@ -162,7 +162,8 @@ bool accelProcess () { reading = false; return true; } else if (twr.status == TWST_ERR) { - printf ("accel i2c error %x at step %i\n", twr.error, twr.step); + puts ("accel i2c error: "); + fwrite ((void *) &twr.error, sizeof (twr.error), 1, stdout); reading = false; } } else { @@ -170,7 +171,7 @@ bool accelProcess () { /* new data available in device buffer and bus is free */ if (!twRequest (TWM_READ, LIS302DL, LIS302DL_OUTZ, (uint8_t *) &zval, sizeof (zval))) { - printf ("cannot start read\n"); + puts ("cannot start read"); } else { reading = true; } |