4
38
50
初级会员
使用道具 举报
bytes_per_cluster = sdio_disk.fx_media_bytes_per_sector * sdio_disk.fx_media_sectors_per_cluster; total_bytes = (ULONG64)sdio_disk.fx_media_total_clusters * (ULONG64)bytes_per_cluster;
1万
6万
10万
管理员
eric2013 发表于 2023-5-15 11:53 总容量使用厂家的底层驱动API获取中扇区个数 * 扇区大小,一般这种方式就行。
The_One 发表于 2023-5-15 14:35 FileX也会读一次,如果提供个API看起来就更统一一点。。
eric2013 发表于 2023-5-15 15:26 是的,还是搞个API方便,
The_One 发表于 2023-5-15 16:14 fileX容错有测试过吗
本版积分规则 发表回复 回帖后跳转到最后一页
|小黑屋|Archiver|手机版|硬汉嵌入式论坛
GMT+8, 2024-5-2 18:07 , Processed in 0.184456 second(s), 26 queries .
Powered by Discuz! X3.4 Licensed
Copyright © 2001-2023, Tencent Cloud.