diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-30 19:27:27 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-06-30 19:27:27 +0000 |
commit | 08e6d98c0d7e243f00e6020e12697ff29c4e0f2b (patch) | |
tree | 03107fb8cdf9a437642d6b19b802914cb2c1554e /demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c | |
parent | bd285a8ea2691cb3a48cb616847094c5c3ade347 (diff) | |
download | ChibiOS-08e6d98c0d7e243f00e6020e12697ff29c4e0f2b.tar.gz ChibiOS-08e6d98c0d7e243f00e6020e12697ff29c4e0f2b.tar.bz2 ChibiOS-08e6d98c0d7e243f00e6020e12697ff29c4e0f2b.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4369 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c')
-rw-r--r-- | demos/ARMCM4-STM32F407-LWIP-FATFS-USB/main.c | 11 |
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.
*/
|