Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32F103C8T6_WebUSBDFU STM32F103C8T6_USBDFU STM32F103C8T6_USBDFU dfu_usb_stm32f103
Fork of USBDevice_STM32F103 by
Revision 17:bbd6dac92961, committed 2014-01-23
- Comitter:
- mbed_official
- Date:
- Thu Jan 23 17:30:20 2014 +0000
- Parent:
- 16:4f6df64750bd
- Child:
- 18:78bdbce94509
- Commit message:
- Synchronized with git revision b7a925e3cf046d2c5a95f80b14d6c285afbdfa7e
Full URL: https://github.com/mbedmicro/mbed/commit/b7a925e3cf046d2c5a95f80b14d6c285afbdfa7e/
LPC11U35 support for USBDevice and mbed-rtos
Changed in this revision
--- a/USBDevice/USBDevice.cpp Thu Dec 05 13:00:15 2013 +0000
+++ b/USBDevice/USBDevice.cpp Thu Jan 23 17:30:20 2014 +0000
@@ -926,7 +926,7 @@
static uint8_t stringLangidDescriptor[] = {
0x04, /*bLength*/
STRING_DESCRIPTOR, /*bDescriptorType 0x03*/
- 0x09,0x00, /*bString Lang ID - 0x009 - English*/
+ 0x09,0x04, /*bString Lang ID - 0x0409 - English*/
};
return stringLangidDescriptor;
}
--- a/USBDevice/USBDevice_Types.h Thu Dec 05 13:00:15 2013 +0000
+++ b/USBDevice/USBDevice_Types.h Thu Jan 23 17:30:20 2014 +0000
@@ -49,7 +49,7 @@
/* Descriptors */
#define DESCRIPTOR_TYPE(wValue) (wValue >> 8)
-#define DESCRIPTOR_INDEX(wValue) (wValue & 0xf)
+#define DESCRIPTOR_INDEX(wValue) (wValue & 0xff)
typedef struct {
struct {
--- a/USBDevice/USBHAL_LPC11U.cpp Thu Dec 05 13:00:15 2013 +0000
+++ b/USBDevice/USBHAL_LPC11U.cpp Thu Jan 23 17:30:20 2014 +0000
@@ -16,11 +16,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if defined(TARGET_LPC11U24) || defined(TARGET_LPC1347)
+#if defined(TARGET_LPC11U24) || defined(TARGET_LPC11U35_401) || defined(TARGET_LPC1347)
#if defined(TARGET_LPC1347)
#define USB_IRQ USB_IRQ_IRQn
-#elif defined(TARGET_LPC11U24)
+#elif defined(TARGET_LPC11U24) || defined(TARGET_LPC11U35_401)
#define USB_IRQ USB_IRQn
#endif
@@ -145,6 +145,11 @@
epCallback[6] = &USBHAL::EP4_OUT_callback;
epCallback[7] = &USBHAL::EP4_IN_callback;
+ #if defined(TARGET_LPC11U35_401)
+ // USB_VBUS input with pull-down
+ LPC_IOCON->PIO0_3 = 0x00000009;
+ #endif
+
// nUSB_CONNECT output
LPC_IOCON->PIO0_6 = 0x00000001;
