初级会员

- 积分
- 100
- 金钱
- 100
- 注册时间
- 2020-7-29
- 在线时间
- 28 小时
|

楼主 |
发表于 2022-3-29 08:20:59
|
显示全部楼层
u8 USH_User_App(void)
{
u32 total,free;
u8 res=0;
Show_Str(30,140,200,16,"设备连接成功!.",16,0);
res=exf_getfree("2:",&total,&free);
if(res==0)
{
POINT_COLOR=BLUE;//设置字体为蓝色
LCD_ShowString(30,160,200,16,16,"FATFS OK!");
LCD_ShowString(30,180,200,16,16,"U Disk Total Size: MB");
LCD_ShowString(30,200,200,16,16,"U Disk Free Size: MB");
LCD_ShowNum(174,180,total>>10,5,16); //显示U盘总容量 MB
LCD_ShowNum(174,200,free>>10,5,16);
}
while(HCD_IsDeviceConnected(&USB_OTG_Core))//设备连接成功
{
if(wewe==0)
{
wewe=1;
mf_open("2:aa.csv",7);
mf_write("pooolkkj",20);
mf_close();
}
LED1=!LED1;
delay_ms(200);
}
POINT_COLOR=RED;//设置字体为红色
Show_Str(30,140,200,16,"设备连接中...",16,0);
LCD_Fill(30,160,239,220,WHITE);
return res;
}
把要调用的内容放入该函数即可。 |
|