aboutsummaryrefslogtreecommitdiff
path: root/gyro.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2014-07-22 16:24:43 +0200
committerLars-Dominik Braun <lars@6xq.net>2014-07-22 16:55:41 +0200
commit5055ee55d1330b52182a35378f5b4f8055cefc54 (patch)
treec05e12595509b2a744cba542dcb5eda879345f20 /gyro.c
parentbedbcdc4de680720deff4b6e113a3ec1a0690482 (diff)
downloadhourglass-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 'gyro.c')
-rw-r--r--gyro.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gyro.c b/gyro.c
index 6a32ef3..35ec76b 100644
--- a/gyro.c
+++ b/gyro.c
@@ -56,10 +56,10 @@ void gyroStart () {
if (!twRequest (TWM_WRITE, L3GD20, L3GD20_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 ("gyroStart done");
}
/* calculate ticks for z rotation
@@ -95,7 +95,7 @@ bool gyroProcess () {
reading = false;
return true;
} else if (twr.status == TWST_ERR) {
- printf ("gyro i2c error\n");
+ puts ("gyro i2c error");
reading = false;
}
} else {
@@ -103,7 +103,7 @@ bool gyroProcess () {
/* new data available in device buffer and bus is free */
if (!twRequest (TWM_READ, L3GD20, L3GD20_OUTZ,
(uint8_t *) &zval, sizeof (zval))) {
- printf ("cannot start read\n");
+ puts ("cannot start read");
} else {
reading = true;
}