diff options
-rw-r--r-- | main.c | 13 | ||||
-rw-r--r-- | usbdrv/usbconfig.h | 2 |
2 files changed, 10 insertions, 5 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) { diff --git a/usbdrv/usbconfig.h b/usbdrv/usbconfig.h index 2296019..c409ce8 100644 --- a/usbdrv/usbconfig.h +++ b/usbdrv/usbconfig.h @@ -109,7 +109,7 @@ section at the end of this file). * (e.g. HID), but never want to send any data. This option saves a couple * of bytes in flash memory and the transmit buffers in RAM. */ -#define USB_CFG_INTR_POLL_INTERVAL 100 +#define USB_CFG_INTR_POLL_INTERVAL 10 /* If you compile a version with endpoint 1 (interrupt-in), this is the poll * interval. The value is in milliseconds and must not be less than 10 ms for * low speed devices. |