usb: add empty usb implementation

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-01-01 22:37:14 +08:00
parent ebed2b919f
commit b31c0213b5
3 changed files with 32 additions and 9 deletions

14
include/usb.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef __USB_H
#define __USB_H
#ifdef __cplusplus
extern "C" {
#endif
void usb_isr(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,7 +1,8 @@
#include <stdio.h>
#include <irq.h>
#include <printf.h>
#include <uart.h>
#include <irq.h>
#include <usb.h>
#include <generated/csr.h>
@ -10,6 +11,9 @@ void isr(void) {
irqs = irq_pending() & irq_getmask();
if (irqs & (1 << USB_INTERRUPT))
usb_isr();
if (irqs & (1 << UART_INTERRUPT))
uart_isr();
}

5
src/usb.c Normal file
View File

@ -0,0 +1,5 @@
#include <usb.h>
void usb_isr(void) {
return;
}