aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c')
-rw-r--r--demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c b/demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c
index 6e11d3a03..ae0104e31 100644
--- a/demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c
+++ b/demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c
@@ -110,13 +110,13 @@ static void tmr_init(void *p) {
/**
* @brief FS object.
*/
-FATFS SDC_FS;
+static FATFS SDC_FS;
/* FS mounted and ready.*/
static bool_t fs_ready = FALSE;
/* Generic large buffer.*/
-uint8_t fbuff[1024];
+static uint8_t fbuff[1024];
static FRESULT scan_files(BaseSequentialStream *chp, char *path) {
FRESULT res;
@@ -597,7 +597,7 @@ static msg_t Thread1(void *arg) {
chRegSetThreadName("blinker");
while (TRUE) {
palTogglePad(GPIOC, GPIOC_LED);
- chThdSleepMilliseconds(cnt ? 500 : 125);
+ chThdSleepMilliseconds(fs_ready ? 125 : 500);
}
}
@@ -632,6 +632,11 @@ int main(void) {
usbConnectBus(serusbcfg.usbp);
/*
+ * Shell manager initialization.
+ */
+ shellInit();
+
+ /*
* Activates the serial driver 6 and SDC driver 1 using default
* configuration.
*/