diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-10 14:05:08 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-10 14:05:08 +0000 |
commit | 25cecf6e7ef75e0ac60d13177dfc7fbfbfcf55b2 (patch) | |
tree | 1d2220c04fc84740e360785629d954d7a0731a33 /demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery | |
parent | e56574886ed6a3980212b3a878b85af9bf0adbde (diff) | |
download | ChibiOS-25cecf6e7ef75e0ac60d13177dfc7fbfbfcf55b2.tar.gz ChibiOS-25cecf6e7ef75e0ac60d13177dfc7fbfbfcf55b2.tar.bz2 ChibiOS-25cecf6e7ef75e0ac60d13177dfc7fbfbfcf55b2.zip |
Added unified lwIP-FATFS-USB demo.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10808 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery')
4 files changed, 134 insertions, 2 deletions
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/halconf.h b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/halconf.h index cdf73d129..6c90b15c5 100644 --- a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/halconf.h +++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/halconf.h @@ -146,7 +146,7 @@ * @brief Enables the SERIAL subsystem.
*/
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
-#define HAL_USE_SERIAL TRUE
+#define HAL_USE_SERIAL FALSE
#endif
/**
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/mcuconf.h b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/mcuconf.h index fe9e360ee..2b95f6ed1 100644 --- a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/mcuconf.h +++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/mcuconf.h @@ -269,7 +269,7 @@ /*
* SERIAL driver system settings.
*/
-#define STM32_SERIAL_USE_USART1 TRUE
+#define STM32_SERIAL_USE_USART1 FALSE
#define STM32_SERIAL_USE_USART2 FALSE
#define STM32_SERIAL_USE_USART3 FALSE
#define STM32_SERIAL_USE_UART4 FALSE
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/portab.c b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/portab.c new file mode 100644 index 000000000..a3fd920e9 --- /dev/null +++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/portab.c @@ -0,0 +1,60 @@ +/*
+ 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file portab.c
+ * @brief Application portability module code.
+ *
+ * @addtogroup application_portability
+ * @{
+ */
+
+#include "hal.h"
+#include "portab.h"
+
+/*===========================================================================*/
+/* Module local definitions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module exported variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module local types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module local variables. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module local functions. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module exported functions. */
+/*===========================================================================*/
+
+void portab_setup(void) {
+
+ /*
+ * Initialize board LED.
+ */
+ palSetLineMode(LINE_ARD_D13, PAL_MODE_OUTPUT_PUSHPULL);
+}
+
+/** @} */
diff --git a/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/portab.h b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/portab.h new file mode 100644 index 000000000..56e84c198 --- /dev/null +++ b/demos/STM32/RT-STM32-LWIP-FATFS-USB/cfg-stm32f746_discovery/portab.h @@ -0,0 +1,72 @@ +/*
+ 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.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+/**
+ * @file portab.h
+ * @brief Application portability macros and structures.
+ *
+ * @addtogroup application_portability
+ * @{
+ */
+
+#ifndef PORTAB_H
+#define PORTAB_H
+
+/*===========================================================================*/
+/* Module constants. */
+/*===========================================================================*/
+
+#define PORTAB_USB1 USBD2
+
+#define PORTAB_SDU1 SDU2
+
+#define PORTAB_BLINK_LED1 LINE_ARD_D13
+
+/*===========================================================================*/
+/* Module pre-compile time settings. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Derived constants and error checks. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module data structures and types. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* Module macros. */
+/*===========================================================================*/
+
+/*===========================================================================*/
+/* External declarations. */
+/*===========================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void portab_setup(void);
+#ifdef __cplusplus
+}
+#endif
+
+/*===========================================================================*/
+/* Module inline functions. */
+/*===========================================================================*/
+
+#endif /* PORTAB_H */
+
+/** @} */
|