Select one of the symbols to view example projects that use it.
 
Outline
Includes
#include "main.h"
Private variables
MSC_main_menu
Private function prototypes
MSC_MenuProcess()
Files
loading...
CodeScopeSTM32 Libraries and SamplesDualCore_StandaloneSrc/msc_menu.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file USB_Host/DualCore_Standalone/Src/msc_menu.c * @author MCD Application Team * @brief Mass Storage Process ****************************************************************************** * @attention * * Copyright (c) 2017 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** *//* ... */ /* Includes ------------------------------------------------------------------*/ #include "main.h" Includes /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ uint8_t *MSC_main_menu[] = { (uint8_t *)" 1 - File Operations ", (uint8_t *)" 2 - Explorer Disk ", (uint8_t *)" 3 - Return ", (uint8_t *)" ", ...}; Private variables /* Private function prototypes -----------------------------------------------*/ extern DEMO_StateMachine demo; Private function prototypes /* Private functions ---------------------------------------------------------*/ /** * @brief Manages MSC Menu Process. * @param None * @retval None *//* ... */ void MSC_MenuProcess(void) { switch(demo.msc_state) { case APPLI_MSC_IDLE: Demo_SelectItem(MSC_main_menu, 0); demo.msc_state = APPLI_MSC_WAIT; demo.select = 0; break; case APPLI_MSC_IDLE: case APPLI_MSC_WAIT: if(demo.select != prev_select) { prev_select = demo.select; Demo_SelectItem(MSC_main_menu, demo.select & 0x7F); /* Handle select item */ if(demo.select & 0x80) { demo.select &= 0x7F; switch(demo.select) { case 0: demo.msc_state = APPLI_MSC_FILE_OPERATIONS; break; case 0: case 1: demo.msc_state = APPLI_MSC_EXPLORER; break; case 1: case 2: /* Return */ demo.state = DEMO_IDLE; demo.select = 0; LCD_UsrLogY("> MSC application closed.\n"); f_mount(0,0,0); break; case 2: default: break;default }switch (demo.select) { ... } }if (demo.select & 0x80) { ... } }if (demo.select != prev_select) { ... } break; case APPLI_MSC_WAIT: case APPLI_MSC_FILE_OPERATIONS: /* Read and Write File Here */ if(Appli_HS_state == APPLICATION_HS_READY) { MSC_File_Operations(); }if (Appli_HS_state == APPLICATION_HS_READY) { ... } demo.msc_state = APPLI_MSC_WAIT; break; case APPLI_MSC_FILE_OPERATIONS: case APPLI_MSC_EXPLORER: /* Display disk content */ if(Appli_HS_state == APPLICATION_HS_READY) { Explore_Disk("0:/", 1); }if (Appli_HS_state == APPLICATION_HS_READY) { ... } demo.msc_state = APPLI_MSC_WAIT; break; case APPLI_MSC_EXPLORER: default: break;default }switch (demo.msc_state) { ... } }{ ... }