aboutsummaryrefslogtreecommitdiffstats
path: root/core/usb/usb_config.h
diff options
context:
space:
mode:
authorAJM <poslathian@poslathian.(none)>2010-04-22 23:27:09 -0400
committerbnewbold <bnewbold@robocracy.org>2010-05-20 22:09:15 -0400
commita86ec7c81d7ad2037e900899a0b32c5592cae7c0 (patch)
tree391e3abb0ce95ec6901399bdce628aadf8a0c339 /core/usb/usb_config.h
parenta082defb795cc4495139c8b05de4fd48bd66dacd (diff)
downloadlibrambutan-a86ec7c81d7ad2037e900899a0b32c5592cae7c0.tar.gz
librambutan-a86ec7c81d7ad2037e900899a0b32c5592cae7c0.zip
c++ ified all of the usb_core files, added the auto-reset feature to the virtual com port, got the descriptors in functional although not pretty order that can be fixed using the attribute packing
Diffstat (limited to 'core/usb/usb_config.h')
-rw-r--r--core/usb/usb_config.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/core/usb/usb_config.h b/core/usb/usb_config.h
index b457677..3ff24f8 100644
--- a/core/usb/usb_config.h
+++ b/core/usb/usb_config.h
@@ -13,19 +13,19 @@
/* choose addresses to give endpoints the max 64 byte buffers */
#define USB_BTABLE_ADDRESS 0x00
#define VCOM_CTRL_EPNUM 0x00
-#define VCOM_CTRL_TX_ADDR 0x40
-#define VCOM_CTRL_RX_ADDR 0x80
+#define VCOM_CTRL_RX_ADDR 0x40
+#define VCOM_CTRL_TX_ADDR 0x80
#define VCOM_CTRL_EPSIZE 0x40
-#define VCOM_NOTIFICATION_ENDP ENDP1
-#define VCOM_NOTIFICATION_EPNUM 0x01
-#define VCOM_NOTIFICATION_ADDR 0xC0
+#define VCOM_NOTIFICATION_ENDP ENDP2
+#define VCOM_NOTIFICATION_EPNUM 0x02
+#define VCOM_NOTIFICATION_ADDR 0x100
#define VCOM_NOTIFICATION_EPSIZE 0x40
-#define VCOM_TX_ENDP ENDP2
-#define VCOM_TX_EPNUM 0x02
-#define VCOM_TX_ADDR 0x100
-#define VCOM_TX_SIZE 0x040
+#define VCOM_TX_ENDP ENDP1
+#define VCOM_TX_EPNUM 0x01
+#define VCOM_TX_ADDR 0xC0
+#define VCOM_TX_EPSIZE 0x40
#define VCOM_RX_ENDP ENDP3
#define VCOM_RX_EPNUM 0x03
@@ -37,14 +37,13 @@
#define NUM_ENDPTS 0x03
/* handle all usb interrupts */
-#define ISR_MSK (CNTR_CTRM | \
- CNTR_WKUPM | \
- CNTR_SUSPM | \
- CNTR_ERRM | \
- CNTR_SOFM | \
- CNTR_ESOFM | \
- CNTR_RESETM | \
- )
+#define ISR_MSK ( CNTR_CTRM | \
+ CNTR_WKUPM | \
+ CNTR_SUSPM | \
+ CNTR_ERRM | \
+ CNTR_SOFM | \
+ CNTR_ESOFM | \
+ CNTR_RESETM )
#define USB_DISC_BANK GPIOC_BASE
#define USB_DISC_PIN 12