diff options
author | AJM <poslathian@poslathian.(none)> | 2010-05-20 22:47:59 -0400 |
---|---|---|
committer | AJM <poslathian@poslathian.(none)> | 2010-05-20 22:47:59 -0400 |
commit | dcc4c457f0cad15b9d60e8fc3afa913bacacdbc6 (patch) | |
tree | ad805c404ec1414a330aad74fb833137a44ad136 /libmaple/usb/usb_config.h | |
parent | 3d0c8c9b374a9a2e3e9fb296cf8a89239106eea2 (diff) | |
download | librambutan-dcc4c457f0cad15b9d60e8fc3afa913bacacdbc6.tar.gz librambutan-dcc4c457f0cad15b9d60e8fc3afa913bacacdbc6.zip |
moved the usb directory to its proper home in ./libmaple
also, removed some old usb file, bootVect.h, which setup the static table for the runtime usb lib that no longer exists and was provided by the bootloader rev 1
Diffstat (limited to 'libmaple/usb/usb_config.h')
-rw-r--r-- | libmaple/usb/usb_config.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libmaple/usb/usb_config.h b/libmaple/usb/usb_config.h new file mode 100644 index 0000000..5cdbcd7 --- /dev/null +++ b/libmaple/usb/usb_config.h @@ -0,0 +1,53 @@ +/* insert license */ + +#ifndef __USB_CONFIG_H +#define __USB_CONFIG_H + +#include "usb_lib.h" + +#define VCOM_ID_VENDOR 0x0110 +#define VCOM_ID_PRODUCT 0x1003 + +#define USB_CONFIG_MAX_POWER (100 >> 1) + +/* choose addresses to give endpoints the max 64 byte buffers */ +#define USB_BTABLE_ADDRESS 0x00 +#define VCOM_CTRL_EPNUM 0x00 +#define VCOM_CTRL_RX_ADDR 0x40 +#define VCOM_CTRL_TX_ADDR 0x80 +#define VCOM_CTRL_EPSIZE 0x40 + +#define VCOM_TX_ENDP ENDP1 +#define VCOM_TX_EPNUM 0x01 +#define VCOM_TX_ADDR 0xC0 +#define VCOM_TX_EPSIZE 0x40 + +#define VCOM_NOTIFICATION_ENDP ENDP2 +#define VCOM_NOTIFICATION_EPNUM 0x02 +#define VCOM_NOTIFICATION_ADDR 0x100 +#define VCOM_NOTIFICATION_EPSIZE 0x40 + +#define VCOM_RX_ENDP ENDP3 +#define VCOM_RX_EPNUM 0x03 +#define VCOM_RX_ADDR 0x110 +#define VCOM_RX_EPSIZE 0x40 + +#define bMaxPacketSize 0x40 /* 64B, maximum for USB FS Devices */ + +#define NUM_ENDPTS 0x04 + +/* handle all usb interrupts */ +#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 + +#define F_SUSPEND_ENABLED 1 + +#endif |