summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-04 06:47:14 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-04 06:47:14 -0600
commit010c1b49310bec659c9a922e608776f0a53ff4b3 (patch)
treeabcc6336fcb34087e303563eb4f092c171bc8ce7 /nuttx/arch
parent615a104052db960d2b51d9e78a5bf015413b0459 (diff)
downloadnuttx-010c1b49310bec659c9a922e608776f0a53ff4b3.tar.gz
nuttx-010c1b49310bec659c9a922e608776f0a53ff4b3.tar.bz2
nuttx-010c1b49310bec659c9a922e608776f0a53ff4b3.zip
EFM32: Add USB build support
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/arm/src/efm32/Kconfig10
-rw-r--r--nuttx/arch/arm/src/efm32/Make.defs9
-rw-r--r--nuttx/arch/arm/src/efm32/efm32_idle.c2
-rw-r--r--nuttx/arch/arm/src/efm32/efm32_pm.h12
4 files changed, 26 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/efm32/Kconfig b/nuttx/arch/arm/src/efm32/Kconfig
index 97a11e798..2d4d22316 100644
--- a/nuttx/arch/arm/src/efm32/Kconfig
+++ b/nuttx/arch/arm/src/efm32/Kconfig
@@ -73,6 +73,7 @@ config EFM32_EFM32GG
select EFM32_HAVE_UART0
select EFM32_HAVE_UART1
select EFM32_HAVE_LEUART1
+ select EFM32_HAVE_USBFSOTG
menu "EFM32 Peripheral Support"
@@ -95,6 +96,10 @@ config EFM32_HAVE_LEUART1
bool
default n
+config EFM32_HAVE_USBFSOTG
+ bool
+ default n
+
# When there are multiple instances of a device, these "hidden" settings
# will automatically be selected and will represent the 'OR' of the
# instances selected.
@@ -164,6 +169,11 @@ config EFM32_LEUART1
select ARCH_HAVE_OTHER_UART
select EFM32_LEUART
+config EFM32_USBFSOTG
+ bool "USB Full-Speed OTG"
+ default n
+ depends on EFM32_HAVE_USBFSOTG && EXPERIMENTAL
+
endmenu # EFM32 Peripheral Support
config EFM32_GPIO_IRQ
diff --git a/nuttx/arch/arm/src/efm32/Make.defs b/nuttx/arch/arm/src/efm32/Make.defs
index aabf83bdd..1aec13974 100644
--- a/nuttx/arch/arm/src/efm32/Make.defs
+++ b/nuttx/arch/arm/src/efm32/Make.defs
@@ -126,3 +126,12 @@ endif
ifeq ($(CONFIG_EFM32_DMA),y)
CHIP_CSRCS += efm32_dma.c
endif
+
+ifeq ($(CONFIG_EFM32_USBFSOTG),y)
+ifeq ($(CONFIG_USBDEV),y)
+CHIP_CSRCS += efm32_usbdev.c
+endif
+ifeq ($(CONFIG_USBHOST),y)
+CHIP_CSRCS += efm32_usbhost.c
+endif
+endif
diff --git a/nuttx/arch/arm/src/efm32/efm32_idle.c b/nuttx/arch/arm/src/efm32/efm32_idle.c
index 327140dfa..b6831e958 100644
--- a/nuttx/arch/arm/src/efm32/efm32_idle.c
+++ b/nuttx/arch/arm/src/efm32/efm32_idle.c
@@ -82,7 +82,7 @@
* Perform IDLE state power management.
*
* REVISIT: These power management hooks were taken with no modification
- * from the STM32 implementation and need review against EFM32 reduced
+ * from the EFM32 implementation and need review against EFM32 reduced
* power modes.
*
****************************************************************************/
diff --git a/nuttx/arch/arm/src/efm32/efm32_pm.h b/nuttx/arch/arm/src/efm32/efm32_pm.h
index ec56547a0..64783e19b 100644
--- a/nuttx/arch/arm/src/efm32/efm32_pm.h
+++ b/nuttx/arch/arm/src/efm32/efm32_pm.h
@@ -79,8 +79,8 @@ extern "C"
* Enter STOP mode.
*
* REVISIT: This power management interface was taken with no modification
- * from the STM32 implementation and needs to be reviewed against EFM32
- * reduced power modes. Comments here apply to the STM32!
+ * from the EFM32 implementation and needs to be reviewed against EFM32
+ * reduced power modes. Comments here apply to the EFM32!
*
* Input Parameters:
* lpds - true: To further reduce power consumption in Stop mode, put the
@@ -104,8 +104,8 @@ int efm32_pmstop(bool lpds);
* Enter STANDBY mode.
*
* REVISIT: This power management interface was taken with no modification
- * from the STM32 implementation and needs to be reviewed against EFM32
- * reduced power modes. Comments here apply to the STM32!
+ * from the EFM32 implementation and needs to be reviewed against EFM32
+ * reduced power modes. Comments here apply to the EFM32!
*
* Input Parameters:
* None
@@ -127,8 +127,8 @@ int efm32_pmstandby(void);
* Enter SLEEP mode.
*
* REVISIT: This power management interface was taken with no modification
- * from the STM32 implementation and needs to be reviewed against EFM32
- * reduced power modes. Comments here apply to the STM32!
+ * from the EFM32 implementation and needs to be reviewed against EFM32
+ * reduced power modes. Comments here apply to the EFM32!
*
* Input Parameters:
* sleeponexit - true: SLEEPONEXIT bit is set when the WFI instruction is