summaryrefslogtreecommitdiffstats
path: root/usb/usb.c
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2017-03-26 21:46:11 +0100
committerTomasz Kramkowski <tk@the-tk.com>2017-03-26 21:46:11 +0100
commit108faf4ead2643d6ebd0fd238914b09dc4949861 (patch)
treedcc6891dec6d138d2d72965eea52e19a651a6699 /usb/usb.c
parent03f33481c42954ec118d5dd92703b2b2208f4a3a (diff)
downloadfmk-108faf4ead2643d6ebd0fd238914b09dc4949861.tar.gz
fmk-108faf4ead2643d6ebd0fd238914b09dc4949861.tar.xz
fmk-108faf4ead2643d6ebd0fd238914b09dc4949861.zip
usb: uart debugging
Diffstat (limited to 'usb/usb.c')
-rw-r--r--usb/usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usb/usb.c b/usb/usb.c
index 8b78f3b..a8cbbf8 100644
--- a/usb/usb.c
+++ b/usb/usb.c
@@ -4,6 +4,7 @@
#include <reg/usbotg.h>
#include <stddef.h>
+#include "../uart/uart.h"
#include "usb.h"
#include "bdt.h"
#include "endpt0.h"
@@ -80,10 +81,12 @@ void usb_isr(void)
uint8_t stat = USB0_ISTAT;
if (IS_BIT_SET(stat, ISTAT_TOKDNE)) {
+ uart_puts("tokdne");
i_tokdne();
USB0_ISTAT = BV(ISTAT_TOKDNE);
}
if (IS_BIT_SET(stat, ISTAT_USBRST)) {
+ uart_puts("usbrst");
i_usbrst();
USB0_ISTAT = BV(ISTAT_USBRST);
}