Select one of the symbols to view example projects that use it.
 
Outline
#define __MAIN_H
Includes
#include "stdio.h"
#include "usbh_core.h"
#include "usbh_mtp.h"
#include "stm324x9i_eval_io.h"
#include "stm324x9i_eval_audio.h"
#include "lcd_log.h"
Exported types
MTP_Demo_State
_DemoStateMachine
AUDIO_Info_t
AUDIO_Demo_State
MTP_ApplicationTypeDef
AUDIO_PLAYBACK_StateTypeDef
AUDIO_ErrorTypeDef
MTP_ErrorTypeDef
MTP_DEMO_SelectMode
hUSBHost;
Appli_state;
audio_state;
Exported functions
Toggle_Leds();
MTP_MenuInit();
MTP_MenuProcess();
AUDIO_PlaybackProbeKey(JOYState_TypeDef);
MTP_ExploreWavFile();
MTP_GetData(uint32_t, uint32_t, uint32_t, uint8_t *, uint32_t *);
MTP_GetWavObjectName(uint16_t, uint8_t *);
MTP_Init();
MTP_GetWavObjectNumber();
AUDIO_Init();
AUDIO_Start(uint8_t);
AUDIO_Process();
AUDIO_Stop();
Files
loading...
CodeScopeSTM32 Libraries and SamplesMTP_StandaloneInc/main.h
 
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file USB_Host/MTP_Standalone/Inc/main.h * @author MCD Application Team * @brief Header for main.c module ****************************************************************************** * @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. * ****************************************************************************** *//* ... */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __MAIN_H #define __MAIN_H /* Includes ------------------------------------------------------------------*/ #include "stdio.h" #include "usbh_core.h" #include "usbh_mtp.h" #include "stm324x9i_eval_io.h" #include "stm324x9i_eval_audio.h" #include "lcd_log.h" 6 includes Includes/* Exported types ------------------------------------------------------------*/ typedef enum { MTP_DEMO_IDLE = 0, MTP_DEMO_WAIT, MTP_DEMO_EXPLORE, MTP_DEMO_PLAYBACK, MTP_REENUMERATE, ...}MTP_Demo_State; typedef struct _DemoStateMachine { __IO MTP_Demo_State state; __IO uint8_t select; ...}MTP_DEMO_StateMachine; typedef struct AUDIO_Info_t { uint32_t ChunkID; /* 0 */ uint32_t FileSize; /* 4 */ uint32_t FileFormat; /* 8 */ uint32_t SubChunk1ID; /* 12 */ uint32_t SubChunk1Size; /* 16 */ uint16_t AudioFormat; /* 20 */ uint16_t NbrChannels; /* 22 */ uint32_t SampleRate; /* 24 */ uint32_t ByteRate; /* 28 */ uint16_t BlockAlign; /* 32 */ uint16_t BitPerSample; /* 34 */ uint32_t SubChunk2ID; /* 36 */ uint32_t SubChunk2Size; /* 40 */ ...}WAV_InfoTypedef; typedef enum { AUDIO_DEMO_IDLE = 0, AUDIO_DEMO_WAIT, AUDIO_DEMO_EXPLORE, AUDIO_DEMO_PLAYBACK, AUDIO_REENUMERATE ...}AUDIO_Demo_State; typedef enum { APPLICATION_IDLE = 0, APPLICATION_START, APPLICATION_READY, APPLICATION_DISCONNECT, ...}MTP_ApplicationTypeDef; typedef enum { AUDIO_STATE_IDLE = 0, AUDIO_STATE_WAIT, AUDIO_STATE_INIT, AUDIO_STATE_CONFIG, AUDIO_STATE_PLAY, AUDIO_STATE_NEXT, AUDIO_STATE_PREVIOUS, AUDIO_STATE_FORWARD, AUDIO_STATE_BACKWARD, AUDIO_STATE_STOP, AUDIO_STATE_PAUSE, AUDIO_STATE_RESUME, AUDIO_STATE_VOLUME_UP, AUDIO_STATE_VOLUME_DOWN, ...}AUDIO_PLAYBACK_StateTypeDef; typedef enum { AUDIO_ERROR_NONE = 0, AUDIO_ERROR_IO, AUDIO_ERROR_EOF, ...}AUDIO_ErrorTypeDef; typedef enum { MTP_ERROR_NONE = 0, MTP_ERROR_IO, MTP_ERROR_INVALID_VALUE, ...}MTP_ErrorTypeDef; typedef enum { MTP_SELECT_MENU = 0, MTP_PLAYBACK_CONTROL , ...}MTP_DEMO_SelectMode; extern USBH_HandleTypeDef hUSBHost; extern MTP_ApplicationTypeDef Appli_state; extern AUDIO_PLAYBACK_StateTypeDef audio_state; Exported types /* Exported constants --------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void Toggle_Leds(void); void MTP_MenuInit(void); void MTP_MenuProcess(void); void AUDIO_PlaybackProbeKey(JOYState_TypeDef state); uint8_t MTP_ExploreWavFile(void); uint8_t MTP_GetData(uint32_t file_idx, uint32_t offset, uint32_t maxbytes, uint8_t *object, uint32_t *len); uint8_t MTP_GetWavObjectName(uint16_t object_index, uint8_t *filename); uint8_t MTP_Init(void); uint16_t MTP_GetWavObjectNumber(void); AUDIO_ErrorTypeDef AUDIO_Init(void); AUDIO_ErrorTypeDef AUDIO_Start(uint8_t idx); AUDIO_ErrorTypeDef AUDIO_Process(void); AUDIO_ErrorTypeDef AUDIO_Stop(void);Exported functions /* ... */#endif /* __MAIN_H */