|
|
使用USBX PIMA MTP ,PC端可以发现单片机的盘符。
通过以下代码只能发现默认目录下面的文件
/* Get the first directory entry in the default directory with full information */
status = fx_directory_first_full_entry_find(&mmc_disk, file_name, &attributes, &size,
&year, &month, &day, &hour, &minute, &second);
while (status == FX_SUCCESS)
{
if ((attributes == FX_DIRECTORY) || (attributes == FX_ARCHIVE ))
{
/* Increment total object number counter */
object_handles_counter += 1;
/* Set handle info */
Object_SetHandleInfo(&object_handle_index_num, file_name, size);
/* Reset file name array */
_fx_utility_memory_set((UCHAR*)file_name, 0, FX_MAX_LONG_NAME_LEN);
}
/* Get the next directory entry in the default directory with full information */
status = fx_directory_next_full_entry_find(&mmc_disk, file_name, &attributes, &size,
&year, &month, &day, &hour, &minute, &second);
}
PC端怎么发现盘符下的所有文件,文件夹等信息
|
|