summaryrefslogtreecommitdiff
path: root/tinyusb/hal
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-06-11 16:01:30 +0700
committerhathach <[email protected]>2013-06-11 16:01:30 +0700
commit72b5b61597c91d146b332149dd4408b511c5441d (patch)
treef017b7250427b12ba2f64cf7d5a9e17320f7f28f /tinyusb/hal
parent503d279af58538f8c00966c48f3ff862f4cde2a0 (diff)
able to xfer device descriptor on control endpoint of lpc176x
Diffstat (limited to 'tinyusb/hal')
-rw-r--r--tinyusb/hal/hal_lpc13uxx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tinyusb/hal/hal_lpc13uxx.c b/tinyusb/hal/hal_lpc13uxx.c
index 29128eec4..d4e3fa984 100644
--- a/tinyusb/hal/hal_lpc13uxx.c
+++ b/tinyusb/hal/hal_lpc13uxx.c
@@ -49,8 +49,11 @@ tusb_error_t hal_init(void)
/* Pull-down is needed, or internally, VBUS will be floating. This is to
address the wrong status in VBUSDebouncing bit in CmdStatus register. */
+ // set PIO0_3 as USB_VBUS
LPC_IOCON->PIO0_3 &= ~0x1F;
LPC_IOCON->PIO0_3 |= (0x01<<0); /* Secondary function VBUS */
+
+ // set PIO0_6 as usb connect
LPC_IOCON->PIO0_6 &= ~0x07;
LPC_IOCON->PIO0_6 |= (0x01<<0); /* Secondary function SoftConn */