From f665da37bd440685511cf8de662c669cfc9ccc45 Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Thu, 28 Apr 2016 12:12:58 +0200 Subject: fix typos in mcu conf --- testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testhal/STM32/STM32F4xx/USB_HOST') diff --git a/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h b/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h index 888662f..ca2e87a 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h @@ -36,7 +36,7 @@ #define STM32_USE_FSMC_SRAM FALSE #define STM32_SRAM_USE_FSMC_SRAM1 FALSE #define STM32_SRAM_USE_FSMC_SRAM2 FALSE -#define STM32_SRAM_USE_FSMC_SRAM3 FLASE +#define STM32_SRAM_USE_FSMC_SRAM3 FALSE #define STM32_SRAM_USE_FSMC_SRAM4 FALSE /* -- cgit v1.2.3 From 509816147d658d301970a19798024361552c8ae8 Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Thu, 28 Apr 2016 12:31:41 +0200 Subject: fix whitespace --- testhal/STM32/STM32F4xx/USB_HOST/Makefile | 6 +- .../STM32/STM32F4xx/USB_HOST/halconf_community.h | 116 ++++++++++----------- .../STM32/STM32F4xx/USB_HOST/mcuconf_community.h | 24 ++--- 3 files changed, 73 insertions(+), 73 deletions(-) (limited to 'testhal/STM32/STM32F4xx/USB_HOST') diff --git a/testhal/STM32/STM32F4xx/USB_HOST/Makefile b/testhal/STM32/STM32F4xx/USB_HOST/Makefile index d1e5bc9..6a64149 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/Makefile +++ b/testhal/STM32/STM32F4xx/USB_HOST/Makefile @@ -10,7 +10,7 @@ endif # C specific options here (added to USE_OPT). ifeq ($(USE_COPT),) - USE_COPT = + USE_COPT = endif # C++ specific options here (added to USE_OPT). @@ -25,7 +25,7 @@ endif # Linker extra options here. ifeq ($(USE_LDOPT),) - USE_LDOPT = + USE_LDOPT = endif # Enable this if you want link time optimizations (LTO) @@ -102,7 +102,7 @@ include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk include $(CHIBIOS)/test/rt/test.mk # Define linker script file here -LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld +LDSCRIPT = $(STARTUPLD)/STM32F407xG.ld # C sources that can be compiled in ARM or THUMB mode depending on the global # setting. diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h index 7ea0e06..71315eb 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h @@ -82,86 +82,86 @@ /*===========================================================================*/ -/* USBH driver related settings. */ +/* USBH driver related settings. */ /*===========================================================================*/ /* main driver */ -#define HAL_USBH_PORT_DEBOUNCE_TIME 200 -#define HAL_USBH_PORT_RESET_TIMEOUT 500 -#define HAL_USBH_DEVICE_ADDRESS_STABILIZATION 20 +#define HAL_USBH_PORT_DEBOUNCE_TIME 200 +#define HAL_USBH_PORT_RESET_TIMEOUT 500 +#define HAL_USBH_DEVICE_ADDRESS_STABILIZATION 20 /* MSD */ -#define HAL_USBH_USE_MSD 1 +#define HAL_USBH_USE_MSD 1 -#define HAL_USBHMSD_MAX_LUNS 1 -#define HAL_USBHMSD_MAX_INSTANCES 1 +#define HAL_USBHMSD_MAX_LUNS 1 +#define HAL_USBHMSD_MAX_INSTANCES 1 /* IAD */ -#define HAL_USBH_USE_FTDI 1 +#define HAL_USBH_USE_FTDI 1 -#define HAL_USBHFTDI_MAX_PORTS 1 -#define HAL_USBHFTDI_MAX_INSTANCES 1 -#define HAL_USBHFTDI_DEFAULT_SPEED 9600 -#define HAL_USBHFTDI_DEFAULT_FRAMING (USBHFTDI_FRAMING_DATABITS_8 | USBHFTDI_FRAMING_PARITY_NONE | USBHFTDI_FRAMING_STOP_BITS_1) -#define HAL_USBHFTDI_DEFAULT_HANDSHAKE USBHFTDI_HANDSHAKE_NONE -#define HAL_USBHFTDI_DEFAULT_XON 0x11 -#define HAL_USBHFTDI_DEFAULT_XOFF 0x13 +#define HAL_USBHFTDI_MAX_PORTS 1 +#define HAL_USBHFTDI_MAX_INSTANCES 1 +#define HAL_USBHFTDI_DEFAULT_SPEED 9600 +#define HAL_USBHFTDI_DEFAULT_FRAMING (USBHFTDI_FRAMING_DATABITS_8 | USBHFTDI_FRAMING_PARITY_NONE | USBHFTDI_FRAMING_STOP_BITS_1) +#define HAL_USBHFTDI_DEFAULT_HANDSHAKE USBHFTDI_HANDSHAKE_NONE +#define HAL_USBHFTDI_DEFAULT_XON 0x11 +#define HAL_USBHFTDI_DEFAULT_XOFF 0x13 /* IAD */ -#define HAL_USBH_USE_IAD 0 +#define HAL_USBH_USE_IAD 0 /* UVC */ -#define HAL_USBH_USE_UVC 0 +#define HAL_USBH_USE_UVC 0 -#define HAL_USBHUVC_MAX_INSTANCES 1 -#define HAL_USBHUVC_MAX_MAILBOX_SZ 70 -#define HAL_USBHUVC_WORK_RAM_SIZE 20000 -#define HAL_USBHUVC_STATUS_PACKETS_COUNT 10 +#define HAL_USBHUVC_MAX_INSTANCES 1 +#define HAL_USBHUVC_MAX_MAILBOX_SZ 70 +#define HAL_USBHUVC_WORK_RAM_SIZE 20000 +#define HAL_USBHUVC_STATUS_PACKETS_COUNT 10 /* HUB */ -#define HAL_USBH_USE_HUB 1 +#define HAL_USBH_USE_HUB 1 -#define HAL_USBHHUB_MAX_INSTANCES 1 -#define HAL_USBHHUB_MAX_PORTS 6 +#define HAL_USBHHUB_MAX_INSTANCES 1 +#define HAL_USBHHUB_MAX_PORTS 6 /* debug */ -#define USBH_DEBUG_ENABLE 1 -#define USBH_DEBUG_USBHD USBHD1 -#define USBH_DEBUG_SD SD2 -#define USBH_DEBUG_BUFFER 25000 - -#define USBH_DEBUG_ENABLE_TRACE 0 -#define USBH_DEBUG_ENABLE_INFO 1 -#define USBH_DEBUG_ENABLE_WARNINGS 1 -#define USBH_DEBUG_ENABLE_ERRORS 1 - -#define USBH_LLD_DEBUG_ENABLE_TRACE 0 -#define USBH_LLD_DEBUG_ENABLE_INFO 1 -#define USBH_LLD_DEBUG_ENABLE_WARNINGS 1 -#define USBH_LLD_DEBUG_ENABLE_ERRORS 1 - -#define USBHHUB_DEBUG_ENABLE_TRACE 0 -#define USBHHUB_DEBUG_ENABLE_INFO 1 -#define USBHHUB_DEBUG_ENABLE_WARNINGS 1 -#define USBHHUB_DEBUG_ENABLE_ERRORS 1 - -#define USBHMSD_DEBUG_ENABLE_TRACE 0 -#define USBHMSD_DEBUG_ENABLE_INFO 1 -#define USBHMSD_DEBUG_ENABLE_WARNINGS 1 -#define USBHMSD_DEBUG_ENABLE_ERRORS 1 - -#define USBHUVC_DEBUG_ENABLE_TRACE 0 -#define USBHUVC_DEBUG_ENABLE_INFO 1 -#define USBHUVC_DEBUG_ENABLE_WARNINGS 1 -#define USBHUVC_DEBUG_ENABLE_ERRORS 1 - -#define USBHFTDI_DEBUG_ENABLE_TRACE 0 -#define USBHFTDI_DEBUG_ENABLE_INFO 1 -#define USBHFTDI_DEBUG_ENABLE_WARNINGS 1 -#define USBHFTDI_DEBUG_ENABLE_ERRORS 1 +#define USBH_DEBUG_ENABLE 1 +#define USBH_DEBUG_USBHD USBHD1 +#define USBH_DEBUG_SD SD2 +#define USBH_DEBUG_BUFFER 25000 + +#define USBH_DEBUG_ENABLE_TRACE 0 +#define USBH_DEBUG_ENABLE_INFO 1 +#define USBH_DEBUG_ENABLE_WARNINGS 1 +#define USBH_DEBUG_ENABLE_ERRORS 1 + +#define USBH_LLD_DEBUG_ENABLE_TRACE 0 +#define USBH_LLD_DEBUG_ENABLE_INFO 1 +#define USBH_LLD_DEBUG_ENABLE_WARNINGS 1 +#define USBH_LLD_DEBUG_ENABLE_ERRORS 1 + +#define USBHHUB_DEBUG_ENABLE_TRACE 0 +#define USBHHUB_DEBUG_ENABLE_INFO 1 +#define USBHHUB_DEBUG_ENABLE_WARNINGS 1 +#define USBHHUB_DEBUG_ENABLE_ERRORS 1 + +#define USBHMSD_DEBUG_ENABLE_TRACE 0 +#define USBHMSD_DEBUG_ENABLE_INFO 1 +#define USBHMSD_DEBUG_ENABLE_WARNINGS 1 +#define USBHMSD_DEBUG_ENABLE_ERRORS 1 + +#define USBHUVC_DEBUG_ENABLE_TRACE 0 +#define USBHUVC_DEBUG_ENABLE_INFO 1 +#define USBHUVC_DEBUG_ENABLE_WARNINGS 1 +#define USBHUVC_DEBUG_ENABLE_ERRORS 1 + +#define USBHFTDI_DEBUG_ENABLE_TRACE 0 +#define USBHFTDI_DEBUG_ENABLE_INFO 1 +#define USBHFTDI_DEBUG_ENABLE_WARNINGS 1 +#define USBHFTDI_DEBUG_ENABLE_ERRORS 1 /*===========================================================================*/ /* FSMCNAND driver related settings. */ diff --git a/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h b/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h index ca2e87a..56775af 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/mcuconf_community.h @@ -48,19 +48,19 @@ /* * USBH driver system settings. */ +#define STM32_OTG1_CHANNELS_NUMBER 8 +#define STM32_OTG2_CHANNELS_NUMBER 12 -#define STM32_OTG1_CHANNELS_NUMBER 8 -#define STM32_OTG2_CHANNELS_NUMBER 12 +#define STM32_USBH_USE_OTG1 1 +#define STM32_OTG1_RXFIFO_SIZE 1024 +#define STM32_OTG1_PTXFIFO_SIZE 128 +#define STM32_OTG1_NPTXFIFO_SIZE 128 -#define STM32_USBH_USE_OTG1 1 -#define STM32_OTG1_RXFIFO_SIZE 1024 -#define STM32_OTG1_PTXFIFO_SIZE 128 -#define STM32_OTG1_NPTXFIFO_SIZE 128 +#define STM32_USBH_USE_OTG2 0 +#define STM32_OTG2_RXFIFO_SIZE 2048 +#define STM32_OTG2_PTXFIFO_SIZE 1024 +#define STM32_OTG2_NPTXFIFO_SIZE 1024 -#define STM32_USBH_USE_OTG2 0 -#define STM32_OTG2_RXFIFO_SIZE 2048 -#define STM32_OTG2_PTXFIFO_SIZE 1024 -#define STM32_OTG2_NPTXFIFO_SIZE 1024 +#define STM32_USBH_MIN_QSPACE 4 +#define STM32_USBH_CHANNELS_NP 4 -#define STM32_USBH_MIN_QSPACE 4 -#define STM32_USBH_CHANNELS_NP 4 -- cgit v1.2.3 From 367bc6bcce15d90b49b040d865c3a8f69321b80e Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Sun, 1 May 2016 01:38:31 +0200 Subject: update stm32 demo and testhal projects to upstream chibios --- testhal/STM32/STM32F4xx/USB_HOST/Makefile | 21 +++++----- testhal/STM32/STM32F4xx/USB_HOST/chconf.h | 61 ++++++++++++++++++++---------- testhal/STM32/STM32F4xx/USB_HOST/halconf.h | 54 +++++++++++++++++++++++--- testhal/STM32/STM32F4xx/USB_HOST/mcuconf.h | 31 +++++++++++++-- 4 files changed, 129 insertions(+), 38 deletions(-) (limited to 'testhal/STM32/STM32F4xx/USB_HOST') diff --git a/testhal/STM32/STM32F4xx/USB_HOST/Makefile b/testhal/STM32/STM32F4xx/USB_HOST/Makefile index 6a64149..4946cba 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/Makefile +++ b/testhal/STM32/STM32F4xx/USB_HOST/Makefile @@ -69,7 +69,7 @@ ifeq ($(USE_EXCEPTIONS_STACKSIZE),) USE_EXCEPTIONS_STACKSIZE = 0x800 endif -# Enables the use of FPU on Cortex-M4 (no, softfp, hard). +# Enables the use of FPU (no, softfp, hard). ifeq ($(USE_FPU),) USE_FPU = no endif @@ -89,7 +89,7 @@ PROJECT = ch CHIBIOS = ../../../../../ChibiOS-RT CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib # Startup files. -include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk +include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk # HAL-OSAL files (optional). include $(CHIBIOS_CONTRIB)/os/hal/hal.mk include $(CHIBIOS_CONTRIB)/os/hal/ports/STM32/STM32F4xx/platform.mk @@ -97,9 +97,12 @@ include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk include $(CHIBIOS)/os/hal/osal/rt/osal.mk # RTOS files (optional). include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). include $(CHIBIOS)/test/rt/test.mk +include $(CHIBIOS)/os/hal/lib/streams/streams.mk +include $(CHIBIOS)/os/various/shell/shell.mk +include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk # Define linker script file here LDSCRIPT = $(STARTUPLD)/STM32F407xG.ld @@ -114,10 +117,10 @@ CSRC = $(STARTUPSRC) \ $(PLATFORMSRC) \ $(BOARDSRC) \ $(TESTSRC) \ - $(CHIBIOS)/os/various/shell.c \ - $(CHIBIOS)/os/hal/lib/streams/memstreams.c \ - $(CHIBIOS)/os/hal/lib/streams/chprintf.c \ - ff.c fatfs_diskio.c main.c + $(FATFSSRC) \ + $(STREAMSSRC) \ + $(SHELLSRC) \ + main.c # C++ sources that can be compiled in ARM or THUMB mode depending on the global # setting. @@ -150,7 +153,7 @@ ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM) INCDIR = $(CHIBIOS)/os/license \ $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ - $(CHIBIOS)/os/hal/lib/streams \ + $(STREAMSINC) $(SHELLINC) $(FATFSINC) \ $(CHIBIOS)/os/various # @@ -219,5 +222,5 @@ ULIBS = # End of user defines ############################################################################## -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC +RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk diff --git a/testhal/STM32/STM32F4xx/USB_HOST/chconf.h b/testhal/STM32/STM32F4xx/USB_HOST/chconf.h index 75802f0..449cb3d 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/chconf.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/chconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,8 +25,10 @@ * @{ */ -#ifndef _CHCONF_H_ -#define _CHCONF_H_ +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ /*===========================================================================*/ /** @@ -262,14 +264,6 @@ */ #define CH_CFG_USE_MAILBOXES TRUE -/** - * @brief I/O Queues APIs. - * @details If enabled then the I/O queues APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_QUEUES TRUE - /** * @brief Core Memory Manager APIs. * @details If enabled then the core memory manager APIs are included @@ -357,12 +351,18 @@ /** * @brief Debug option, trace buffer. - * @details If enabled then the context switch circular trace buffer is - * activated. + * @details If enabled then the trace buffer is activated. * - * @note The default is @p FALSE. + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. */ -#define CH_DBG_ENABLE_TRACE FALSE +#define CH_DBG_TRACE_BUFFER_SIZE 128 /** * @brief Debug option, stack checks. @@ -427,10 +427,6 @@ /** * @brief Threads finalization hook. * @details User finalization code added to the @p chThdExit() API. - * - * @note It is inserted into lock zone. - * @note It is also invoked when the threads simply return in order to - * terminate. */ #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ @@ -444,6 +440,20 @@ /* Context switch code here.*/ \ } +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + /** * @brief Idle thread enter hook. * @note This hook is invoked within a critical zone, no OS functions @@ -451,6 +461,7 @@ * @note This macro can be used to activate a power saving mode. */ #define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ } /** @@ -460,6 +471,7 @@ * @note This macro can be used to deactivate a power saving mode. */ #define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ } /** @@ -490,12 +502,21 @@ usbDbgSystemHalted(); \ } +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + /** @} */ /*===========================================================================*/ /* Port-specific settings (override port settings defaulted in chcore.h). */ /*===========================================================================*/ -#endif /* _CHCONF_H_ */ +#endif /* CHCONF_H */ /** @} */ diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf.h index 332a95a..9ddbb1b 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/halconf.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,8 +25,8 @@ * @{ */ -#ifndef _HALCONF_H_ -#define _HALCONF_H_ +#ifndef HALCONF_H +#define HALCONF_H #include "mcuconf.h" @@ -309,13 +309,21 @@ * @brief Serial over USB buffers size. * @details Configuration parameter, the buffer size must be a multiple of * the USB data endpoint maximum packet size. - * @note The default is 64 bytes for both the transmission and receive + * @note The default is 256 bytes for both the transmission and receive * buffers. */ #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) #define SERIAL_USB_BUFFERS_SIZE 256 #endif +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + /*===========================================================================*/ /* SPI driver related settings. */ /*===========================================================================*/ @@ -336,8 +344,44 @@ #define SPI_USE_MUTUAL_EXCLUSION TRUE #endif +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT FALSE +#endif + +/*===========================================================================*/ +/* Community drivers's includes */ +/*===========================================================================*/ + #include "halconf_community.h" -#endif /* _HALCONF_H_ */ +#endif /* HALCONF_H */ /** @} */ diff --git a/testhal/STM32/STM32F4xx/USB_HOST/mcuconf.h b/testhal/STM32/STM32F4xx/USB_HOST/mcuconf.h index 39a3ef6..c7671b7 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/mcuconf.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -14,8 +14,8 @@ limitations under the License. */ -#ifndef _MCUCONF_H_ -#define _MCUCONF_H_ +#ifndef MCUCONF_H +#define MCUCONF_H /* * STM32F4xx drivers configuration. @@ -170,6 +170,21 @@ #define STM32_I2C_I2C3_DMA_PRIORITY 3 #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + /* * ICU driver system settings. */ @@ -319,6 +334,14 @@ #define STM32_USB_OTG_THREAD_STACK_SIZE 128 #define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +/* + * header for community drivers. + */ #include "mcuconf_community.h" -#endif /* _MCUCONF_H_ */ +#endif /* MCUCONF_H */ -- cgit v1.2.3 From 65ba371306b8e4ab07aa7936a132610df14eea3d Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Sun, 1 May 2016 02:25:32 +0200 Subject: fix warnings in STM32 projects because of missing configs --- testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testhal/STM32/STM32F4xx/USB_HOST') diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h index 71315eb..49db499 100644 --- a/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h +++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf_community.h @@ -60,17 +60,17 @@ #endif /** - * @brief Enables the IWDG subsystem. + * @brief Enables the RNG subsystem. */ -#if !defined(HAL_USE_IWDG) || defined(__DOXYGEN__) -#define HAL_USE_IWDG FALSE +#if !defined(HAL_USE_RNG) || defined(__DOXYGEN__) +#define HAL_USE_RNG FALSE #endif /** * @brief Enables the TIMCAP subsystem. */ #if !defined(HAL_USE_TIMCAP) || defined(__DOXYGEN__) -#define HAL_USE_TIMCAP FALSE +#define HAL_USE_TIMCAP FALSE #endif /** -- cgit v1.2.3