diff --git a/include/usb.h b/include/usb.h new file mode 100644 index 0000000..9868dc1 --- /dev/null +++ b/include/usb.h @@ -0,0 +1,14 @@ +#ifndef __USB_H +#define __USB_H + +#ifdef __cplusplus +extern "C" { +#endif + +void usb_isr(void); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file diff --git a/src/main.c b/src/main.c index d525faa..1efeb01 100644 --- a/src/main.c +++ b/src/main.c @@ -1,17 +1,21 @@ #include +#include #include #include -#include +#include #include void isr(void) { - unsigned int irqs; - - irqs = irq_pending() & irq_getmask(); - - if(irqs & (1 << UART_INTERRUPT)) - uart_isr(); + unsigned int irqs; + + irqs = irq_pending() & irq_getmask(); + + if (irqs & (1 << USB_INTERRUPT)) + usb_isr(); + + if (irqs & (1 << UART_INTERRUPT)) + uart_isr(); } static void rv_putchar(void *ignored, char c) { @@ -21,8 +25,8 @@ static void rv_putchar(void *ignored, char c) { static void init(void) { irq_setmask(0); - irq_setie(1); - uart_init(); + irq_setie(1); + uart_init(); init_printf(NULL, rv_putchar); } diff --git a/src/usb.c b/src/usb.c new file mode 100644 index 0000000..911a546 --- /dev/null +++ b/src/usb.c @@ -0,0 +1,5 @@ +#include + +void usb_isr(void) { + return; +} \ No newline at end of file