1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
54
58
59
60
61
62
63
64
75
76
80
84
90
95
96
100
101
102
103
104
105
/* ... */
#include "main.h"
Includes
/* ... */
FRESULT Explore_Disk(char *path, uint8_t recu_level)
{
FRESULT res = FR_OK;
FILINFO fno;
DIR dir;
char *fn;
char tmp[14];
uint8_t line_idx = 0;
res = f_opendir(&dir, path);
if(res == FR_OK)
{
while(USBH_MSC_IsReady(&hUSBHost))
{
res = f_readdir(&dir, &fno);
if(res != FR_OK || fno.fname[0] == 0)
{
break;
}if (res != FR_OK || fno.fname[0] == 0) { ... }
if(fno.fname[0] == '.')
{
continue;
}if (fno.fname[0] == '.') { ... }
fn = fno.fname;
strcpy(tmp, fn);
line_idx++;
if(line_idx > 9)
{
line_idx = 0;
LCD_UsrLog("> Press [Key] To Continue.\n");
while(BSP_PB_GetState(BUTTON_KEY) != SET)
{
}while (BSP_PB_GetState(BUTTON_KEY) != SET) { ... }
}if (line_idx > 9) { ... }
if(recu_level == 1)
{
LCD_DbgLog(" |__");
}if (recu_level == 1) { ... }
else if(recu_level == 2)
{
LCD_DbgLog(" | |__");
}else if (recu_level == 2) { ... }
if((fno.fattrib & AM_DIR) == AM_DIR)
{
strcat(tmp, "\n");
LCD_UsrLog((void *)tmp);
Explore_Disk(fn, 2);
}if ((fno.fattrib & AM_DIR) == AM_DIR) { ... }
else
{
strcat(tmp, "\n");
LCD_DbgLog((void *)tmp);
}else { ... }
if(((fno.fattrib & AM_DIR) == AM_DIR)&&(recu_level == 2))
{
Explore_Disk(fn, 2);
}if (((fno.fattrib & AM_DIR) == AM_DIR)&&(recu_level == 2)) { ... }
}while (USBH_MSC_IsReady(&hUSBHost)) { ... }
f_closedir(&dir);
LCD_UsrLog("> Select an operation to Continue.\n" );
}if (res == FR_OK) { ... }
return res;
}{ ... }