diff options
author | AJM <poslathian@poslathian.(none)> | 2010-04-20 14:35:58 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2010-05-20 22:09:15 -0400 |
commit | bfb86b6c2ac84c691c150e20adcc1b77d57efd10 (patch) | |
tree | feb5286f411417d6832a417e02e07fe1c775f4e7 /core/usb/usb_config.h | |
parent | 0db5696149d8f01275955c94ec55c9c43d7ca390 (diff) | |
download | librambutan-bfb86b6c2ac84c691c150e20adcc1b77d57efd10.tar.gz librambutan-bfb86b6c2ac84c691c150e20adcc1b77d57efd10.zip |
finished the entire low level usb app for virtual com minus the precise handling of get/send data callbacks and toggle line state. completely undebugged for now.
Diffstat (limited to 'core/usb/usb_config.h')
-rw-r--r-- | core/usb/usb_config.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/core/usb/usb_config.h b/core/usb/usb_config.h index bf5f4ff..b457677 100644 --- a/core/usb/usb_config.h +++ b/core/usb/usb_config.h @@ -3,6 +3,8 @@ #ifndef __USB_CONFIG_H #define __USB_CONFIG_H +#include "usb_lib.h" + #define VCOM_ID_VENDOR 0x0110 #define VCOM_ID_PRODUCT 0x1003 @@ -11,20 +13,42 @@ /* 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_TX_ADDR 0x40 +#define VCOM_CTRL_RX_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_EPSIZE 0x40 +#define VCOM_TX_ENDP ENDP2 #define VCOM_TX_EPNUM 0x02 #define VCOM_TX_ADDR 0x100 #define VCOM_TX_SIZE 0x040 +#define VCOM_RX_ENDP ENDP3 #define VCOM_RX_EPNUM 0x03 #define VCOM_RX_ADDR 0x140 #define VCOM_RX_EPSIZE 0x40 +#define bMaxPacketSize 0x40 /* 64B, maximum for USB FS Devices */ + +#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 USB_DISC_BANK GPIOC_BASE +#define USB_DISC_PIN 12 + +#define F_SUSPEND_ENABLED 1 + #endif |