diff options
author | bnewbold <bnewbold@robocracy.org> | 2010-09-01 00:02:36 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2010-09-01 00:02:36 -0400 |
commit | d6a32991684b7bfd8b91e3358dee4ca3fc887021 (patch) | |
tree | 535ebe6501bda800363c5f4debccf532d289bc1e /libmaple/usb | |
parent | 9c9d6c153154981fdedbe3f9ed4a1fb61e2b7776 (diff) | |
parent | 0ccec95446d4c7f3ea47a46d267c791fb22bb8d4 (diff) | |
download | librambutan-d6a32991684b7bfd8b91e3358dee4ca3fc887021.tar.gz librambutan-d6a32991684b7bfd8b91e3358dee4ca3fc887021.zip |
Various fixes, working with Maple
Diffstat (limited to 'libmaple/usb')
-rw-r--r-- | libmaple/usb/descriptors.h | 2 | ||||
-rw-r--r-- | libmaple/usb/usb.c | 3 | ||||
-rw-r--r-- | libmaple/usb/usb_config.h | 9 | ||||
-rw-r--r-- | libmaple/usb/usb_hardware.h | 1 |
4 files changed, 3 insertions, 12 deletions
diff --git a/libmaple/usb/descriptors.h b/libmaple/usb/descriptors.h index 1efe8c1..6652942 100644 --- a/libmaple/usb/descriptors.h +++ b/libmaple/usb/descriptors.h @@ -16,7 +16,7 @@ #define USB_DEVICE_SUBCLASS_CDC 0x00 #define USB_CONFIG_ATTR_BUSPOWERED 0b10000000 -#define USB_CONFIG_ATTR_SELF_POWERED 0b11000000 +#define USB_CONFIG_ATTR_SELF_POWERED 0b11000000 #define EP_TYPE_INTERRUPT 0x03 #define EP_TYPE_BULK 0x02 diff --git a/libmaple/usb/usb.c b/libmaple/usb/usb.c index 23cde00..026d7f0 100644 --- a/libmaple/usb/usb.c +++ b/libmaple/usb/usb.c @@ -118,7 +118,8 @@ void setupUSB (void) { pRCC->APB1ENR |= 0x00800000; /* initialize the usb application */ - gpio_write_bit(USB_DISC_BANK,USB_DISC_PIN,0); /* present ourselves to the host */ + gpio_write_bit(USB_DISC_BANK, USB_DISC_PIN, 0); /* present ourselves to the host */ + USB_Init(); /* low level init routine provided by st lib */ } diff --git a/libmaple/usb/usb_config.h b/libmaple/usb/usb_config.h index 06c81ff..ba05d42 100644 --- a/libmaple/usb/usb_config.h +++ b/libmaple/usb/usb_config.h @@ -5,12 +5,6 @@ #include "usb_lib.h" -#define VCOM_ID_VENDOR 0x1EAF -#define VCOM_ID_PRODUCT 0x0004 - -#define USB_CONFIG_MAX_POWER (100 >> 1) -#define RESET_DELAY (100) - /* choose addresses to give endpoints the max 64 byte buffers */ #define USB_BTABLE_ADDRESS 0x00 #define VCOM_CTRL_EPNUM 0x00 @@ -46,9 +40,6 @@ CNTR_ESOFM | \ CNTR_RESETM ) -#define USB_DISC_BANK GPIOC_BASE -#define USB_DISC_PIN 12 - #define F_SUSPEND_ENABLED 1 #endif diff --git a/libmaple/usb/usb_hardware.h b/libmaple/usb/usb_hardware.h index 208fa3a..e4a26b4 100644 --- a/libmaple/usb/usb_hardware.h +++ b/libmaple/usb/usb_hardware.h @@ -30,7 +30,6 @@ /* macro'd register and peripheral definitions */ #define EXC_RETURN 0xFFFFFFF9 #define DEFAULT_CPSR 0x61000000 -#define STACK_TOP 0x20005000 #define RCC ((u32)0x40021000) #define FLASH ((u32)0x40022000) |