📄 main.c
字号:
/****************************************************************************************/
/*文件:main.c */
/*功能:ucfs 在STLARM9200上的运行 */
/*描述:测试ucfs在STLARM9200上运行的性能 */
/****************************************************************************************/
/*
历史纪录:
Ver1.00 20050617
*/
#include "stl_ucfs.h"
#include "fs_api.h"
#include "ide.h"
extern void _WriteFile(const char *pName, const char *pTxt);
extern void _DumpFile(const char *pName);
extern void _ShowDirectory(const char * pName);
int main(int argc, char **argv)
{
printf("/*******************************************************/\r\n");
printf("/*名称:start STL_UC/FS */\r\n");
printf("/*版本:Ver1.00 */\r\n");
printf("/*******************************************************/\r\n");
printf(__DATE__);printf("\r\n");
printf(__TIME__);printf("\r\n");
FS__IDE_Init(0);
FS_Init(); /* Init the file system */
printf("ucfs init finash\r\n");
while(1){
int KeyValue;
char String[2];
KeyValue = getchar();
if(KeyValue){
String[0] = KeyValue;
String[1] = 0;
printf(String);
printf("\r\n");
switch(KeyValue){
case 'w':{
_WriteFile("ucfs.ini", "dir 100 \r\nfile 5000\r\nauthor:zhangyifeng\r\n2005/05/23 \
\r\nStartLightVer1.00\r\n 郑州市黑马电子有限公司。\r\nucfs文件系统测试程序。");
break;
}
case 'r':{
_DumpFile("ucfs.ini");
break;
}
case 'd':{
_ShowDirectory("");
break;
}
}
}
}
FS_Exit(); /* End using the file system */
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -