summaryrefslogtreecommitdiffstats
path: root/usb/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'usb/usb.c')
-rw-r--r--usb/usb.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/usb/usb.c b/usb/usb.c
index 977e7a5..2749e16 100644
--- a/usb/usb.c
+++ b/usb/usb.c
@@ -13,11 +13,8 @@
#define USBFRAC_VAL 1 /* 72 MHz * 2 = 144 MHz (Top of Fraction) */
#define USBDIV_VAL 2 /* 144 MHz / 3 = 48 MHz (Bottom of Fraction) */
-/* TODO: Only use the number of endpoints that are needed */
-/* TODO: Try using static */
-/* TODO: Try [16][2][2] since everything is contiguous. */
__attribute__ ((aligned(512)))
-volatile struct usb0_bd usb_bdt[16 * 4];
+volatile struct usb0_bd usb_bdt[2][2][2];
/* usb_setup: Setup function for USB subsystem */
void usb_setup(void)
@@ -87,20 +84,16 @@ void usb_isr(void)
USB0_ISTAT = BV(ISTAT_STALL);
}
if (GET_BIT(stat, ISTAT_RESUME)) {
- uart_puts("INT: resume");
USB0_ISTAT = BV(ISTAT_RESUME);
}
if (GET_BIT(stat, ISTAT_SLEEP)) {
- uart_puts("INT: sleep");
USB0_ISTAT = BV(ISTAT_SLEEP);
}
if (GET_BIT(stat, ISTAT_TOKDNE)) {
- uart_puts("INT: tokdne");
i_tokdne();
USB0_ISTAT = BV(ISTAT_TOKDNE);
}
if (GET_BIT(stat, ISTAT_SOFTOK)) {
- /*uart_puts("INT: softok");*/
USB0_ISTAT = BV(ISTAT_SOFTOK);
}
if (GET_BIT(stat, ISTAT_ERROR)) {
@@ -109,7 +102,6 @@ void usb_isr(void)
USB0_ISTAT = BV(ISTAT_ERROR);
}
if (GET_BIT(stat, ISTAT_USBRST)) {
- uart_puts("INT: usbrst");
i_usbrst();
USB0_ISTAT = BV(ISTAT_USBRST);
}