git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14990 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
d31efc6531
commit
1f49aa5cef
|
@ -51,4 +51,9 @@
|
|||
#define LWIP_THREAD_PRIORITY (LOWPRIO)
|
||||
#endif
|
||||
|
||||
/* HTTPD settings override.*/
|
||||
#define LWIP_HTTPD_CUSTOM_FILES 1
|
||||
#define LWIP_HTTPD_DYNAMIC_FILE_READ 1
|
||||
#define LWIP_HTTPD_DYNAMIC_HEADERS 1
|
||||
|
||||
#endif /* LWIP_HDR_LWIPOPTS_H__ */
|
||||
|
|
|
@ -291,8 +291,8 @@
|
|||
/*
|
||||
* SDC driver system settings.
|
||||
*/
|
||||
#define STM32_SDC_USE_SDMMC1 TRUE
|
||||
#define STM32_SDC_USE_SDMMC2 FALSE
|
||||
#define STM32_SDC_USE_SDMMC1 FALSE
|
||||
#define STM32_SDC_USE_SDMMC2 TRUE
|
||||
#define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE
|
||||
#define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000
|
||||
#define STM32_SDC_SDMMC_READ_TIMEOUT 1000
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
#define PORTAB_SDU1 SDU2
|
||||
|
||||
#define PORTAB_SDC1 SDCD2
|
||||
|
||||
#define PORTAB_BLINK_LED1 LINE_ARD_D13
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
|
@ -24,10 +24,11 @@
|
|||
#include "chprintf.h"
|
||||
#include "shell.h"
|
||||
|
||||
#include "ff.h"
|
||||
|
||||
#include "lwipthread.h"
|
||||
#include "lwip/apps/httpd.h"
|
||||
|
||||
#include "ff.h"
|
||||
#include "httpd_fatfs.h"
|
||||
|
||||
#include "portab.h"
|
||||
#include "usbcfg.h"
|
||||
|
@ -208,7 +209,7 @@ static void InsertHandler(eventid_t id) {
|
|||
* On insertion SDC initialization and FS mount.
|
||||
*/
|
||||
#if HAL_USE_SDC
|
||||
if (sdcConnect(&SDCD1))
|
||||
if (sdcConnect(&PORTAB_SDC1))
|
||||
#else
|
||||
if (mmcConnect(&MMCD1))
|
||||
#endif
|
||||
|
@ -217,7 +218,7 @@ static void InsertHandler(eventid_t id) {
|
|||
err = f_mount(&SDC_FS, "/", 1);
|
||||
if (err != FR_OK) {
|
||||
#if HAL_USE_SDC
|
||||
sdcDisconnect(&SDCD1);
|
||||
sdcDisconnect(&PORTAB_SDC1);
|
||||
#else
|
||||
mmcDisconnect(&MMCD1);
|
||||
#endif
|
||||
|
@ -233,7 +234,7 @@ static void RemoveHandler(eventid_t id) {
|
|||
|
||||
(void)id;
|
||||
#if HAL_USE_SDC
|
||||
sdcDisconnect(&SDCD1);
|
||||
sdcDisconnect(&PORTAB_SDC1);
|
||||
#else
|
||||
mmcDisconnect(&MMCD1);
|
||||
#endif
|
||||
|
@ -320,12 +321,12 @@ int main(void) {
|
|||
* Activates the SDC driver 1 using default configuration.
|
||||
*/
|
||||
|
||||
sdcStart(&SDCD1, NULL);
|
||||
sdcStart(&PORTAB_SDC1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the card insertion monitor.
|
||||
*/
|
||||
tmr_init(&SDCD1);
|
||||
tmr_init(&PORTAB_SDC1);
|
||||
#else
|
||||
/*
|
||||
* Initializes the MMC driver to work with SPI3.
|
||||
|
@ -348,6 +349,7 @@ int main(void) {
|
|||
/*
|
||||
* Starts the HTTP server.
|
||||
*/
|
||||
httpd_fatfs_init();
|
||||
httpd_init();
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# Compiler options here.
|
||||
ifeq ($(USE_OPT),)
|
||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16
|
||||
USE_OPT = -Og -ggdb -fomit-frame-pointer -falign-functions=16
|
||||
endif
|
||||
|
||||
# C specific options here (added to USE_OPT).
|
||||
|
@ -116,6 +116,7 @@ include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
|||
include $(CHIBIOS)/os/various/shell/shell.mk
|
||||
include $(CHIBIOS)/os/various/lwip_bindings/lwip.mk
|
||||
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
|
||||
include $(CHIBIOS)/os/various/httpd_fatfs_bindings/httpd_fatfs.mk
|
||||
|
||||
# Define linker script file here
|
||||
LDSCRIPT= $(STARTUPLD)/STM32F76xxI.ld
|
||||
|
@ -156,7 +157,7 @@ CPPWARN = -Wall -Wextra -Wundef
|
|||
#
|
||||
|
||||
# List all user C define here, like -D_DEBUG=1
|
||||
UDEFS =
|
||||
UDEFS = -DFATFS_HAL_DEVICE=SDCD2
|
||||
|
||||
# Define ASM defines here
|
||||
UADEFS =
|
||||
|
|
Loading…
Reference in New Issue