summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-02-18 13:50:12 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-02-18 13:50:12 -0600
commitd616b960af7df08ec8e8e7ceb6904a422ab87582 (patch)
tree7586daca61ac0568ca01ae48a425d141c215d055
parentdeed9d1569c42eeaaaae6c8a3f84e94bd4b069e9 (diff)
downloadnuttx-d616b960af7df08ec8e8e7ceb6904a422ab87582.tar.gz
nuttx-d616b960af7df08ec8e8e7ceb6904a422ab87582.tar.bz2
nuttx-d616b960af7df08ec8e8e7ceb6904a422ab87582.zip
Spark board configurations updated by David Sidrane
-rw-r--r--nuttx/configs/spark/composite/defconfig2
-rw-r--r--nuttx/configs/spark/include/board.h4
-rw-r--r--nuttx/configs/spark/nsh/defconfig2
-rw-r--r--nuttx/configs/spark/src/Makefile48
-rw-r--r--nuttx/configs/spark/src/spark.h15
-rw-r--r--nuttx/configs/spark/src/up_boot.c2
-rw-r--r--nuttx/configs/spark/src/up_wireless.c16
-rw-r--r--nuttx/configs/spark/usbmsc/defconfig2
-rw-r--r--nuttx/configs/spark/usbnsh/defconfig2
-rw-r--r--nuttx/configs/spark/usbserial/defconfig2
10 files changed, 57 insertions, 38 deletions
diff --git a/nuttx/configs/spark/composite/defconfig b/nuttx/configs/spark/composite/defconfig
index 23d08d9d1..c310c8060 100644
--- a/nuttx/configs/spark/composite/defconfig
+++ b/nuttx/configs/spark/composite/defconfig
@@ -374,7 +374,7 @@ CONFIG_NFILE_DESCRIPTORS=5
CONFIG_NFILE_STREAMS=5
CONFIG_NAME_MAX=8
CONFIG_PREALLOC_MQ_MSGS=1
-CONFIG_MQ_MAXMSGSIZE=132
+CONFIG_MQ_MAXMSGSIZE=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=2
CONFIG_PREALLOC_TIMERS=2
diff --git a/nuttx/configs/spark/include/board.h b/nuttx/configs/spark/include/board.h
index c9974bf98..9a7363cb7 100644
--- a/nuttx/configs/spark/include/board.h
+++ b/nuttx/configs/spark/include/board.h
@@ -158,9 +158,9 @@
#define BOARD_NLEDS 4
#define BOARD_USR_LED_BLUE BOARD_LED1
-#define BOARD_RGB_LED_RED BOARD_LED2
+#define BOARD_RGB_LED_RED BOARD_LED3
#define BOARD_RGB_LED_GREEN BOARD_LED4
-#define BOARD_RGB_LED_BLUE BOARD_LED3
+#define BOARD_RGB_LED_BLUE BOARD_LED2
/* LED bits for use with stm32_setleds() */
diff --git a/nuttx/configs/spark/nsh/defconfig b/nuttx/configs/spark/nsh/defconfig
index 2ddaab45b..170ad93fa 100644
--- a/nuttx/configs/spark/nsh/defconfig
+++ b/nuttx/configs/spark/nsh/defconfig
@@ -375,7 +375,7 @@ CONFIG_NFILE_DESCRIPTORS=5
CONFIG_NFILE_STREAMS=5
CONFIG_NAME_MAX=8
CONFIG_PREALLOC_MQ_MSGS=1
-CONFIG_MQ_MAXMSGSIZE=132
+CONFIG_MQ_MAXMSGSIZE=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=2
CONFIG_PREALLOC_TIMERS=2
diff --git a/nuttx/configs/spark/src/Makefile b/nuttx/configs/spark/src/Makefile
index 8b4a94843..1647d1c9d 100644
--- a/nuttx/configs/spark/src/Makefile
+++ b/nuttx/configs/spark/src/Makefile
@@ -36,59 +36,63 @@
-include $(TOPDIR)/Make.defs
-CFLAGS += -I$(TOPDIR)/sched
+CFLAGS += -I$(TOPDIR)/sched
-ASRCS =
-AOBJS = $(ASRCS:.S=$(OBJEXT))
+ASRCS =
+AOBJS = $(ASRCS:.S=$(OBJEXT))
-CSRCS = up_boot.c up_spi.c
+CSRCS = up_boot.c up_spi.c
ifeq ($(CONFIG_HAVE_CXX),y)
-CSRCS += up_cxxinitialize.c
+CSRCS += up_cxxinitialize.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)
-CSRCS += up_autoleds.c
+CSRCS += up_autoleds.c
else
-CSRCS += up_userleds.c
+CSRCS += up_userleds.c
endif
ifeq ($(CONFIG_ARCH_BUTTONS),y)
-CSRCS += up_buttons.c
+CSRCS += up_buttons.c
endif
ifeq ($(CONFIG_NSH_ARCHINIT),y)
-CSRCS += up_nsh.c
+CSRCS += up_nsh.c
endif
ifeq ($(CONFIG_USBDEV),y)
-CSRCS += up_usbdev.c
+CSRCS += up_usbdev.c
endif
ifeq ($(CONFIG_USBDEV_COMPOSITE),y)
-CSRCS += up_composite.c
+CSRCS += up_composite.c
endif
ifeq ($(CONFIG_WL_CC3000),y)
-CSRCS += up_wireless.c
+CSRCS += up_wireless.c
endif
ifeq ($(CONFIG_WATCHDOG),y)
- CSRCS += up_watchdog.c
+CSRCS += up_watchdog.c
endif
-COBJS = $(CSRCS:.c=$(OBJEXT))
+ifeq ($(CONFIG_CC3000_PROBES),)
+CSRCS += up_io.c
+endif
+
+COBJS = $(CSRCS:.c=$(OBJEXT))
-SRCS = $(ASRCS) $(CSRCS)
-OBJS = $(AOBJS) $(COBJS)
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
-ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
+ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(WINTOOL),y)
- CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
- -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
- -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
- else
- CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m
+CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
+else
+CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m
endif
all: libboard$(LIBEXT)
diff --git a/nuttx/configs/spark/src/spark.h b/nuttx/configs/spark/src/spark.h
index e4e32ad50..7c0ecff32 100644
--- a/nuttx/configs/spark/src/spark.h
+++ b/nuttx/configs/spark/src/spark.h
@@ -176,8 +176,8 @@
#define GPIO_LED1 (GPIO_PORTA | GPIO_PIN13 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
#define GPIO_LED_USR GPIO_LED1
-#define GPIO_LED2 (GPIO_PORTA | GPIO_PIN8 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
-#define GPIO_LED3 (GPIO_PORTA | GPIO_PIN9 | GPIO_OUTPUT_SET | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
+#define GPIO_LED2 (GPIO_PORTA | GPIO_PIN8 | GPIO_OUTPUT_SET | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
+#define GPIO_LED3 (GPIO_PORTA | GPIO_PIN9 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
#define GPIO_LED4 (GPIO_PORTA | GPIO_PIN10 | GPIO_OUTPUT_SET | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
#define GPIO_USB_PULLUP (GPIO_PORTB | GPIO_PIN10 | GPIO_OUTPUT_SET | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
@@ -219,9 +219,18 @@
#define GPIO_WIFI_INT (GPIO_PORTB | GPIO_PIN11 | GPIO_INPUT | GPIO_CNF_INPULLUP | GPIO_EXTI)
+#if defined(CONFIG_CC3000_PROBES)
#define GPIO_D0 (GPIO_PORTB | GPIO_PIN7 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
#define GPIO_D1 (GPIO_PORTB | GPIO_PIN6 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
-
+#else
+#define GPIO_D0 (GPIO_PORTB | GPIO_PIN7 | GPIO_INPUT | GPIO_CNF_INPULLUP | GPIO_EXTI)
+#define GPIO_D1 (GPIO_PORTB | GPIO_PIN6 | GPIO_INPUT | GPIO_CNF_INPULLUP | GPIO_EXTI)
+#define GPIO_D2 (GPIO_PORTB | GPIO_PIN5 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
+#define GPIO_A0 (GPIO_PORTA | GPIO_PIN0 | GPIO_OUTPUT_SET | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
+#define GPIO_A1 (GPIO_PORTA | GPIO_PIN1 | GPIO_OUTPUT_SET | GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz)
+#define GPIO_A2 (GPIO_PORTA | GPIO_PIN4 | GPIO_INPUT | GPIO_CNF_INPULLUP )
+#define GPIO_A3 (GPIO_PORTA | GPIO_PIN5 | GPIO_INPUT | GPIO_CNF_INPULLUP )
+#endif
/************************************************************************************
* Public Types
************************************************************************************/
diff --git a/nuttx/configs/spark/src/up_boot.c b/nuttx/configs/spark/src/up_boot.c
index 1aae93509..f0199a6fc 100644
--- a/nuttx/configs/spark/src/up_boot.c
+++ b/nuttx/configs/spark/src/up_boot.c
@@ -125,7 +125,7 @@ void board_initialize(void)
#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT)
nsh_archinitialize();
- wireless_archinitialize();
+ wireless_archinitialize(0);
#endif
diff --git a/nuttx/configs/spark/src/up_wireless.c b/nuttx/configs/spark/src/up_wireless.c
index 4dec72a92..e330129e6 100644
--- a/nuttx/configs/spark/src/up_wireless.c
+++ b/nuttx/configs/spark/src/up_wireless.c
@@ -84,6 +84,10 @@
# define CC3000_DEVMINOR 0
#endif
+#ifndef CONFIG_CC3000_RX_BUFFER_SIZE
+#define CONFIG_CC3000_RX_BUFFER_SIZE 132
+#endif
+
/****************************************************************************
* Private Types
****************************************************************************/
@@ -142,7 +146,7 @@ static struct stm32_config_s g_cc3000_info =
{
.dev.spi_frequency = CONFIG_CC3000_SPI_FREQUENCY,
.dev.spi_mode = CONFIG_CC3000_SPI_MODE,
-
+ .dev.max_rx_size = 0,
.dev.irq_attach = wl_attach_irq,
.dev.irq_enable = wl_enable_irq,
.dev.irq_clear = wl_clear_irq,
@@ -271,7 +275,7 @@ static bool probe(FAR struct cc3000_config_s *state,int n, bool s)
*
****************************************************************************/
-int wireless_archinitialize(void)
+int wireless_archinitialize(size_t max_rx_size)
{
FAR struct spi_dev_s *spi;
@@ -297,7 +301,7 @@ int wireless_archinitialize(void)
}
/* Initialize and register the SPI CC3000 device */
-
+ g_cc3000_info.dev.max_rx_size = max_rx_size ? max_rx_size : CONFIG_CC3000_RX_BUFFER_SIZE;
int ret = cc3000_register(spi, &g_cc3000_info.dev, CONFIG_CC3000_DEVMINOR);
if (ret < 0)
{
@@ -347,10 +351,12 @@ int wireless_archinitialize(void)
*
****************************************************************************/
-void cc3000_wlan_init(tWlanCB sWlanCB, tFWPatches sFWPatches, tDriverPatches
+void cc3000_wlan_init(size_t max_tx_len,
+ tWlanCB sWlanCB,
+ tFWPatches sFWPatches, tDriverPatches
sDriverPatches, tBootLoaderPatches sBootLoaderPatches)
{
- wlan_init(sWlanCB, sFWPatches, sDriverPatches, sBootLoaderPatches);
+ wlan_init(max_tx_len, sWlanCB, sFWPatches, sDriverPatches, sBootLoaderPatches);
}
#endif /* CONFIG_WL_CC3000 */
diff --git a/nuttx/configs/spark/usbmsc/defconfig b/nuttx/configs/spark/usbmsc/defconfig
index 3ab7a8f04..fa72d00b7 100644
--- a/nuttx/configs/spark/usbmsc/defconfig
+++ b/nuttx/configs/spark/usbmsc/defconfig
@@ -375,7 +375,7 @@ CONFIG_NFILE_DESCRIPTORS=5
CONFIG_NFILE_STREAMS=5
CONFIG_NAME_MAX=8
CONFIG_PREALLOC_MQ_MSGS=1
-CONFIG_MQ_MAXMSGSIZE=132
+CONFIG_MQ_MAXMSGSIZE=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=2
CONFIG_PREALLOC_TIMERS=2
diff --git a/nuttx/configs/spark/usbnsh/defconfig b/nuttx/configs/spark/usbnsh/defconfig
index 373371c94..2283459ec 100644
--- a/nuttx/configs/spark/usbnsh/defconfig
+++ b/nuttx/configs/spark/usbnsh/defconfig
@@ -367,7 +367,7 @@ CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
-CONFIG_MQ_MAXMSGSIZE=32
+CONFIG_MQ_MAXMSGSIZE=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
diff --git a/nuttx/configs/spark/usbserial/defconfig b/nuttx/configs/spark/usbserial/defconfig
index 7d0f91bde..3d177e1d7 100644
--- a/nuttx/configs/spark/usbserial/defconfig
+++ b/nuttx/configs/spark/usbserial/defconfig
@@ -380,7 +380,7 @@ CONFIG_NFILE_DESCRIPTORS=5
CONFIG_NFILE_STREAMS=5
CONFIG_NAME_MAX=8
CONFIG_PREALLOC_MQ_MSGS=1
-CONFIG_MQ_MAXMSGSIZE=132
+CONFIG_MQ_MAXMSGSIZE=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=2
CONFIG_PREALLOC_TIMERS=2