Select one of the symbols to view example projects that use it.
 
Outline
#define __MAIN_H
Includes
#include "stm32f4xx_hal.h"
#include "stm32f4_discovery.h"
#include "stm32f4_discovery_audio.h"
#include "stm32f4_discovery_accelerometer.h"
#include <stdio.h>
#include "stm32f4xx_it.h"
#include "waveplayer.h"
#include "waverecorder.h"
#include "ff.h"
#include "ff_gen_drv.h"
#include "usbh_diskio_dma.h"
Exported constants
MSC_ApplicationTypeDef
#define WAVE_NAME
#define REC_WAVE_NAME
#define USBH_USR_FS_INIT
#define USBH_USR_AUDIO
#define CMD_PLAY
#define CMD_RECORD
#define CMD_STOP
#define LED3_TOGGLE
#define LED4_TOGGLE
#define LED6_TOGGLE
#define LEDS_OFF
#define STOP_TOGGLE
#define PAUSE_STATUS
#define RESUME_STATUS
#define IDLE_STATUS
#define REPEAT_ON
#define REPEAT_OFF
#define MEMS_LIS3DSH
#define MEMS_LIS302DL
Exported functions
Error_Handler();
Files
loading...
CodeScopeSTM32 Libraries and SamplesAudio_playback_and_recordInc/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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** ****************************************************************************** * @file Audio/Audio_playback_and_record/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 "stm32f4xx_hal.h" #include "stm32f4_discovery.h" #include "stm32f4_discovery_audio.h" #include "stm32f4_discovery_accelerometer.h" #include <stdio.h> #include "stm32f4xx_it.h" #include "waveplayer.h" #include "waverecorder.h" #include "ff.h" #include "ff_gen_drv.h" #include "usbh_diskio_dma.h" 11 includes Includes /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* Uncomment this define to disable repeat feature */ /* #define PLAY_REPEAT_DISABLED */ typedef enum { APPLICATION_IDLE = 0, APPLICATION_START, APPLICATION_RUNNING, ...} MSC_ApplicationTypeDef; /* You can change the Wave file name as you need, but do not exceed 11 characters */ #define WAVE_NAME "0:audio_sample.wav" #define REC_WAVE_NAME "0:rec.wav" /* State Machine for the USBH_USR_ApplicationState */ #define USBH_USR_FS_INIT ((uint8_t)0x00) #define USBH_USR_AUDIO ((uint8_t)0x01) /* Defines for the Audio used commands */ #define CMD_PLAY ((uint32_t)0x00) #define CMD_RECORD ((uint32_t)0x01) #define CMD_STOP ((uint32_t)0x02) /* Defines for LEDs lighting */ #define LED3_TOGGLE 0x03 /* Toggle LED3 */ #define LED4_TOGGLE 0x04 /* Toggle LED4 */ #define LED6_TOGGLE 0x06 /* Toggle LED6 */ #define LEDS_OFF 0x07 /* Turn OFF all LEDs */ #define STOP_TOGGLE 0x00 /* Stop LED Toggling */ /* Defines for the Audio playing process */ #define PAUSE_STATUS ((uint32_t)0x00) /* Audio Player in Pause Status */ #define RESUME_STATUS ((uint32_t)0x01) /* Audio Player in Resume Status */ #define IDLE_STATUS ((uint32_t)0x02) /* Audio Player in Idle Status */ #define REPEAT_ON ((uint32_t)0x00) /* Replay Status in ON */ #define REPEAT_OFF ((uint32_t)0x01) /* Replay Status in OFF */ /* Defines for MEMS Acclerometer ID Types */ #define MEMS_LIS3DSH 0x3F /* LIS3DSH MEMS Acclerometer ID */ #define MEMS_LIS302DL 0x3B /* LIS302DL MEMS Acclerometer ID */ 19 defines Exported constants /* Exported macro ------------------------------------------------------------*/ /* Exported functions ------------------------------------------------------- */ void Error_Handler(void); Exported functions /* ... */#endif /* __MAIN_H */