diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -45,6 +45,7 @@ #include <avr/delay.h> #include <avr/wdt.h> #include <avr/interrupt.h> +#include <avr/sleep.h> #include "usbdrv/usbdrv.h" static char buffer[300]; // contains the exploded gamecube bits, i.e. each bit sent/received occupies one byte here. @@ -314,9 +315,12 @@ int main (void) debug(4); int temp=5; int n_received; - + + int toggle=0; while(1) { + toggle=~toggle; + debug(toggle); wdt_reset(); usbPoll(); @@ -358,14 +362,15 @@ debug(4); } - debug(temp % 64); - _delay_ms(0.3); - + //debug(temp % 64); +// _delay_ms(0.3); + _delay_us(10); char foo[] = { 0x40, 0x03, 0x02 }; if (!(PIND & 0x10)) foo[2]=0x03; + n_received=send_recv_gc(foo, 3); if (n_received == 64) { |