From 5dc16189827f998537ea9e8067e458f827a7ce98 Mon Sep 17 00:00:00 2001 From: Alin Jerpelea Date: Mon, 1 Jul 2019 11:45:56 +0000 Subject: [PATCH] Merged in alinjerpelea/nuttx (pull request #924) drivers: usbdev: usbmsc: fix usbmsc_exportluns declaration * drivers: usbdev: usbmsc: fix usbmsc_exportluns declaration fixes the following error apps/system/usbmsc/usbmsc_main.c:567: undefined reference to `usbmsc_exportluns' Signed-off-by: Alin Jerpelea * configs: spresense: nsh: register the procfs this is a configuration change in sync with the other ones Signed-off-by: Alin Jerpelea * configs: spresense: enable READLINE_CMD_HISTORY we are following the default spresense board configuration regarding CMD HISTORY configuration Signed-off-by: Alin Jerpelea * configs: spresense: enable by default SPI 4 and 5 we are following the default spresense board configuration regarding SPI configuration Signed-off-by: Alin Jerpelea * configs: spresense: add I2C configuration in sync with the default spresense board configuration Signed-off-by: Alin Jerpelea Approved-by: Gregory Nutt --- configs/spresense/nsh/defconfig | 8 ++++++++ configs/spresense/usbnsh/defconfig | 7 +++++++ drivers/usbdev/usbmsc.c | 4 ++-- include/nuttx/usb/usbmsc.h | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/configs/spresense/nsh/defconfig b/configs/spresense/nsh/defconfig index e9d8f8089a..f3264bf4cf 100644 --- a/configs/spresense/nsh/defconfig +++ b/configs/spresense/nsh/defconfig @@ -5,6 +5,7 @@ # You can then do "make savedefconfig" to generate a new defconfig file that includes your # modifications. # +# CONFIG_CXD56_I2C0_SCUSEQ is not set # CONFIG_STANDARD_SERIAL is not set CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="spresense" @@ -16,9 +17,15 @@ CONFIG_BOARD_LOOPSPERMSEC=5434 CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y CONFIG_CLOCK_MONOTONIC=y +CONFIG_CXD56_I2C0=y +CONFIG_CXD56_I2C=y +CONFIG_CXD56_SPI4=y +CONFIG_CXD56_SPI5=y +CONFIG_CXD56_SPI=y CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_FS_PROCFS=y +CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_I2C=y @@ -34,6 +41,7 @@ CONFIG_PREALLOC_TIMERS=4 CONFIG_PREALLOC_WDOGS=16 CONFIG_RAM_SIZE=1572864 CONFIG_RAM_START=0x0d000000 +CONFIG_READLINE_CMD_HISTORY=y CONFIG_RR_INTERVAL=200 CONFIG_RTC=y CONFIG_RTC_DRIVER=y diff --git a/configs/spresense/usbnsh/defconfig b/configs/spresense/usbnsh/defconfig index da1dd2021e..ef9926e703 100644 --- a/configs/spresense/usbnsh/defconfig +++ b/configs/spresense/usbnsh/defconfig @@ -5,6 +5,7 @@ # You can then do "make savedefconfig" to generate a new defconfig file that includes your # modifications. # +# CONFIG_CXD56_I2C0_SCUSEQ is not set # CONFIG_MMCSD_HAVE_WRITEPROTECT is not set # CONFIG_MMCSD_SPI is not set # CONFIG_STANDARD_SERIAL is not set @@ -18,7 +19,12 @@ CONFIG_BOARD_LOOPSPERMSEC=5434 CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y CONFIG_CLOCK_MONOTONIC=y +CONFIG_CXD56_I2C0=y +CONFIG_CXD56_I2C=y CONFIG_CXD56_SDIO=y +CONFIG_CXD56_SPI4=y +CONFIG_CXD56_SPI5=y +CONFIG_CXD56_SPI=y CONFIG_CXD56_USBDEV=y CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y @@ -45,6 +51,7 @@ CONFIG_PREALLOC_TIMERS=4 CONFIG_PREALLOC_WDOGS=16 CONFIG_RAM_SIZE=1572864 CONFIG_RAM_START=0x0d000000 +CONFIG_READLINE_CMD_HISTORY=y CONFIG_RR_INTERVAL=200 CONFIG_RTC=y CONFIG_RTC_DRIVER=y diff --git a/drivers/usbdev/usbmsc.c b/drivers/usbdev/usbmsc.c index 7f6eb48cf9..3895c1724b 100644 --- a/drivers/usbdev/usbmsc.c +++ b/drivers/usbdev/usbmsc.c @@ -142,7 +142,7 @@ static void usbmsc_disconnect(FAR struct usbdevclass_driver_s *driver, /* Initialization/Uninitialization ******************************************/ static void usbmsc_lununinitialize(struct usbmsc_lun_s *lun); -#ifdef CONFIG_USBMSC_COMPOSITE +#if !defined(CONFIG_USBDEV_COMPOSITE) && defined(CONFIG_USBMSC_COMPOSITE) static int usbmsc_exportluns(FAR void *handle); #endif @@ -1664,7 +1664,7 @@ int usbmsc_unbindlun(FAR void *handle, unsigned int lunno) * ****************************************************************************/ -#ifdef CONFIG_USBMSC_COMPOSITE +#if !defined(CONFIG_USBDEV_COMPOSITE) && defined(CONFIG_USBMSC_COMPOSITE) static #endif int usbmsc_exportluns(FAR void *handle) diff --git a/include/nuttx/usb/usbmsc.h b/include/nuttx/usb/usbmsc.h index 4e04d5cc56..d7c645ed15 100644 --- a/include/nuttx/usb/usbmsc.h +++ b/include/nuttx/usb/usbmsc.h @@ -168,7 +168,7 @@ int usbmsc_unbindlun(FAR void *handle, unsigned int lunno); * ****************************************************************************/ -#if !defined(CONFIG_USBDEV_COMPOSITE) || !defined(CONFIG_USBMSC_COMPOSITE) +#if defined(CONFIG_USBDEV_COMPOSITE) || defined(CONFIG_USBMSC_COMPOSITE) int usbmsc_exportluns(FAR void *handle); #endif