Spark board configurations updated by David Sidrane

This commit is contained in:
Gregory Nutt 2014-02-18 13:50:12 -06:00
parent bbb65432d9
commit 416187d752
10 changed files with 57 additions and 38 deletions

View File

@ -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

View File

@ -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() */

View File

@ -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

View File

@ -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
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
COBJS = $(CSRCS:.c=$(OBJEXT))
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
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)

View File

@ -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
************************************************************************************/

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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