aboutsummaryrefslogtreecommitdiff
path: root/include/libopenstm32/usb.h
diff options
context:
space:
mode:
authorUwe Hermann2010-11-02 02:02:21 +0100
committerUwe Hermann2010-11-02 02:02:21 +0100
commit6e090ccee16582f0c152c95238753562732788e3 (patch)
treedc81ec432c2144af3c01803be2c953005048cd36 /include/libopenstm32/usb.h
parent1621fde1f47c5b5f86942562b955bebfb45683df (diff)
Initial USB device stack for STM32.
Patch provided by Gareth McMullin <gareth@blacksphere.co.nz>, thanks a lot!
Diffstat (limited to 'include/libopenstm32/usb.h')
-rw-r--r--include/libopenstm32/usb.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/libopenstm32/usb.h b/include/libopenstm32/usb.h
index 342b9a6..3e0efe9 100644
--- a/include/libopenstm32/usb.h
+++ b/include/libopenstm32/usb.h
@@ -20,6 +20,10 @@
#ifndef LIBOPENSTM32_USB_H
#define LIBOPENSTM32_USB_H
+#include <libopenstm32/memorymap.h>
+#include <libopenstm32/common.h>
+#include <libopenstm32/tools.h>
+
/******************************************************************************
* USB base addresses
******************************************************************************/
@@ -42,7 +46,7 @@
/* USB Buffer table address register */
#define USB_BTABLE_REG ((volatile u32 *)(USB_DEV_FS_BASE + 0x50))
/* USB EP register */
-#define USB_EP_REG(EP) ((volatile u32 *)(USB_DEV_FS_BASE + EP))
+#define USB_EP_REG(EP) ((volatile u32 *)(USB_DEV_FS_BASE) + (EP))
/******************************************************************************
* USB control register masks / bits