add some more files.

This commit is contained in:
NIIBE Yutaka
2010-08-18 12:57:45 +09:00
parent 6cfc5155f6
commit e6116828c5
14 changed files with 2299 additions and 6 deletions

26
src/usb_lld.c Normal file
View File

@@ -0,0 +1,26 @@
#include "ch.h"
#include "hal.h"
#include "usb_lld.h"
extern void USB_Istr (void);
CH_IRQ_HANDLER (Vector90) {
CH_IRQ_PROLOGUE();
USB_Istr();
CH_IRQ_EPILOGUE();
}
void usb_lld_init (void) {
RCC->APB1ENR |= RCC_APB1ENR_USBEN;
NVICEnableVector (USB_LP_CAN1_RX0_IRQn,
CORTEX_PRIORITY_MASK (STM32_USB_IRQ_PRIORITY));
/*
* Note that we also have other IRQs:
* USB_HP_CAN1_TX_IRQn
* USBWakeUp_IRQn
*/
RCC->APB1RSTR = RCC_APB1RSTR_USBRST;
RCC->APB1RSTR = 0;
}