summaryrefslogtreecommitdiffstats
path: root/usb/usb.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-03-28 21:53:36 +0100
committerTomasz Kramkowski <tk@the-tk.com>2017-03-28 21:53:36 +0100
commit440cd59182a962b7f987d990db6d43a6026877ba (patch)
treec3efbbf25c69406b32ce04f8c504a6faf4062231 /usb/usb.c
parent003974902952dedc56e9060c4db4b2b1ff63f283 (diff)
downloadfmk-440cd59182a962b7f987d990db6d43a6026877ba.tar.gz
fmk-440cd59182a962b7f987d990db6d43a6026877ba.tar.xz
fmk-440cd59182a962b7f987d990db6d43a6026877ba.zip
hid mouse pointer jiggler
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);
}