summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2012-01-22 16:03:20 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2012-01-22 16:03:20 +0100
commit005fd2a94ae005d19cf82ded46698c3187471d28 (patch)
tree49ba0e8e1ee5c09142c37ac618a35f43be876036
parente684c845fe3a76136af497f11daf4b666007f7f0 (diff)
Added FIFO register.
-rw-r--r--hal/usb.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/hal/usb.h b/hal/usb.h
index 14a5440..9596f44 100644
--- a/hal/usb.h
+++ b/hal/usb.h
@@ -65,14 +65,16 @@ class USB_t {
public:
USB_reg_t& reg;
USB_dev_reg_t& dev_reg;
- USB_dev_iep_reg_t * const dev_iep_reg;
- USB_dev_oep_reg_t * const dev_oep_reg;
+ USB_dev_iep_reg_t* const dev_iep_reg;
+ USB_dev_oep_reg_t* const dev_oep_reg;
+ volatile uint32_t& fifo;
USB_t(uint32_t reg_addr) :
reg(*(USB_reg_t*)reg_addr),
dev_reg(*(USB_dev_reg_t*)(reg_addr + 0x800)),
dev_iep_reg((USB_dev_iep_reg_t*)(reg_addr + 0x900)),
- dev_oep_reg((USB_dev_oep_reg_t*)(reg_addr + 0xb00)) {}
+ dev_oep_reg((USB_dev_oep_reg_t*)(reg_addr + 0xb00)),
+ fifo(*(volatile uint32_t*)(reg_addr + 0x1000)) {}
};
#if defined(STM32F1)