summaryrefslogtreecommitdiff
path: root/nuttx/configs/mbed/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-02-16 00:07:29 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-02-16 00:07:29 +0000
commit7585579c803173a39ec63a4c8dfe82a902a0ec5a (patch)
tree5428ac85fc73cd423debff7db9eb87a2d8c1bb7b /nuttx/configs/mbed/include
parentc45ce4acb9eeca86c6da100828095da514690019 (diff)
downloadpx4-nuttx-7585579c803173a39ec63a4c8dfe82a902a0ec5a.tar.gz
px4-nuttx-7585579c803173a39ec63a4c8dfe82a902a0ec5a.tar.bz2
px4-nuttx-7585579c803173a39ec63a4c8dfe82a902a0ec5a.zip
Add USB host support and HID keyboard support for the mbed board
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3297 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/mbed/include')
-rwxr-xr-xnuttx/configs/mbed/include/board.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/nuttx/configs/mbed/include/board.h b/nuttx/configs/mbed/include/board.h
index 667287800..bec90d10f 100755
--- a/nuttx/configs/mbed/include/board.h
+++ b/nuttx/configs/mbed/include/board.h
@@ -67,7 +67,7 @@
#define LPC17_CCLK 80000000 /* 80Mhz*/
/* Select the main oscillator as the frequency source. SYSCLK is then the frequency
- * of the main osciallator.
+ * of the main oscillator.
*/
#undef CONFIG_LPC17_MAINOSC
@@ -86,6 +86,8 @@
* Source clock: Main oscillator
* PLL0 Multiplier value (M): 20
* PLL0 Pre-divider value (N): 1
+ *
+ * PLL0CLK = (2 * 20 * SYSCLK) / 1 = 480MHz
*/
#undef CONFIG_LPC17_PLL0
@@ -107,8 +109,8 @@
(((BOARD_PLL1CFG_MSEL-1) << SYSCON_PLL1CFG_MSEL_SHIFT) | \
((BOARD_PLL1CFG_NSEL-1) << SYSCON_PLL1CFG_NSEL_SHIFT))
-/* USB divider. This divder is used when PLL1 is not enabled to get the USB clock
- * from PLL0:
+/* USB divider. This divider is used when PLL1 is not enabled to get the
+ * USB clock from PLL0:
*
* USBCLK = PLL0CLK / 10 = 48MHz
*/
@@ -150,6 +152,17 @@
#define GPIO_SSP0_MISO GPIO_SSP0_MISO_1
#define GPIO_SSP0_MOSI GPIO_SSP0_MOSI_1
+/* We need to redefine USB_PWRD as GPIO to get USB Host working
+ * Also remember to add 2 resistors of 15K to D+ and D- pins.
+ */
+
+#ifdef CONFIG_USBHOST
+# ifdef GPIO_USB_PWRD
+# undef GPIO_USB_PWRD
+# define GPIO_USB_PWRD (GPIO_INPUT | GPIO_PORT1 | GPIO_PIN22)
+# endif
+#endif
+
/************************************************************************************
* Public Types
************************************************************************************/