aboutsummaryrefslogtreecommitdiff
path: root/i2c.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 /i2c.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 'i2c.c')
-rw-r--r--i2c.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/i2c.c b/i2c.c
index 84479a1..d7e5058 100644
--- a/i2c.c
+++ b/i2c.c
@@ -2,7 +2,6 @@
#include <util/twi.h>
#include <avr/interrupt.h>
#include <stdlib.h>
-#include <assert.h>
#include "i2c.h"
#include "common.h"
@@ -40,7 +39,7 @@ static void twWaitRaw () {
static bool twWriteRaw (const uint8_t data) {
TWDR = data;
if (TWCR & (1 << TWWC)) {
- printf("write collision\n");
+ puts ("write collision");
return false;
} else {
return true;
@@ -137,7 +136,7 @@ static void twIntWrite () {
break;
default:
- printf ("nope\n");
+ assert (0 && "nope");
break;
}
}
@@ -237,7 +236,7 @@ static void twIntRead () {
break;
default:
- printf ("twIntRead: nope\n");
+ assert (0 && "twIntRead: nope\n");
break;
}
}
@@ -253,7 +252,7 @@ ISR(TWI_vect) {
break;
default:
- printf ("nope\n");
+ assert (0 && "nope\n");
break;
}
}