diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-01-13 13:18:48 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-01-13 13:18:48 +0100 |
commit | e748efd36ae4fb41f24baa4cc79d674dba2a8c3f (patch) | |
tree | f2425e5dc1aff9f8874da55941de0dbfe436c1c6 /accel.c | |
parent | ebc6f6a6cf20a25c0dd2cefaa9c86285509a3407 (diff) | |
download | hourglass-e748efd36ae4fb41f24baa4cc79d674dba2a8c3f.tar.gz hourglass-e748efd36ae4fb41f24baa4cc79d674dba2a8c3f.tar.bz2 hourglass-e748efd36ae4fb41f24baa4cc79d674dba2a8c3f.zip |
Remove debugging puts/fwrite
We’re tight on SRAM and the stack seems overflow from time to time. Removing
the strings should give us some breathing room.
Diffstat (limited to 'accel.c')
-rw-r--r-- | accel.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -85,11 +85,10 @@ void accelStart () { if (!twRequest (TWM_WRITE, LIS302DL, LIS302DL_CTRLREG1, data, sizeof (data)/sizeof (*data))) { - puts ("cannot start write"); + assert (0); } sleepwhile (twr.status == TWST_WAIT); assert (twr.status == TWST_OK); - puts ("accelStart done"); disableWakeup (WAKE_I2C); } @@ -166,15 +165,14 @@ bool accelProcess () { /* new data transfered */ return true; } else if (twr.status == TWST_ERR) { - puts ("accel i2c error: "); - fwrite ((void *) &twr.error, sizeof (twr.error), 1, stdout); + assert (0); } } else { if (shouldWakeup (WAKE_ACCEL) && twr.status == TWST_OK) { /* new data available in device buffer and bus is free */ if (!twRequest (TWM_READ, LIS302DL, LIS302DL_OUTZ, (uint8_t *) &zval, sizeof (zval))) { - puts ("cannot start read"); + assert (0); } else { /* wakeup source is disabled by isr to prevent race condition */ reading = true; |