#include <avr/io.h>
#include <avr/interrupt.h>
+#include <avr/sleep.h>
#include <string.h>
#include <stdio.h>
#include "usart.h"
chassis_init();
usart_init();
- printf("\n");
-
i2c_init();
- printf("Waiting for I2C...\n");
-
sei();
while(1) {
#include "chassis.h"
-#define DEBUG
-
void chassis_init()
{
DDRB = 0xff;
break;
default:
+#ifdef DEBUG
printf("Unimplemented chassis action 0x%02x\n", action);
+#endif
break;
}
}
break;
default:
+#ifdef DEBUG
printf("I2C: Unimplemented status 0x%02x\n", TW_STATUS);
+#endif
TWCR_RESET;
break;
}