├── images
└── schematic1.png
├── Release
├── flash.sh
├── objects.mk
├── make_flash.sh
├── sources.mk
├── pinout.txt
├── Core
│ ├── Startup
│ │ └── subdir.mk
│ ├── subdir.mk
│ └── Src
│ │ └── subdir.mk
├── USB_DEVICE
│ ├── Target
│ │ └── subdir.mk
│ └── App
│ │ └── subdir.mk
├── Middlewares
│ └── ST
│ │ └── STM32_USB_Device_Library
│ │ ├── Class
│ │ └── AUDIO
│ │ │ └── Src
│ │ │ └── subdir.mk
│ │ └── Core
│ │ └── Src
│ │ └── subdir.mk
├── objects.list
├── makefile
└── Drivers
│ └── STM32F4xx_HAL_Driver
│ └── Src
│ └── subdir.mk
├── Drivers
├── CMSIS
│ ├── Device
│ │ └── ST
│ │ │ └── STM32F4xx
│ │ │ ├── Include
│ │ │ ├── stm32f4xx.h
│ │ │ └── system_stm32f4xx.h
│ │ │ └── License.md
│ └── Include
│ │ ├── cmsis_version.h
│ │ ├── tz_context.h
│ │ └── cmsis_compiler.h
└── STM32F4xx_HAL_Driver
│ ├── License.md
│ ├── Inc
│ ├── stm32f4xx_hal_flash_ramfunc.h
│ ├── stm32f4xx_hal_dma_ex.h
│ ├── stm32f4xx_hal_pcd_ex.h
│ ├── stm32f4xx_hal_def.h
│ └── stm32f4xx_hal_i2s_ex.h
│ └── Src
│ ├── stm32f4xx_hal_flash_ramfunc.c
│ └── stm32f4xx_ll_exti.c
├── .settings
├── stm32cubeide.project.prefs
└── language.settings.xml
├── .gitignore
├── .project
├── README.md
├── Core
├── Inc
│ ├── stm32_assert.h
│ ├── stm32f4xx_it.h
│ └── main.h
└── Src
│ ├── sysmem.c
│ ├── syscalls.c
│ ├── fonts.h
│ ├── st7789.h
│ └── stm32f4xx_it.c
├── Middlewares
└── ST
│ └── STM32_USB_Device_Library
│ ├── Core
│ ├── Inc
│ │ ├── usbd_ctlreq.h
│ │ ├── usbd_ioreq.h
│ │ └── usbd_core.h
│ └── Src
│ │ └── usbd_ioreq.c
│ └── Class
│ └── AUDIO
│ └── Inc
│ └── usbd_audio.h
├── USB_DEVICE
├── App
│ ├── usb_device.h
│ ├── usb_device.c
│ ├── usbd_audio_if.h
│ ├── usbd_desc.h
│ └── usbd_audio_if.c
└── Target
│ └── usbd_conf.h
├── STM32F401CCUX_FLASH.ld
├── stm32f401ccAudioNative Release.launch
└── stm32f401ccAudioNative Debug.launch
/images/schematic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdima1357/stm32f401ccAudioNative/HEAD/images/schematic1.png
--------------------------------------------------------------------------------
/Release/flash.sh:
--------------------------------------------------------------------------------
1 | openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program stm32f401ccAudioNative.elf verify reset exit"
2 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sdima1357/stm32f401ccAudioNative/HEAD/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
--------------------------------------------------------------------------------
/.settings/stm32cubeide.project.prefs:
--------------------------------------------------------------------------------
1 | 66BE74F758C12D739921AEA421D593D3=4
2 | 8DF89ED150041C4CBC7CB9A9CAA90856=AC11D2DB234451898112799B119E4CB6
3 | DC22A860405A8BF2F2C095E5B6529F12=AC11D2DB234451898112799B119E4CB6
4 | eclipse.preferences.version=1
5 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/License.md:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016 STMicroelectronics
2 |
3 | This software component is licensed by STMicroelectronics under the **BSD-3-Clause** license. You may not use this file except in compliance with this license. You may obtain a copy of the license [here](https://opensource.org/licenses/BSD-3-Clause).
--------------------------------------------------------------------------------
/Release/objects.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | USER_OBJS :=
7 |
8 | LIBS :=
9 |
10 |
--------------------------------------------------------------------------------
/Release/make_flash.sh:
--------------------------------------------------------------------------------
1 | make clean
2 | make all
3 | arm-none-eabi-objcopy -O binary stm32f401ccAudioNative.elf stm32f401ccAudioNative.bin
4 | st-flash write stm32f401ccAudioNative.bin 0x8000000
5 | #openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program stm32f401ccAudioNative.bin exit 0x08000000"
6 | #openocd -f interface/stlink.cfg -f target/stm32f4x.cfg -c "program stm32f401ccAudioNative.elf verify reset exit"
7 |
8 | #arm-none-eabi-gcc --version
9 | #openocd --version
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Object files
5 | *.o
6 | *.ko
7 | *.obj
8 | *.elf
9 |
10 | # Linker output
11 | *.ilk
12 | *.map
13 | *.exp
14 |
15 | # Precompiled Headers
16 | *.gch
17 | *.pch
18 |
19 | # Libraries
20 | *.lib
21 | *.a
22 | *.la
23 | *.lo
24 |
25 | # Shared objects (inc. Windows DLLs)
26 | *.dll
27 | *.so
28 | *.so.*
29 | *.dylib
30 |
31 | # Executables
32 | *.exe
33 | *.out
34 | *.app
35 | *.i*86
36 | *.x86_64
37 | *.hex
38 |
39 | # Debug files
40 | *.dSYM/
41 | *.su
42 | *.idb
43 | *.pdb
44 |
45 | # Kernel Module Compile Results
46 | *.mod*
47 | *.cmd
48 | .tmp_versions/
49 | modules.order
50 | Module.symvers
51 | Mkfile.old
52 | dkms.conf
53 |
--------------------------------------------------------------------------------
/Release/sources.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | ELF_SRCS :=
7 | OBJ_SRCS :=
8 | S_SRCS :=
9 | C_SRCS :=
10 | S_UPPER_SRCS :=
11 | O_SRCS :=
12 | SIZE_OUTPUT :=
13 | OBJDUMP_LIST :=
14 | SU_FILES :=
15 | EXECUTABLES :=
16 | OBJS :=
17 | MAP_FILES :=
18 | S_DEPS :=
19 | S_UPPER_DEPS :=
20 | C_DEPS :=
21 |
22 | # Every subdirectory with source files must be described here
23 | SUBDIRS := \
24 | Core/Src \
25 | Core/Startup \
26 | Drivers/STM32F4xx_HAL_Driver/Src \
27 | Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src \
28 | Middlewares/ST/STM32_USB_Device_Library/Core/Src \
29 | USB_DEVICE/App \
30 | USB_DEVICE/Target \
31 |
32 |
--------------------------------------------------------------------------------
/Release/pinout.txt:
--------------------------------------------------------------------------------
1 | //!!!!!!!!!!!!!stm32f401ccu6!!!!!!!!!!!!!
2 | V5+ VIN
3 | GND GND
4 | B12 (i2s2_ws) LCK
5 | B15 (i2s2_sd) DIN
6 | B10 (i2s2_ck) BCK
7 | GND SCK
8 | PB2 (mute_out) XSMT
9 |
10 | !!!V3.3+,GND ,LCD_BL & LCD_RESET are common for both displays!!!
11 |
12 | LEFT or siigle display:
13 | GND GND
14 | V3.3+ VCC
15 | PB3 (SPI3_SCK) SCK
16 | PB5 (SPI3_MOSI) SDA
17 | PB8 (LCD_RESET) RES
18 | PB4 (LCD_CMD) DC (data/command)
19 | PB9(LCD_BL) BLK (back light)
20 |
21 | RIGHT display(optional):
22 | GND GND
23 | V3.3+ VCC
24 | PA5 (SPI1_SCK) SCK
25 | PA7 (SPI1_MOSI) SDA
26 | PB8 (LCD_RESET) RES
27 | PA4 (LCD1_CMD) DC (data/command)
28 | PB9(LCD_BL) BLK (back light)
29 |
30 | rotate encoder (optional)
31 | GND GND
32 | V3.3+ +
33 | PA0 SW
34 | PA15 DT
35 | PA1 CLK
36 |
--------------------------------------------------------------------------------
/Release/Core/Startup/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | S_SRCS += \
8 | ../Core/Startup/startup_stm32f401ccux.s
9 |
10 | OBJS += \
11 | ./Core/Startup/startup_stm32f401ccux.o
12 |
13 | S_DEPS += \
14 | ./Core/Startup/startup_stm32f401ccux.d
15 |
16 |
17 | # Each subdirectory must supply rules for building sources it contributes
18 | Core/Startup/%.o: ../Core/Startup/%.s Core/Startup/subdir.mk
19 | arm-none-eabi-gcc -mcpu=cortex-m4 -c -x assembler-with-cpp -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" "$<"
20 |
21 | clean: clean-Core-2f-Startup
22 |
23 | clean-Core-2f-Startup:
24 | -$(RM) ./Core/Startup/startup_stm32f401ccux.d ./Core/Startup/startup_stm32f401ccux.o
25 |
26 | .PHONY: clean-Core-2f-Startup
27 |
28 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | stm32f401ccAudioNative
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
10 | clean,full,incremental,
11 |
12 |
13 |
14 |
15 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
16 | full,incremental,
17 |
18 |
19 |
20 |
21 |
22 | com.st.stm32cube.ide.mcu.MCUProjectNature
23 | com.st.stm32cube.ide.mcu.MCUCubeProjectNature
24 | org.eclipse.cdt.core.cnature
25 | com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature
26 | com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature
27 | com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature
28 | com.st.stm32cube.ide.mcu.MCURootProjectNature
29 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
30 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Release/Core/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../Core/main.c
9 |
10 | OBJS += \
11 | ./Core/main.o
12 |
13 | C_DEPS += \
14 | ./Core/main.d
15 |
16 |
17 | # Each subdirectory must supply rules for building sources it contributes
18 | Core/%.o Core/%.su: ../Core/%.c Core/subdir.mk
19 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
20 |
21 | clean: clean-Core
22 |
23 | clean-Core:
24 | -$(RM) ./Core/main.d ./Core/main.o ./Core/main.su
25 |
26 | .PHONY: clean-Core
27 |
28 |
--------------------------------------------------------------------------------
/Release/USB_DEVICE/Target/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../USB_DEVICE/Target/usbd_conf.c
9 |
10 | OBJS += \
11 | ./USB_DEVICE/Target/usbd_conf.o
12 |
13 | C_DEPS += \
14 | ./USB_DEVICE/Target/usbd_conf.d
15 |
16 |
17 | # Each subdirectory must supply rules for building sources it contributes
18 | USB_DEVICE/Target/%.o USB_DEVICE/Target/%.su: ../USB_DEVICE/Target/%.c USB_DEVICE/Target/subdir.mk
19 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
20 |
21 | clean: clean-USB_DEVICE-2f-Target
22 |
23 | clean-USB_DEVICE-2f-Target:
24 | -$(RM) ./USB_DEVICE/Target/usbd_conf.d ./USB_DEVICE/Target/usbd_conf.o ./USB_DEVICE/Target/usbd_conf.su
25 |
26 | .PHONY: clean-USB_DEVICE-2f-Target
27 |
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # stm32f401ccAudioNative
2 | stm32 black pill usb sound card
3 | last one:
4 |
5 |
6 |
7 | https://www.youtube.com/watch?v=0MmWp3HdV2A
8 |
9 | https://www.youtube.com/watch?v=GbiTxVYopDI
10 |
11 | https://www.youtube.com/watch?v=TnEBuS5ONsY
12 |
13 |
14 |
15 |
16 | High quality, low noise DAC based on 2 PWM timer channels with virtual software Sigma Delta ADC between stream from usb and PWM output.
17 | There is implemented "sigma-delta floating point encoder" workaround of native stm32f401 limit 10.5 bits on 44100 Hz (1904 levels=84MHz/44.1KHz )
18 | So, we can have for only $3 ,very low noise , high sound quality solution, which better then most onboard sound cards !
19 |
20 | There is implemented virtual software second order sigma delta adc for the shift quantization noise to high frequency.
21 | see here (it [provide useful links too at the end of document):
22 |
23 | https://www.analog.com/media/en/training-seminars/tutorials/MT-022.pdf
24 |
25 | But instead one bit ( two levels ) i use more bits (0-MAX_LEVELS) Same technology can be used for esp32 high quality sound rendering.
26 |
27 | 14.04.2022 :
28 |
29 | Added second order sigma-delta
30 |
31 | number of LCD from zero to 2
32 |
33 | minor bugs fixed
34 |
35 | optional external i2s module
36 |
37 |
38 | 21.04.2022 :
39 | -- Change to open drain timer1 PWM outputs( PA8 PA9 ) config for better noise supression.
40 |
41 | 27.04.2022
42 |
43 | -- pll bug fix
44 |
45 | -- up pwm freq to 384KHz - significant sound quality improvment
46 |
47 | -- add tty output
48 |
49 | 7.06.2022
50 |
51 | -- Merge with cdu6 (spdif,pll,int,lcds)
52 |
53 | -- add binary(2 lcd & i2s by default) & makefile into Release
54 | -- add ref stm s*1357
55 |
56 | 
57 |
58 |
59 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Include/cmsis_version.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file cmsis_version.h
3 | * @brief CMSIS Core(M) Version definitions
4 | * @version V5.0.2
5 | * @date 19. April 2017
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2009-2017 ARM Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #if defined ( __ICCARM__ )
26 | #pragma system_include /* treat file as system include file for MISRA check */
27 | #elif defined (__clang__)
28 | #pragma clang system_header /* treat file as system include file */
29 | #endif
30 |
31 | #ifndef __CMSIS_VERSION_H
32 | #define __CMSIS_VERSION_H
33 |
34 | /* CMSIS Version definitions */
35 | #define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
36 | #define __CM_CMSIS_VERSION_SUB ( 1U) /*!< [15:0] CMSIS Core(M) sub version */
37 | #define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
38 | __CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
39 | #endif
40 |
--------------------------------------------------------------------------------
/Release/USB_DEVICE/App/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../USB_DEVICE/App/usb_device.c \
9 | ../USB_DEVICE/App/usbd_audio_if.c \
10 | ../USB_DEVICE/App/usbd_desc.c
11 |
12 | OBJS += \
13 | ./USB_DEVICE/App/usb_device.o \
14 | ./USB_DEVICE/App/usbd_audio_if.o \
15 | ./USB_DEVICE/App/usbd_desc.o
16 |
17 | C_DEPS += \
18 | ./USB_DEVICE/App/usb_device.d \
19 | ./USB_DEVICE/App/usbd_audio_if.d \
20 | ./USB_DEVICE/App/usbd_desc.d
21 |
22 |
23 | # Each subdirectory must supply rules for building sources it contributes
24 | USB_DEVICE/App/%.o USB_DEVICE/App/%.su: ../USB_DEVICE/App/%.c USB_DEVICE/App/subdir.mk
25 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
26 |
27 | clean: clean-USB_DEVICE-2f-App
28 |
29 | clean-USB_DEVICE-2f-App:
30 | -$(RM) ./USB_DEVICE/App/usb_device.d ./USB_DEVICE/App/usb_device.o ./USB_DEVICE/App/usb_device.su ./USB_DEVICE/App/usbd_audio_if.d ./USB_DEVICE/App/usbd_audio_if.o ./USB_DEVICE/App/usbd_audio_if.su ./USB_DEVICE/App/usbd_desc.d ./USB_DEVICE/App/usbd_desc.o ./USB_DEVICE/App/usbd_desc.su
31 |
32 | .PHONY: clean-USB_DEVICE-2f-App
33 |
34 |
--------------------------------------------------------------------------------
/Release/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.c
9 |
10 | OBJS += \
11 | ./Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.o
12 |
13 | C_DEPS += \
14 | ./Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.d
15 |
16 |
17 | # Each subdirectory must supply rules for building sources it contributes
18 | Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/%.o Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/%.su: ../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/%.c Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/subdir.mk
19 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
20 |
21 | clean: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Class-2f-AUDIO-2f-Src
22 |
23 | clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Class-2f-AUDIO-2f-Src:
24 | -$(RM) ./Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.d ./Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.o ./Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.su
25 |
26 | .PHONY: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Class-2f-AUDIO-2f-Src
27 |
28 |
--------------------------------------------------------------------------------
/.settings/language.settings.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/Core/Inc/stm32_assert.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32_assert.h
4 | * @brief STM32 assert file.
5 | ******************************************************************************
6 | * @attention
7 | *
8 | *
© Copyright (c) 2018 STMicroelectronics.
9 | * All rights reserved.
10 | *
11 | * This software component is licensed by ST under BSD 3-Clause license,
12 | * the "License"; You may not use this file except in compliance with the
13 | * License. You may obtain a copy of the License at:
14 | * opensource.org/licenses/BSD-3-Clause
15 | *
16 | ******************************************************************************
17 | */
18 |
19 | /* Define to prevent recursive inclusion -------------------------------------*/
20 | #ifndef __STM32_ASSERT_H
21 | #define __STM32_ASSERT_H
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | /* Exported types ------------------------------------------------------------*/
28 | /* Exported constants --------------------------------------------------------*/
29 | /* Includes ------------------------------------------------------------------*/
30 | /* Exported macro ------------------------------------------------------------*/
31 | #ifdef USE_FULL_ASSERT
32 | /**
33 | * @brief The assert_param macro is used for function's parameters check.
34 | * @param expr: If expr is false, it calls assert_failed function
35 | * which reports the name of the source file and the source
36 | * line number of the call that failed.
37 | * If expr is true, it returns no value.
38 | * @retval None
39 | */
40 | #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
41 | /* Exported functions ------------------------------------------------------- */
42 | void assert_failed(uint8_t* file, uint32_t line);
43 | #else
44 | #define assert_param(expr) ((void)0U)
45 | #endif /* USE_FULL_ASSERT */
46 |
47 | #ifdef __cplusplus
48 | }
49 | #endif
50 |
51 | #endif /* __STM32_ASSERT_H */
52 |
53 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
54 |
--------------------------------------------------------------------------------
/Release/objects.list:
--------------------------------------------------------------------------------
1 | "./Core/Src/dual.o"
2 | "./Core/Src/font8.o"
3 | "./Core/Src/main.o"
4 | "./Core/Src/single.o"
5 | "./Core/Src/st7789.o"
6 | "./Core/Src/stm32f4xx_hal_msp.o"
7 | "./Core/Src/stm32f4xx_it.o"
8 | "./Core/Src/syscalls.o"
9 | "./Core/Src/sysmem.o"
10 | "./Core/Src/system_stm32f4xx.o"
11 | "./Core/Startup/startup_stm32f401ccux.o"
12 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o"
13 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o"
14 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o"
15 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o"
16 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o"
17 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o"
18 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o"
19 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o"
20 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o"
21 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.o"
22 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.o"
23 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o"
24 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o"
25 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o"
26 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o"
27 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o"
28 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o"
29 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o"
30 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o"
31 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o"
32 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o"
33 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.o"
34 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.o"
35 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.o"
36 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.o"
37 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.o"
38 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o"
39 | "./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.o"
40 | "./Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/usbd_audio.o"
41 | "./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o"
42 | "./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o"
43 | "./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o"
44 | "./USB_DEVICE/App/usb_device.o"
45 | "./USB_DEVICE/App/usbd_audio_if.o"
46 | "./USB_DEVICE/App/usbd_desc.o"
47 | "./USB_DEVICE/Target/usbd_conf.o"
48 |
--------------------------------------------------------------------------------
/Core/Inc/stm32f4xx_it.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file stm32f4xx_it.h
5 | * @brief This file contains the headers of the interrupt handlers.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2022 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __STM32F4xx_IT_H
23 | #define __STM32F4xx_IT_H
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Private includes ----------------------------------------------------------*/
30 | /* USER CODE BEGIN Includes */
31 |
32 | /* USER CODE END Includes */
33 |
34 | /* Exported types ------------------------------------------------------------*/
35 | /* USER CODE BEGIN ET */
36 |
37 | /* USER CODE END ET */
38 |
39 | /* Exported constants --------------------------------------------------------*/
40 | /* USER CODE BEGIN EC */
41 |
42 | /* USER CODE END EC */
43 |
44 | /* Exported macro ------------------------------------------------------------*/
45 | /* USER CODE BEGIN EM */
46 |
47 | /* USER CODE END EM */
48 |
49 | /* Exported functions prototypes ---------------------------------------------*/
50 | void NMI_Handler(void);
51 | void HardFault_Handler(void);
52 | void MemManage_Handler(void);
53 | void BusFault_Handler(void);
54 | void UsageFault_Handler(void);
55 | void SVC_Handler(void);
56 | void DebugMon_Handler(void);
57 | void PendSV_Handler(void);
58 | void SysTick_Handler(void);
59 | void DMA1_Stream4_IRQHandler(void);
60 | void DMA1_Stream5_IRQHandler(void);
61 | void DMA2_Stream1_IRQHandler(void);
62 | void DMA2_Stream2_IRQHandler(void);
63 | void OTG_FS_IRQHandler(void);
64 | /* USER CODE BEGIN EFP */
65 |
66 | /* USER CODE END EFP */
67 |
68 | #ifdef __cplusplus
69 | }
70 | #endif
71 |
72 | #endif /* __STM32F4xx_IT_H */
73 |
74 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
75 |
--------------------------------------------------------------------------------
/Release/Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c \
9 | ../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c \
10 | ../Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c
11 |
12 | OBJS += \
13 | ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o \
14 | ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o \
15 | ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o
16 |
17 | C_DEPS += \
18 | ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.d \
19 | ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.d \
20 | ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.d
21 |
22 |
23 | # Each subdirectory must supply rules for building sources it contributes
24 | Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.o Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.su: ../Middlewares/ST/STM32_USB_Device_Library/Core/Src/%.c Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk
25 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
26 |
27 | clean: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Core-2f-Src
28 |
29 | clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Core-2f-Src:
30 | -$(RM) ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.d ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.o ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.su ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.d ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.o ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.su ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.d ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.o ./Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.su
31 |
32 | .PHONY: clean-Middlewares-2f-ST-2f-STM32_USB_Device_Library-2f-Core-2f-Src
33 |
34 |
--------------------------------------------------------------------------------
/Release/Core/Src/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../Core/Src/dual.c \
9 | ../Core/Src/font8.c \
10 | ../Core/Src/main.c \
11 | ../Core/Src/single.c \
12 | ../Core/Src/st7789.c \
13 | ../Core/Src/stm32f4xx_hal_msp.c \
14 | ../Core/Src/stm32f4xx_it.c \
15 | ../Core/Src/syscalls.c \
16 | ../Core/Src/sysmem.c \
17 | ../Core/Src/system_stm32f4xx.c
18 |
19 | OBJS += \
20 | ./Core/Src/dual.o \
21 | ./Core/Src/font8.o \
22 | ./Core/Src/main.o \
23 | ./Core/Src/single.o \
24 | ./Core/Src/st7789.o \
25 | ./Core/Src/stm32f4xx_hal_msp.o \
26 | ./Core/Src/stm32f4xx_it.o \
27 | ./Core/Src/syscalls.o \
28 | ./Core/Src/sysmem.o \
29 | ./Core/Src/system_stm32f4xx.o
30 |
31 | C_DEPS += \
32 | ./Core/Src/dual.d \
33 | ./Core/Src/font8.d \
34 | ./Core/Src/main.d \
35 | ./Core/Src/single.d \
36 | ./Core/Src/st7789.d \
37 | ./Core/Src/stm32f4xx_hal_msp.d \
38 | ./Core/Src/stm32f4xx_it.d \
39 | ./Core/Src/syscalls.d \
40 | ./Core/Src/sysmem.d \
41 | ./Core/Src/system_stm32f4xx.d
42 |
43 |
44 | # Each subdirectory must supply rules for building sources it contributes
45 | Core/Src/%.o Core/Src/%.su: ../Core/Src/%.c Core/Src/subdir.mk
46 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
47 |
48 | clean: clean-Core-2f-Src
49 |
50 | clean-Core-2f-Src:
51 | -$(RM) ./Core/Src/dual.d ./Core/Src/dual.o ./Core/Src/dual.su ./Core/Src/font8.d ./Core/Src/font8.o ./Core/Src/font8.su ./Core/Src/main.d ./Core/Src/main.o ./Core/Src/main.su ./Core/Src/single.d ./Core/Src/single.o ./Core/Src/single.su ./Core/Src/st7789.d ./Core/Src/st7789.o ./Core/Src/st7789.su ./Core/Src/stm32f4xx_hal_msp.d ./Core/Src/stm32f4xx_hal_msp.o ./Core/Src/stm32f4xx_hal_msp.su ./Core/Src/stm32f4xx_it.d ./Core/Src/stm32f4xx_it.o ./Core/Src/stm32f4xx_it.su ./Core/Src/syscalls.d ./Core/Src/syscalls.o ./Core/Src/syscalls.su ./Core/Src/sysmem.d ./Core/Src/sysmem.o ./Core/Src/sysmem.su ./Core/Src/system_stm32f4xx.d ./Core/Src/system_stm32f4xx.o ./Core/Src/system_stm32f4xx.su
52 |
53 | .PHONY: clean-Core-2f-Src
54 |
55 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_flash_ramfunc.h
4 | * @author MCD Application Team
5 | * @brief Header file of FLASH RAMFUNC driver.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2017 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under BSD 3-Clause license,
13 | * the "License"; You may not use this file except in compliance with the
14 | * License. You may obtain a copy of the License at:
15 | * opensource.org/licenses/BSD-3-Clause
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __STM32F4xx_FLASH_RAMFUNC_H
22 | #define __STM32F4xx_FLASH_RAMFUNC_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 | #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) ||\
28 | defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx)
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "stm32f4xx_hal_def.h"
32 |
33 | /** @addtogroup STM32F4xx_HAL_Driver
34 | * @{
35 | */
36 |
37 | /** @addtogroup FLASH_RAMFUNC
38 | * @{
39 | */
40 |
41 | /* Exported types ------------------------------------------------------------*/
42 | /* Exported macro ------------------------------------------------------------*/
43 | /* Exported functions --------------------------------------------------------*/
44 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions
45 | * @{
46 | */
47 |
48 | /** @addtogroup FLASH_RAMFUNC_Exported_Functions_Group1
49 | * @{
50 | */
51 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void);
52 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void);
53 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void);
54 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void);
55 | /**
56 | * @}
57 | */
58 |
59 | /**
60 | * @}
61 | */
62 |
63 | /**
64 | * @}
65 | */
66 |
67 | /**
68 | * @}
69 | */
70 |
71 | #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
72 | #ifdef __cplusplus
73 | }
74 | #endif
75 |
76 |
77 | #endif /* __STM32F4xx_FLASH_RAMFUNC_H */
78 |
79 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
80 |
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ctlreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_req.h
4 | * @author MCD Application Team
5 | * @brief Header file for the usbd_req.c file
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __USB_REQUEST_H
22 | #define __USB_REQUEST_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "usbd_def.h"
30 |
31 |
32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
33 | * @{
34 | */
35 |
36 | /** @defgroup USBD_REQ
37 | * @brief header file for the usbd_req.c file
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_REQ_Exported_Defines
42 | * @{
43 | */
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @defgroup USBD_REQ_Exported_Types
50 | * @{
51 | */
52 | /**
53 | * @}
54 | */
55 |
56 |
57 |
58 | /** @defgroup USBD_REQ_Exported_Macros
59 | * @{
60 | */
61 | /**
62 | * @}
63 | */
64 |
65 | /** @defgroup USBD_REQ_Exported_Variables
66 | * @{
67 | */
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup USBD_REQ_Exported_FunctionsPrototype
73 | * @{
74 | */
75 |
76 | USBD_StatusTypeDef USBD_StdDevReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
77 | USBD_StatusTypeDef USBD_StdItfReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
78 | USBD_StatusTypeDef USBD_StdEPReq(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
79 |
80 | void USBD_CtlError(USBD_HandleTypeDef *pdev, USBD_SetupReqTypedef *req);
81 | void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata);
82 | void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len);
83 |
84 | /**
85 | * @}
86 | */
87 |
88 | #ifdef __cplusplus
89 | }
90 | #endif
91 |
92 | #endif /* __USB_REQUEST_H */
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 |
103 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
104 |
--------------------------------------------------------------------------------
/Core/Src/sysmem.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file sysmem.c
4 | * @author Generated by STM32CubeIDE
5 | * @brief STM32CubeIDE System Memory calls file
6 | *
7 | * For more information about which C functions
8 | * need which of these lowlevel functions
9 | * please consult the newlib libc manual
10 | ******************************************************************************
11 | * @attention
12 | *
13 | * Copyright (c) 2022 STMicroelectronics.
14 | * All rights reserved.
15 | *
16 | * This software is licensed under terms that can be found in the LICENSE file
17 | * in the root directory of this software component.
18 | * If no LICENSE file comes with this software, it is provided AS-IS.
19 | *
20 | ******************************************************************************
21 | */
22 |
23 | /* Includes */
24 | #include
25 | #include
26 |
27 | /**
28 | * Pointer to the current high watermark of the heap usage
29 | */
30 | static uint8_t *__sbrk_heap_end = NULL;
31 |
32 | /**
33 | * @brief _sbrk() allocates memory to the newlib heap and is used by malloc
34 | * and others from the C library
35 | *
36 | * @verbatim
37 | * ############################################################################
38 | * # .data # .bss # newlib heap # MSP stack #
39 | * # # # # Reserved by _Min_Stack_Size #
40 | * ############################################################################
41 | * ^-- RAM start ^-- _end _estack, RAM end --^
42 | * @endverbatim
43 | *
44 | * This implementation starts allocating at the '_end' linker symbol
45 | * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
46 | * The implementation considers '_estack' linker symbol to be RAM end
47 | * NOTE: If the MSP stack, at any point during execution, grows larger than the
48 | * reserved size, please increase the '_Min_Stack_Size'.
49 | *
50 | * @param incr Memory size
51 | * @return Pointer to allocated memory
52 | */
53 | void *_sbrk(ptrdiff_t incr)
54 | {
55 | extern uint8_t _end; /* Symbol defined in the linker script */
56 | extern uint8_t _estack; /* Symbol defined in the linker script */
57 | extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
58 | const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
59 | const uint8_t *max_heap = (uint8_t *)stack_limit;
60 | uint8_t *prev_heap_end;
61 |
62 | /* Initialize heap end at first call */
63 | if (NULL == __sbrk_heap_end)
64 | {
65 | __sbrk_heap_end = &_end;
66 | }
67 |
68 | /* Protect heap from growing into the reserved MSP stack */
69 | if (__sbrk_heap_end + incr > max_heap)
70 | {
71 | errno = ENOMEM;
72 | return (void *)-1;
73 | }
74 |
75 | prev_heap_end = __sbrk_heap_end;
76 | __sbrk_heap_end += incr;
77 |
78 | return (void *)prev_heap_end;
79 | }
80 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Include/tz_context.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * @file tz_context.h
3 | * @brief Context Management for Armv8-M TrustZone
4 | * @version V1.0.1
5 | * @date 10. January 2018
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2017-2018 Arm Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #if defined ( __ICCARM__ )
26 | #pragma system_include /* treat file as system include file for MISRA check */
27 | #elif defined (__clang__)
28 | #pragma clang system_header /* treat file as system include file */
29 | #endif
30 |
31 | #ifndef TZ_CONTEXT_H
32 | #define TZ_CONTEXT_H
33 |
34 | #include
35 |
36 | #ifndef TZ_MODULEID_T
37 | #define TZ_MODULEID_T
38 | /// \details Data type that identifies secure software modules called by a process.
39 | typedef uint32_t TZ_ModuleId_t;
40 | #endif
41 |
42 | /// \details TZ Memory ID identifies an allocated memory slot.
43 | typedef uint32_t TZ_MemoryId_t;
44 |
45 | /// Initialize secure context memory system
46 | /// \return execution status (1: success, 0: error)
47 | uint32_t TZ_InitContextSystem_S (void);
48 |
49 | /// Allocate context memory for calling secure software modules in TrustZone
50 | /// \param[in] module identifies software modules called from non-secure mode
51 | /// \return value != 0 id TrustZone memory slot identifier
52 | /// \return value 0 no memory available or internal error
53 | TZ_MemoryId_t TZ_AllocModuleContext_S (TZ_ModuleId_t module);
54 |
55 | /// Free context memory that was previously allocated with \ref TZ_AllocModuleContext_S
56 | /// \param[in] id TrustZone memory slot identifier
57 | /// \return execution status (1: success, 0: error)
58 | uint32_t TZ_FreeModuleContext_S (TZ_MemoryId_t id);
59 |
60 | /// Load secure context (called on RTOS thread context switch)
61 | /// \param[in] id TrustZone memory slot identifier
62 | /// \return execution status (1: success, 0: error)
63 | uint32_t TZ_LoadContext_S (TZ_MemoryId_t id);
64 |
65 | /// Store secure context (called on RTOS thread context switch)
66 | /// \param[in] id TrustZone memory slot identifier
67 | /// \return execution status (1: success, 0: error)
68 | uint32_t TZ_StoreContext_S (TZ_MemoryId_t id);
69 |
70 | #endif // TZ_CONTEXT_H
71 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usb_device.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usb_device.h
5 | * @version : v1.0_Cube
6 | * @brief : Header for usb_device.c file.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USB_DEVICE__H__
24 | #define __USB_DEVICE__H__
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "stm32f4xx.h"
32 | #include "stm32f4xx_hal.h"
33 | #include "usbd_def.h"
34 |
35 | /* USER CODE BEGIN INCLUDE */
36 |
37 | /* USER CODE END INCLUDE */
38 |
39 | /** @addtogroup USBD_OTG_DRIVER
40 | * @{
41 | */
42 |
43 | /** @defgroup USBD_DEVICE USBD_DEVICE
44 | * @brief Device file for Usb otg low level driver.
45 | * @{
46 | */
47 |
48 | /** @defgroup USBD_DEVICE_Exported_Variables USBD_DEVICE_Exported_Variables
49 | * @brief Public variables.
50 | * @{
51 | */
52 |
53 | /* Private variables ---------------------------------------------------------*/
54 | /* USER CODE BEGIN PV */
55 |
56 | /* USER CODE END PV */
57 |
58 | /* Private function prototypes -----------------------------------------------*/
59 | /* USER CODE BEGIN PFP */
60 |
61 | /* USER CODE END PFP */
62 |
63 | /*
64 | * -- Insert your variables declaration here --
65 | */
66 | /* USER CODE BEGIN VARIABLES */
67 |
68 | /* USER CODE END VARIABLES */
69 | /**
70 | * @}
71 | */
72 |
73 | /** @defgroup USBD_DEVICE_Exported_FunctionsPrototype USBD_DEVICE_Exported_FunctionsPrototype
74 | * @brief Declaration of public functions for Usb device.
75 | * @{
76 | */
77 |
78 | /** USB Device initialization function. */
79 | void MX_USB_DEVICE_Init(void);
80 |
81 | /*
82 | * -- Insert functions declaration here --
83 | */
84 | /* USER CODE BEGIN FD */
85 |
86 | /* USER CODE END FD */
87 | /**
88 | * @}
89 | */
90 |
91 | /**
92 | * @}
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | #ifdef __cplusplus
100 | }
101 | #endif
102 |
103 | #endif /* __USB_DEVICE__H__ */
104 |
105 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
106 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usb_device.c:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usb_device.c
5 | * @version : v1.0_Cube
6 | * @brief : This file implements the USB Device
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 |
24 | #include "usb_device.h"
25 | #include "usbd_core.h"
26 | #include "usbd_desc.h"
27 | #include "usbd_audio.h"
28 | #include "usbd_audio_if.h"
29 |
30 | /* USER CODE BEGIN Includes */
31 |
32 | /* USER CODE END Includes */
33 |
34 | /* USER CODE BEGIN PV */
35 | /* Private variables ---------------------------------------------------------*/
36 |
37 | /* USER CODE END PV */
38 |
39 | /* USER CODE BEGIN PFP */
40 | /* Private function prototypes -----------------------------------------------*/
41 |
42 | /* USER CODE END PFP */
43 |
44 | /* USB Device Core handle declaration. */
45 | USBD_HandleTypeDef hUsbDeviceFS;
46 |
47 | /*
48 | * -- Insert your variables declaration here --
49 | */
50 | /* USER CODE BEGIN 0 */
51 |
52 | /* USER CODE END 0 */
53 |
54 | /*
55 | * -- Insert your external function declaration here --
56 | */
57 | /* USER CODE BEGIN 1 */
58 |
59 | /* USER CODE END 1 */
60 |
61 | /**
62 | * Init USB device Library, add supported class and start the library
63 | * @retval None
64 | */
65 | void MX_USB_DEVICE_Init(void)
66 | {
67 | /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */
68 |
69 | /* USER CODE END USB_DEVICE_Init_PreTreatment */
70 |
71 | /* Init Device Library, add supported class and start the library. */
72 | if (USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS) != USBD_OK)
73 | {
74 | Error_Handler();
75 | }
76 | if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_AUDIO) != USBD_OK)
77 | {
78 | Error_Handler();
79 | }
80 | if (USBD_AUDIO_RegisterInterface(&hUsbDeviceFS, &USBD_AUDIO_fops_FS) != USBD_OK)
81 | {
82 | Error_Handler();
83 | }
84 | if (USBD_Start(&hUsbDeviceFS) != USBD_OK)
85 | {
86 | Error_Handler();
87 | }
88 |
89 | /* USER CODE BEGIN USB_DEVICE_Init_PostTreatment */
90 |
91 | /* USER CODE END USB_DEVICE_Init_PostTreatment */
92 | }
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
103 |
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_ioreq.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.h
4 | * @author MCD Application Team
5 | * @brief Header file for the usbd_ioreq.c file
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __USBD_IOREQ_H
22 | #define __USBD_IOREQ_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "usbd_def.h"
30 | #include "usbd_core.h"
31 |
32 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
33 | * @{
34 | */
35 |
36 | /** @defgroup USBD_IOREQ
37 | * @brief header file for the usbd_ioreq.c file
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_IOREQ_Exported_Defines
42 | * @{
43 | */
44 | /**
45 | * @}
46 | */
47 |
48 |
49 | /** @defgroup USBD_IOREQ_Exported_Types
50 | * @{
51 | */
52 |
53 |
54 | /**
55 | * @}
56 | */
57 |
58 |
59 |
60 | /** @defgroup USBD_IOREQ_Exported_Macros
61 | * @{
62 | */
63 |
64 | /**
65 | * @}
66 | */
67 |
68 | /** @defgroup USBD_IOREQ_Exported_Variables
69 | * @{
70 | */
71 |
72 | /**
73 | * @}
74 | */
75 |
76 | /** @defgroup USBD_IOREQ_Exported_FunctionsPrototype
77 | * @{
78 | */
79 |
80 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
81 | uint8_t *pbuf, uint32_t len);
82 |
83 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev,
84 | uint8_t *pbuf, uint32_t len);
85 |
86 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
87 | uint8_t *pbuf, uint32_t len);
88 |
89 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev,
90 | uint8_t *pbuf, uint32_t len);
91 |
92 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev);
93 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev);
94 |
95 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
96 |
97 | /**
98 | * @}
99 | */
100 |
101 | #ifdef __cplusplus
102 | }
103 | #endif
104 |
105 | #endif /* __USBD_IOREQ_H */
106 |
107 | /**
108 | * @}
109 | */
110 |
111 | /**
112 | * @}
113 | */
114 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
115 |
--------------------------------------------------------------------------------
/Core/Src/syscalls.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file syscalls.c
4 | * @author Auto-generated by STM32CubeIDE
5 | * @brief STM32CubeIDE Minimal System calls file
6 | *
7 | * For more information about which c-functions
8 | * need which of these lowlevel functions
9 | * please consult the Newlib libc-manual
10 | ******************************************************************************
11 | * @attention
12 | *
13 | * Copyright (c) 2022 STMicroelectronics.
14 | * All rights reserved.
15 | *
16 | * This software is licensed under terms that can be found in the LICENSE file
17 | * in the root directory of this software component.
18 | * If no LICENSE file comes with this software, it is provided AS-IS.
19 | *
20 | ******************************************************************************
21 | */
22 |
23 | /* Includes */
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 |
33 |
34 | /* Variables */
35 | extern int __io_putchar(int ch) __attribute__((weak));
36 | extern int __io_getchar(void) __attribute__((weak));
37 |
38 |
39 | char *__env[1] = { 0 };
40 | char **environ = __env;
41 |
42 |
43 | /* Functions */
44 | void initialise_monitor_handles()
45 | {
46 | }
47 |
48 | int _getpid(void)
49 | {
50 | return 1;
51 | }
52 |
53 | int _kill(int pid, int sig)
54 | {
55 | errno = EINVAL;
56 | return -1;
57 | }
58 |
59 | void _exit (int status)
60 | {
61 | _kill(status, -1);
62 | while (1) {} /* Make sure we hang here */
63 | }
64 |
65 | __attribute__((weak)) int _read(int file, char *ptr, int len)
66 | {
67 | int DataIdx;
68 |
69 | for (DataIdx = 0; DataIdx < len; DataIdx++)
70 | {
71 | *ptr++ = __io_getchar();
72 | }
73 |
74 | return len;
75 | }
76 |
77 | __attribute__((weak)) int _write(int file, char *ptr, int len)
78 | {
79 | int DataIdx;
80 |
81 | for (DataIdx = 0; DataIdx < len; DataIdx++)
82 | {
83 | __io_putchar(*ptr++);
84 | }
85 | return len;
86 | }
87 |
88 | int _close(int file)
89 | {
90 | return -1;
91 | }
92 |
93 |
94 | int _fstat(int file, struct stat *st)
95 | {
96 | st->st_mode = S_IFCHR;
97 | return 0;
98 | }
99 |
100 | int _isatty(int file)
101 | {
102 | return 1;
103 | }
104 |
105 | int _lseek(int file, int ptr, int dir)
106 | {
107 | return 0;
108 | }
109 |
110 | int _open(char *path, int flags, ...)
111 | {
112 | /* Pretend like we always fail */
113 | return -1;
114 | }
115 |
116 | int _wait(int *status)
117 | {
118 | errno = ECHILD;
119 | return -1;
120 | }
121 |
122 | int _unlink(char *name)
123 | {
124 | errno = ENOENT;
125 | return -1;
126 | }
127 |
128 | int _times(struct tms *buf)
129 | {
130 | return -1;
131 | }
132 |
133 | int _stat(char *file, struct stat *st)
134 | {
135 | st->st_mode = S_IFCHR;
136 | return 0;
137 | }
138 |
139 | int _link(char *old, char *new)
140 | {
141 | errno = EMLINK;
142 | return -1;
143 | }
144 |
145 | int _fork(void)
146 | {
147 | errno = EAGAIN;
148 | return -1;
149 | }
150 |
151 | int _execve(char *name, char **argv, char **env)
152 | {
153 | errno = ENOMEM;
154 | return -1;
155 | }
156 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_dma_ex.h
4 | * @author MCD Application Team
5 | * @brief Header file of DMA HAL extension module.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2017 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under BSD 3-Clause license,
13 | * the "License"; You may not use this file except in compliance with the
14 | * License. You may obtain a copy of the License at:
15 | * opensource.org/licenses/BSD-3-Clause
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __STM32F4xx_HAL_DMA_EX_H
22 | #define __STM32F4xx_HAL_DMA_EX_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx_hal_def.h"
30 |
31 | /** @addtogroup STM32F4xx_HAL_Driver
32 | * @{
33 | */
34 |
35 | /** @addtogroup DMAEx
36 | * @{
37 | */
38 |
39 | /* Exported types ------------------------------------------------------------*/
40 | /** @defgroup DMAEx_Exported_Types DMAEx Exported Types
41 | * @brief DMAEx Exported types
42 | * @{
43 | */
44 |
45 | /**
46 | * @brief HAL DMA Memory definition
47 | */
48 | typedef enum
49 | {
50 | MEMORY0 = 0x00U, /*!< Memory 0 */
51 | MEMORY1 = 0x01U /*!< Memory 1 */
52 | }HAL_DMA_MemoryTypeDef;
53 |
54 | /**
55 | * @}
56 | */
57 |
58 | /* Exported functions --------------------------------------------------------*/
59 | /** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions
60 | * @brief DMAEx Exported functions
61 | * @{
62 | */
63 |
64 | /** @defgroup DMAEx_Exported_Functions_Group1 Extended features functions
65 | * @brief Extended features functions
66 | * @{
67 | */
68 |
69 | /* IO operation functions *******************************************************/
70 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
71 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
72 | HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory);
73 |
74 | /**
75 | * @}
76 | */
77 | /**
78 | * @}
79 | */
80 |
81 | /* Private functions ---------------------------------------------------------*/
82 | /** @defgroup DMAEx_Private_Functions DMAEx Private Functions
83 | * @brief DMAEx Private functions
84 | * @{
85 | */
86 | /**
87 | * @}
88 | */
89 |
90 | /**
91 | * @}
92 | */
93 |
94 | /**
95 | * @}
96 | */
97 |
98 | #ifdef __cplusplus
99 | }
100 | #endif
101 |
102 | #endif /*__STM32F4xx_HAL_DMA_EX_H*/
103 |
104 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
105 |
--------------------------------------------------------------------------------
/Release/makefile:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | -include ../makefile.init
7 |
8 | RM := rm -rf
9 |
10 | # All of the sources participating in the build are defined here
11 | -include sources.mk
12 | -include USB_DEVICE/Target/subdir.mk
13 | -include USB_DEVICE/App/subdir.mk
14 | -include Middlewares/ST/STM32_USB_Device_Library/Core/Src/subdir.mk
15 | -include Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Src/subdir.mk
16 | -include Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk
17 | -include Core/Startup/subdir.mk
18 | -include Core/Src/subdir.mk
19 | -include objects.mk
20 |
21 | ifneq ($(MAKECMDGOALS),clean)
22 | ifneq ($(strip $(S_DEPS)),)
23 | -include $(S_DEPS)
24 | endif
25 | ifneq ($(strip $(S_UPPER_DEPS)),)
26 | -include $(S_UPPER_DEPS)
27 | endif
28 | ifneq ($(strip $(C_DEPS)),)
29 | -include $(C_DEPS)
30 | endif
31 | endif
32 |
33 | -include ../makefile.defs
34 |
35 | OPTIONAL_TOOL_DEPS := \
36 | $(wildcard ../makefile.defs) \
37 | $(wildcard ../makefile.init) \
38 | $(wildcard ../makefile.targets) \
39 |
40 |
41 | BUILD_ARTIFACT_NAME := stm32f401ccAudioNative
42 | BUILD_ARTIFACT_EXTENSION := elf
43 | BUILD_ARTIFACT_PREFIX :=
44 | BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),)
45 |
46 | # Add inputs and outputs from these tool invocations to the build variables
47 | EXECUTABLES += \
48 | stm32f401ccAudioNative.elf \
49 |
50 | MAP_FILES += \
51 | stm32f401ccAudioNative.map \
52 |
53 | SIZE_OUTPUT += \
54 | default.size.stdout \
55 |
56 | OBJDUMP_LIST += \
57 | stm32f401ccAudioNative.list \
58 |
59 |
60 | # All Target
61 | all: main-build
62 |
63 | # Main-build Target
64 | main-build: stm32f401ccAudioNative.elf secondary-outputs
65 |
66 | # Tool invocations
67 | stm32f401ccAudioNative.elf stm32f401ccAudioNative.map: $(OBJS) $(USER_OBJS) ../STM32F401CCUX_FLASH.ld makefile objects.list $(OPTIONAL_TOOL_DEPS)
68 | arm-none-eabi-gcc -o "stm32f401ccAudioNative.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m4 -T"../STM32F401CCUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="stm32f401ccAudioNative.map" -Wl,--gc-sections -static -u _printf_float --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
69 | @echo 'Finished building target: $@'
70 | @echo ' '
71 |
72 | default.size.stdout: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS)
73 | arm-none-eabi-size $(EXECUTABLES)
74 | @echo 'Finished building: $@'
75 | @echo ' '
76 |
77 | stm32f401ccAudioNative.list: $(EXECUTABLES) makefile objects.list $(OPTIONAL_TOOL_DEPS)
78 | arm-none-eabi-objdump -h -S $(EXECUTABLES) > "stm32f401ccAudioNative.list"
79 | @echo 'Finished building: $@'
80 | @echo ' '
81 |
82 | # Other Targets
83 | clean:
84 | -$(RM) default.size.stdout stm32f401ccAudioNative.elf stm32f401ccAudioNative.list stm32f401ccAudioNative.map
85 | -@echo ' '
86 |
87 | secondary-outputs: $(SIZE_OUTPUT) $(OBJDUMP_LIST)
88 |
89 | fail-specified-linker-script-missing:
90 | @echo 'Error: Cannot find the specified linker script. Check the linker settings in the build configuration.'
91 | @exit 2
92 |
93 | warn-no-linker-script-specified:
94 | @echo 'Warning: No linker script specified. Check the linker settings in the build configuration.'
95 |
96 | .PHONY: all clean dependents main-build fail-specified-linker-script-missing warn-no-linker-script-specified
97 |
98 | -include ../makefile.targets
99 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usbd_audio_if.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usbd_audio_if.h
5 | * @version : v1.0_Cube
6 | * @brief : Header for usbd_audio_if.c file.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __USBD_AUDIO_IF_H__
23 | #define __USBD_AUDIO_IF_H__
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Includes ------------------------------------------------------------------*/
30 | #include "usbd_audio.h"
31 |
32 | /* USER CODE BEGIN INCLUDE */
33 |
34 | /* USER CODE END INCLUDE */
35 |
36 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
37 | * @brief For Usb device.
38 | * @{
39 | */
40 |
41 | /** @defgroup USBD_AUDIO_IF USBD_AUDIO_IF
42 | * @brief Usb audio interface device module.
43 | * @{
44 | */
45 |
46 | /** @defgroup USBD_AUDIO_IF_Exported_Defines USBD_AUDIO_IF_Exported_Defines
47 | * @brief Defines.
48 | * @{
49 | */
50 |
51 | /* USER CODE BEGIN EXPORTED_DEFINES */
52 |
53 | /* USER CODE END EXPORTED_DEFINES */
54 |
55 | /**
56 | * @}
57 | */
58 |
59 | /** @defgroup USBD_AUDIO_IF_Exported_Types USBD_AUDIO_IF_Exported_Types
60 | * @brief Types.
61 | * @{
62 | */
63 |
64 | /* USER CODE BEGIN EXPORTED_TYPES */
65 |
66 | /* USER CODE END EXPORTED_TYPES */
67 |
68 | /**
69 | * @}
70 | */
71 |
72 | /** @defgroup USBD_AUDIO_IF_Exported_Macros USBD_AUDIO_IF_Exported_Macros
73 | * @brief Aliases.
74 | * @{
75 | */
76 |
77 | /* USER CODE BEGIN EXPORTED_MACRO */
78 |
79 | /* USER CODE END EXPORTED_MACRO */
80 |
81 | /**
82 | * @}
83 | */
84 |
85 | /** @defgroup USBD_AUDIO_IF_Exported_Variables USBD_AUDIO_IF_Exported_Variables
86 | * @brief Public variables.
87 | * @{
88 | */
89 |
90 | /** AUDIO_IF Interface callback. */
91 | extern USBD_AUDIO_ItfTypeDef USBD_AUDIO_fops_FS;
92 |
93 | /* USER CODE BEGIN EXPORTED_VARIABLES */
94 |
95 | /* USER CODE END EXPORTED_VARIABLES */
96 |
97 | /**
98 | * @}
99 | */
100 |
101 | /** @defgroup USBD_AUDIO_IF_Exported_FunctionsPrototype USBD_AUDIO_IF_Exported_FunctionsPrototype
102 | * @brief Public functions declaration.
103 | * @{
104 | */
105 |
106 | /**
107 | * @brief Manages the DMA full transfer complete event.
108 | * @retval None
109 | */
110 | void TransferComplete_CallBack_FS(void);
111 |
112 | /**
113 | * @brief Manages the DMA half transfer complete event.
114 | * @retval None
115 | */
116 | void HalfTransfer_CallBack_FS(void);
117 |
118 | /* USER CODE BEGIN EXPORTED_FUNCTIONS */
119 |
120 | /* USER CODE END EXPORTED_FUNCTIONS */
121 |
122 | /**
123 | * @}
124 | */
125 |
126 | /**
127 | * @}
128 | */
129 |
130 | /**
131 | * @}
132 | */
133 |
134 | #ifdef __cplusplus
135 | }
136 | #endif
137 |
138 | #endif /* __USBD_AUDIO_IF_H__ */
139 |
140 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
141 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usbd_desc.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usbd_desc.c
5 | * @version : v1.0_Cube
6 | * @brief : Header for usbd_conf.c file.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __USBD_DESC__C__
23 | #define __USBD_DESC__C__
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Includes ------------------------------------------------------------------*/
30 | #include "usbd_def.h"
31 |
32 | /* USER CODE BEGIN INCLUDE */
33 |
34 | /* USER CODE END INCLUDE */
35 |
36 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
37 | * @{
38 | */
39 |
40 | /** @defgroup USBD_DESC USBD_DESC
41 | * @brief Usb device descriptors module.
42 | * @{
43 | */
44 |
45 | /** @defgroup USBD_DESC_Exported_Constants USBD_DESC_Exported_Constants
46 | * @brief Constants.
47 | * @{
48 | */
49 | #define DEVICE_ID1 (UID_BASE)
50 | #define DEVICE_ID2 (UID_BASE + 0x4)
51 | #define DEVICE_ID3 (UID_BASE + 0x8)
52 |
53 | #define USB_SIZ_STRING_SERIAL 0x1A
54 |
55 | /* USER CODE BEGIN EXPORTED_CONSTANTS */
56 |
57 | /* USER CODE END EXPORTED_CONSTANTS */
58 |
59 | /**
60 | * @}
61 | */
62 |
63 | /** @defgroup USBD_DESC_Exported_Defines USBD_DESC_Exported_Defines
64 | * @brief Defines.
65 | * @{
66 | */
67 |
68 | /* USER CODE BEGIN EXPORTED_DEFINES */
69 |
70 | /* USER CODE END EXPORTED_DEFINES */
71 |
72 | /**
73 | * @}
74 | */
75 |
76 | /** @defgroup USBD_DESC_Exported_TypesDefinitions USBD_DESC_Exported_TypesDefinitions
77 | * @brief Types.
78 | * @{
79 | */
80 |
81 | /* USER CODE BEGIN EXPORTED_TYPES */
82 |
83 | /* USER CODE END EXPORTED_TYPES */
84 |
85 | /**
86 | * @}
87 | */
88 |
89 | /** @defgroup USBD_DESC_Exported_Macros USBD_DESC_Exported_Macros
90 | * @brief Aliases.
91 | * @{
92 | */
93 |
94 | /* USER CODE BEGIN EXPORTED_MACRO */
95 |
96 | /* USER CODE END EXPORTED_MACRO */
97 |
98 | /**
99 | * @}
100 | */
101 |
102 | /** @defgroup USBD_DESC_Exported_Variables USBD_DESC_Exported_Variables
103 | * @brief Public variables.
104 | * @{
105 | */
106 |
107 | /** Descriptor for the Usb device. */
108 | extern USBD_DescriptorsTypeDef FS_Desc;
109 |
110 | /* USER CODE BEGIN EXPORTED_VARIABLES */
111 |
112 | /* USER CODE END EXPORTED_VARIABLES */
113 |
114 | /**
115 | * @}
116 | */
117 |
118 | /** @defgroup USBD_DESC_Exported_FunctionsPrototype USBD_DESC_Exported_FunctionsPrototype
119 | * @brief Public functions declaration.
120 | * @{
121 | */
122 |
123 | /* USER CODE BEGIN EXPORTED_FUNCTIONS */
124 |
125 | /* USER CODE END EXPORTED_FUNCTIONS */
126 |
127 | /**
128 | * @}
129 | */
130 |
131 | /**
132 | * @}
133 | */
134 |
135 | /**
136 | * @}
137 | */
138 |
139 | #ifdef __cplusplus
140 | }
141 | #endif
142 |
143 | #endif /* __USBD_DESC__C__ */
144 |
145 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
146 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pcd_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_pcd_ex.h
4 | * @author MCD Application Team
5 | * @brief Header file of PCD HAL Extension module.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2016 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under BSD 3-Clause license,
13 | * the "License"; You may not use this file except in compliance with the
14 | * License. You may obtain a copy of the License at:
15 | * opensource.org/licenses/BSD-3-Clause
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef STM32F4xx_HAL_PCD_EX_H
22 | #define STM32F4xx_HAL_PCD_EX_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx_hal_def.h"
30 |
31 | #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
32 | /** @addtogroup STM32F4xx_HAL_Driver
33 | * @{
34 | */
35 |
36 | /** @addtogroup PCDEx
37 | * @{
38 | */
39 | /* Exported types ------------------------------------------------------------*/
40 | /* Exported constants --------------------------------------------------------*/
41 | /* Exported macros -----------------------------------------------------------*/
42 | /* Exported functions --------------------------------------------------------*/
43 | /** @addtogroup PCDEx_Exported_Functions PCDEx Exported Functions
44 | * @{
45 | */
46 | /** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions
47 | * @{
48 | */
49 |
50 | #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
51 | HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size);
52 | HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size);
53 | #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
54 |
55 | #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
56 | HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd);
57 | HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd);
58 | #endif /* defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) */
59 | #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx)
60 | HAL_StatusTypeDef HAL_PCDEx_ActivateBCD(PCD_HandleTypeDef *hpcd);
61 | HAL_StatusTypeDef HAL_PCDEx_DeActivateBCD(PCD_HandleTypeDef *hpcd);
62 | void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd);
63 | #endif /* defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) || defined(STM32F413xx) || defined(STM32F423xx) */
64 | void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg);
65 | void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg);
66 |
67 | /**
68 | * @}
69 | */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /**
76 | * @}
77 | */
78 |
79 | /**
80 | * @}
81 | */
82 | #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
83 |
84 | #ifdef __cplusplus
85 | }
86 | #endif
87 |
88 |
89 | #endif /* STM32F4xx_HAL_PCD_EX_H */
90 |
91 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
92 |
--------------------------------------------------------------------------------
/Core/Src/fonts.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file fonts.h
4 | * @author MCD Application Team
5 | * @version V1.0.0
6 | * @date 18-February-2014
7 | * @brief Header for fonts.c file
8 | ******************************************************************************
9 | * @attention
10 | *
11 | * © COPYRIGHT(c) 2014 STMicroelectronics
12 | *
13 | * Redistribution and use in source and binary forms, with or without modification,
14 | * are permitted provided that the following conditions are met:
15 | * 1. Redistributions of source code must retain the above copyright notice,
16 | * this list of conditions and the following disclaimer.
17 | * 2. Redistributions in binary form must reproduce the above copyright notice,
18 | * this list of conditions and the following disclaimer in the documentation
19 | * and/or other materials provided with the distribution.
20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
21 | * may be used to endorse or promote products derived from this software
22 | * without specific prior written permission.
23 | *
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 | *
35 | ******************************************************************************
36 | */
37 |
38 | /* Define to prevent recursive inclusion -------------------------------------*/
39 | #ifndef __FONTS_H
40 | #define __FONTS_H
41 |
42 | #ifdef __cplusplus
43 | extern "C" {
44 | #endif
45 |
46 | /* Includes ------------------------------------------------------------------*/
47 | #include
48 |
49 | /** @addtogroup Utilities
50 | * @{
51 | */
52 |
53 | /** @addtogroup STM32_EVAL
54 | * @{
55 | */
56 |
57 | /** @addtogroup Common
58 | * @{
59 | */
60 |
61 | /** @addtogroup FONTS
62 | * @{
63 | */
64 |
65 | /** @defgroup FONTS_Exported_Types
66 | * @{
67 | */
68 | typedef struct _tFont
69 | {
70 | const uint8_t *table;
71 | uint16_t Width;
72 | uint16_t Height;
73 |
74 | } sFONT;
75 |
76 | extern sFONT Font24;
77 | extern sFONT Font20;
78 | extern sFONT Font16;
79 | extern sFONT Font12;
80 | extern sFONT Font8;
81 |
82 | #define FONT_CURR Font8
83 | #define CHAR_WIDTH (FONT_CURR.Width)
84 | #define CHAR_HEIGHT (FONT_CURR.Height)
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /** @defgroup FONTS_Exported_Constants
91 | * @{
92 | */
93 | #define LINE(x) ((x) * (((sFONT *)BSP_LCD_GetFont())->Height))
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /** @defgroup FONTS_Exported_Macros
100 | * @{
101 | */
102 | /**
103 | * @}
104 | */
105 |
106 | /** @defgroup FONTS_Exported_Functions
107 | * @{
108 | */
109 | /**
110 | * @}
111 | */
112 |
113 | #ifdef __cplusplus
114 | }
115 | #endif
116 |
117 | #endif /* __FONTS_H */
118 |
119 | /**
120 | * @}
121 | */
122 |
123 | /**
124 | * @}
125 | */
126 |
127 | /**
128 | * @}
129 | */
130 |
131 | /**
132 | * @}
133 | */
134 |
135 | /**
136 | * @}
137 | */
138 |
139 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
140 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file system_stm32f4xx.h
4 | * @author MCD Application Team
5 | * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © COPYRIGHT(c) 2017 STMicroelectronics
10 | *
11 | * Redistribution and use in source and binary forms, with or without modification,
12 | * are permitted provided that the following conditions are met:
13 | * 1. Redistributions of source code must retain the above copyright notice,
14 | * this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright notice,
16 | * this list of conditions and the following disclaimer in the documentation
17 | * and/or other materials provided with the distribution.
18 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
19 | * may be used to endorse or promote products derived from this software
20 | * without specific prior written permission.
21 | *
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 | *
33 | ******************************************************************************
34 | */
35 |
36 | /** @addtogroup CMSIS
37 | * @{
38 | */
39 |
40 | /** @addtogroup stm32f4xx_system
41 | * @{
42 | */
43 |
44 | /**
45 | * @brief Define to prevent recursive inclusion
46 | */
47 | #ifndef __SYSTEM_STM32F4XX_H
48 | #define __SYSTEM_STM32F4XX_H
49 |
50 | #ifdef __cplusplus
51 | extern "C" {
52 | #endif
53 |
54 | /** @addtogroup STM32F4xx_System_Includes
55 | * @{
56 | */
57 |
58 | /**
59 | * @}
60 | */
61 |
62 |
63 | /** @addtogroup STM32F4xx_System_Exported_types
64 | * @{
65 | */
66 | /* This variable is updated in three ways:
67 | 1) by calling CMSIS function SystemCoreClockUpdate()
68 | 2) by calling HAL API function HAL_RCC_GetSysClockFreq()
69 | 3) each time HAL_RCC_ClockConfig() is called to configure the system clock frequency
70 | Note: If you use this function to configure the system clock; then there
71 | is no need to call the 2 first functions listed above, since SystemCoreClock
72 | variable is updated automatically.
73 | */
74 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
75 |
76 | extern const uint8_t AHBPrescTable[16]; /*!< AHB prescalers table values */
77 | extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
78 |
79 | /**
80 | * @}
81 | */
82 |
83 | /** @addtogroup STM32F4xx_System_Exported_Constants
84 | * @{
85 | */
86 |
87 | /**
88 | * @}
89 | */
90 |
91 | /** @addtogroup STM32F4xx_System_Exported_Macros
92 | * @{
93 | */
94 |
95 | /**
96 | * @}
97 | */
98 |
99 | /** @addtogroup STM32F4xx_System_Exported_Functions
100 | * @{
101 | */
102 |
103 | extern void SystemInit(void);
104 | extern void SystemCoreClockUpdate(void);
105 | /**
106 | * @}
107 | */
108 |
109 | #ifdef __cplusplus
110 | }
111 | #endif
112 |
113 | #endif /*__SYSTEM_STM32F4XX_H */
114 |
115 | /**
116 | * @}
117 | */
118 |
119 | /**
120 | * @}
121 | */
122 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
123 |
--------------------------------------------------------------------------------
/Core/Inc/main.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : main.h
5 | * @brief : Header for main.c file.
6 | * This file contains the common defines of the application.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __MAIN_H
24 | #define __MAIN_H
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include "stm32f4xx_hal.h"
32 |
33 | #include "stm32f4xx_ll_tim.h"
34 | #include "stm32f4xx_ll_bus.h"
35 | #include "stm32f4xx_ll_cortex.h"
36 | #include "stm32f4xx_ll_rcc.h"
37 | #include "stm32f4xx_ll_system.h"
38 | #include "stm32f4xx_ll_utils.h"
39 | #include "stm32f4xx_ll_pwr.h"
40 | #include "stm32f4xx_ll_gpio.h"
41 | #include "stm32f4xx_ll_dma.h"
42 |
43 | #include "stm32f4xx_ll_exti.h"
44 |
45 | /* Private includes ----------------------------------------------------------*/
46 | /* USER CODE BEGIN Includes */
47 |
48 | /* USER CODE END Includes */
49 |
50 | /* Exported types ------------------------------------------------------------*/
51 | /* USER CODE BEGIN ET */
52 |
53 | /* USER CODE END ET */
54 |
55 | /* Exported constants --------------------------------------------------------*/
56 | /* USER CODE BEGIN EC */
57 |
58 | /* USER CODE END EC */
59 |
60 | /* Exported macro ------------------------------------------------------------*/
61 | /* USER CODE BEGIN EM */
62 |
63 | /* USER CODE END EM */
64 |
65 | /* Exported functions prototypes ---------------------------------------------*/
66 | void Error_Handler(void);
67 |
68 | /* USER CODE BEGIN EFP */
69 |
70 | /* USER CODE END EFP */
71 |
72 | /* Private defines -----------------------------------------------------------*/
73 | #define LED_Pin GPIO_PIN_13
74 | #define LED_GPIO_Port GPIOC
75 | #define KEY_Pin GPIO_PIN_0
76 | #define KEY_GPIO_Port GPIOA
77 | #define LCD1_CMD_Pin GPIO_PIN_4
78 | #define LCD1_CMD_GPIO_Port GPIOA
79 | #define MUTE_OUT_Pin GPIO_PIN_2
80 | #define MUTE_OUT_GPIO_Port GPIOB
81 | #define LCD_CMD_Pin GPIO_PIN_4
82 | #define LCD_CMD_GPIO_Port GPIOB
83 | #define LCD_RESET_Pin GPIO_PIN_8
84 | #define LCD_RESET_GPIO_Port GPIOB
85 | #define LCD_BL_Pin GPIO_PIN_9
86 | #define LCD_BL_GPIO_Port GPIOB
87 | /* USER CODE BEGIN Private defines */
88 | /*
89 | //!!!!!!!!!!!!!stm32f401ccu6!!!!!!!!!!!!!
90 | V5+ VIN
91 | GND GND
92 | B12 (i2s2_ws) LCK
93 | B15 (i2s2_sd) DIN
94 | B10 (i2s2_ck) BCK
95 | GND SCK
96 | PB2 (mute_out) XSMT
97 |
98 | !!!V3.3+,GND ,LCD_BL & LCD_RESET are common for both displays!!!
99 |
100 | LEFT or siigle display:
101 | GND GND
102 | V3.3+ VCC
103 | PB3 (SPI3_SCK) SCK
104 | PB5 (SPI3_MOSI) SDA
105 | PB8 (LCD_RESET) RES
106 | PB4 (LCD_CMD) DC (data/command)
107 | PB9(LCD_BL) BLK (back light)
108 |
109 | RIGHT display(optional):
110 | GND GND
111 | V3.3+ VCC
112 | PA5 (SPI1_SCK) SCK
113 | PA7 (SPI1_MOSI) SDA
114 | PB8 (LCD_RESET) RES
115 | PA4 (LCD1_CMD) DC (data/command)
116 | PB9(LCD_BL) BLK (back light)
117 |
118 | rotate encoder (optional)
119 | GND GND
120 | V3.3+ +
121 | PA0 SW
122 | PA15 DT
123 | PA1 CLK
124 |
125 |
126 | */
127 | /* USER CODE END Private defines */
128 |
129 | #ifdef __cplusplus
130 | }
131 | #endif
132 |
133 | #endif /* __MAIN_H */
134 |
135 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
136 |
--------------------------------------------------------------------------------
/USB_DEVICE/Target/usbd_conf.h:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usbd_conf.h
5 | * @version : v1.0_Cube
6 | * @brief : Header for usbd_conf.c file.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 |
22 | /* Define to prevent recursive inclusion -------------------------------------*/
23 | #ifndef __USBD_CONF__H__
24 | #define __USBD_CONF__H__
25 |
26 | #ifdef __cplusplus
27 | extern "C" {
28 | #endif
29 |
30 | /* Includes ------------------------------------------------------------------*/
31 | #include
32 | #include
33 | #include
34 | #include "main.h"
35 | #include "stm32f4xx.h"
36 | #include "stm32f4xx_hal.h"
37 |
38 | /* USER CODE BEGIN INCLUDE */
39 |
40 | /* USER CODE END INCLUDE */
41 |
42 | /** @addtogroup USBD_OTG_DRIVER
43 | * @brief Driver for Usb device.
44 | * @{
45 | */
46 |
47 | /** @defgroup USBD_CONF USBD_CONF
48 | * @brief Configuration file for Usb otg low level driver.
49 | * @{
50 | */
51 |
52 | /** @defgroup USBD_CONF_Exported_Variables USBD_CONF_Exported_Variables
53 | * @brief Public variables.
54 | * @{
55 | */
56 |
57 | /**
58 | * @}
59 | */
60 |
61 | /** @defgroup USBD_CONF_Exported_Defines USBD_CONF_Exported_Defines
62 | * @brief Defines for configuration of the Usb device.
63 | * @{
64 | */
65 |
66 | /*---------- -----------*/
67 | #define USBD_MAX_NUM_INTERFACES 1U
68 | /*---------- -----------*/
69 | #define USBD_MAX_NUM_CONFIGURATION 1U
70 | /*---------- -----------*/
71 | #define USBD_MAX_STR_DESC_SIZ 512U
72 | /*---------- -----------*/
73 | #define USBD_DEBUG_LEVEL 0U
74 | /*---------- -----------*/
75 | #define USBD_LPM_ENABLED 0U
76 | /*---------- -----------*/
77 | #define USBD_SELF_POWERED 0U
78 | /*---------- -----------*/
79 | #define USBD_AUDIO_FREQ 48000U
80 |
81 | /****************************************/
82 | /* #define for FS and HS identification */
83 | #define DEVICE_FS 0
84 | #define DEVICE_HS 1
85 |
86 | /**
87 | * @}
88 | */
89 |
90 | /** @defgroup USBD_CONF_Exported_Macros USBD_CONF_Exported_Macros
91 | * @brief Aliases.
92 | * @{
93 | */
94 | /* Memory management macros make sure to use static memory allocation */
95 | /** Alias for memory allocation. */
96 |
97 | #define USBD_malloc (void *)USBD_static_malloc
98 |
99 | /** Alias for memory release. */
100 | #define USBD_free USBD_static_free
101 |
102 | /** Alias for memory set. */
103 | #define USBD_memset memset
104 |
105 | /** Alias for memory copy. */
106 | #define USBD_memcpy memcpy
107 |
108 | /** Alias for delay. */
109 | #define USBD_Delay HAL_Delay
110 |
111 | /* DEBUG macros */
112 |
113 | #if (USBD_DEBUG_LEVEL > 0)
114 | #define USBD_UsrLog(...) printf(__VA_ARGS__);\
115 | printf("\n");
116 | #else
117 | #define USBD_UsrLog(...)
118 | #endif
119 |
120 | #if (USBD_DEBUG_LEVEL > 1)
121 |
122 | #define USBD_ErrLog(...) printf("ERROR: ") ;\
123 | printf(__VA_ARGS__);\
124 | printf("\n");
125 | #else
126 | #define USBD_ErrLog(...)
127 | #endif
128 |
129 | #if (USBD_DEBUG_LEVEL > 2)
130 | #define USBD_DbgLog(...) printf("DEBUG : ") ;\
131 | printf(__VA_ARGS__);\
132 | printf("\n");
133 | #else
134 | #define USBD_DbgLog(...)
135 | #endif
136 |
137 | /**
138 | * @}
139 | */
140 |
141 | /** @defgroup USBD_CONF_Exported_Types USBD_CONF_Exported_Types
142 | * @brief Types.
143 | * @{
144 | */
145 |
146 | /**
147 | * @}
148 | */
149 |
150 | /** @defgroup USBD_CONF_Exported_FunctionsPrototype USBD_CONF_Exported_FunctionsPrototype
151 | * @brief Declaration of public functions for Usb device.
152 | * @{
153 | */
154 |
155 | /* Exported functions -------------------------------------------------------*/
156 | void *USBD_static_malloc(uint32_t size);
157 | void USBD_static_free(void *p);
158 |
159 | /**
160 | * @}
161 | */
162 |
163 | /**
164 | * @}
165 | */
166 |
167 | /**
168 | * @}
169 | */
170 |
171 | #ifdef __cplusplus
172 | }
173 | #endif
174 |
175 | #endif /* __USBD_CONF__H__ */
176 |
177 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
178 |
--------------------------------------------------------------------------------
/STM32F401CCUX_FLASH.ld:
--------------------------------------------------------------------------------
1 | /*
2 | ******************************************************************************
3 | **
4 | ** @file : LinkerScript.ld
5 | **
6 | ** @author : Auto-generated by STM32CubeIDE
7 | **
8 | ** @brief : Linker script for STM32F401CCUx Device from STM32F4 series
9 | ** 256Kbytes FLASH
10 | ** 64Kbytes RAM
11 | **
12 | ** Set heap size, stack size and stack location according
13 | ** to application requirements.
14 | **
15 | ** Set memory bank area and size if external memory is used
16 | **
17 | ** Target : STMicroelectronics STM32
18 | **
19 | ** Distribution: The file is distributed as is, without any warranty
20 | ** of any kind.
21 | **
22 | ******************************************************************************
23 | ** @attention
24 | **
25 | ** Copyright (c) 2022 STMicroelectronics.
26 | ** All rights reserved.
27 | **
28 | ** This software is licensed under terms that can be found in the LICENSE file
29 | ** in the root directory of this software component.
30 | ** If no LICENSE file comes with this software, it is provided AS-IS.
31 | **
32 | ******************************************************************************
33 | */
34 |
35 | /* Entry Point */
36 | ENTRY(Reset_Handler)
37 |
38 | /* Highest address of the user mode stack */
39 | _estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
40 |
41 | _Min_Heap_Size = 0x200 ; /* required amount of heap */
42 | _Min_Stack_Size = 0x400 ; /* required amount of stack */
43 |
44 | /* Memories definition */
45 | MEMORY
46 | {
47 | RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
48 | FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 256K
49 | }
50 |
51 | /* Sections */
52 | SECTIONS
53 | {
54 | /* The startup code into "FLASH" Rom type memory */
55 | .isr_vector :
56 | {
57 | . = ALIGN(4);
58 | KEEP(*(.isr_vector)) /* Startup code */
59 | . = ALIGN(4);
60 | } >FLASH
61 |
62 | /* The program code and other data into "FLASH" Rom type memory */
63 | .text :
64 | {
65 | . = ALIGN(4);
66 | *(.text) /* .text sections (code) */
67 | *(.text*) /* .text* sections (code) */
68 | *(.glue_7) /* glue arm to thumb code */
69 | *(.glue_7t) /* glue thumb to arm code */
70 | *(.eh_frame)
71 |
72 | KEEP (*(.init))
73 | KEEP (*(.fini))
74 |
75 | . = ALIGN(4);
76 | _etext = .; /* define a global symbols at end of code */
77 | } >FLASH
78 |
79 | /* Constant data into "FLASH" Rom type memory */
80 | .rodata :
81 | {
82 | . = ALIGN(4);
83 | *(.rodata) /* .rodata sections (constants, strings, etc.) */
84 | *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
85 | . = ALIGN(4);
86 | } >FLASH
87 |
88 | .ARM.extab : {
89 | . = ALIGN(4);
90 | *(.ARM.extab* .gnu.linkonce.armextab.*)
91 | . = ALIGN(4);
92 | } >FLASH
93 |
94 | .ARM : {
95 | . = ALIGN(4);
96 | __exidx_start = .;
97 | *(.ARM.exidx*)
98 | __exidx_end = .;
99 | . = ALIGN(4);
100 | } >FLASH
101 |
102 | .preinit_array :
103 | {
104 | . = ALIGN(4);
105 | PROVIDE_HIDDEN (__preinit_array_start = .);
106 | KEEP (*(.preinit_array*))
107 | PROVIDE_HIDDEN (__preinit_array_end = .);
108 | . = ALIGN(4);
109 | } >FLASH
110 |
111 | .init_array :
112 | {
113 | . = ALIGN(4);
114 | PROVIDE_HIDDEN (__init_array_start = .);
115 | KEEP (*(SORT(.init_array.*)))
116 | KEEP (*(.init_array*))
117 | PROVIDE_HIDDEN (__init_array_end = .);
118 | . = ALIGN(4);
119 | } >FLASH
120 |
121 | .fini_array :
122 | {
123 | . = ALIGN(4);
124 | PROVIDE_HIDDEN (__fini_array_start = .);
125 | KEEP (*(SORT(.fini_array.*)))
126 | KEEP (*(.fini_array*))
127 | PROVIDE_HIDDEN (__fini_array_end = .);
128 | . = ALIGN(4);
129 | } >FLASH
130 |
131 | /* Used by the startup to initialize data */
132 | _sidata = LOADADDR(.data);
133 |
134 | /* Initialized data sections into "RAM" Ram type memory */
135 | .data :
136 | {
137 | . = ALIGN(4);
138 | _sdata = .; /* create a global symbol at data start */
139 | *(.data) /* .data sections */
140 | *(.data*) /* .data* sections */
141 | *(.RamFunc) /* .RamFunc sections */
142 | *(.RamFunc*) /* .RamFunc* sections */
143 |
144 | . = ALIGN(4);
145 | _edata = .; /* define a global symbol at data end */
146 |
147 | } >RAM AT> FLASH
148 |
149 | /* Uninitialized data section into "RAM" Ram type memory */
150 | . = ALIGN(4);
151 | .bss :
152 | {
153 | /* This is used by the startup in order to initialize the .bss section */
154 | _sbss = .; /* define a global symbol at bss start */
155 | __bss_start__ = _sbss;
156 | *(.bss)
157 | *(.bss*)
158 | *(COMMON)
159 |
160 | . = ALIGN(4);
161 | _ebss = .; /* define a global symbol at bss end */
162 | __bss_end__ = _ebss;
163 | } >RAM
164 |
165 | /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
166 | ._user_heap_stack :
167 | {
168 | . = ALIGN(8);
169 | PROVIDE ( end = . );
170 | PROVIDE ( _end = . );
171 | . = . + _Min_Heap_Size;
172 | . = . + _Min_Stack_Size;
173 | . = ALIGN(8);
174 | } >RAM
175 |
176 | /* Remove information from the compiler libraries */
177 | /DISCARD/ :
178 | {
179 | libc.a ( * )
180 | libm.a ( * )
181 | libgcc.a ( * )
182 | }
183 |
184 | .ARM.attributes 0 : { *(.ARM.attributes) }
185 | }
186 |
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Core/Inc/usbd_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_core.h
4 | * @author MCD Application Team
5 | * @brief Header file for usbd_core.c file
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __USBD_CORE_H
22 | #define __USBD_CORE_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "usbd_conf.h"
30 | #include "usbd_def.h"
31 | #include "usbd_ioreq.h"
32 | #include "usbd_ctlreq.h"
33 |
34 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
35 | * @{
36 | */
37 |
38 | /** @defgroup USBD_CORE
39 | * @brief This file is the Header file for usbd_core.c file
40 | * @{
41 | */
42 |
43 |
44 | /** @defgroup USBD_CORE_Exported_Defines
45 | * @{
46 | */
47 | #ifndef USBD_DEBUG_LEVEL
48 | #define USBD_DEBUG_LEVEL 0U
49 | #endif /* USBD_DEBUG_LEVEL */
50 | /**
51 | * @}
52 | */
53 |
54 |
55 | /** @defgroup USBD_CORE_Exported_TypesDefinitions
56 | * @{
57 | */
58 |
59 |
60 | /**
61 | * @}
62 | */
63 |
64 |
65 |
66 | /** @defgroup USBD_CORE_Exported_Macros
67 | * @{
68 | */
69 |
70 | /**
71 | * @}
72 | */
73 |
74 | /** @defgroup USBD_CORE_Exported_Variables
75 | * @{
76 | */
77 | #define USBD_SOF USBD_LL_SOF
78 | /**
79 | * @}
80 | */
81 |
82 | /** @defgroup USBD_CORE_Exported_FunctionsPrototype
83 | * @{
84 | */
85 | USBD_StatusTypeDef USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id);
86 | USBD_StatusTypeDef USBD_DeInit(USBD_HandleTypeDef *pdev);
87 | USBD_StatusTypeDef USBD_Start(USBD_HandleTypeDef *pdev);
88 | USBD_StatusTypeDef USBD_Stop(USBD_HandleTypeDef *pdev);
89 | USBD_StatusTypeDef USBD_RegisterClass(USBD_HandleTypeDef *pdev, USBD_ClassTypeDef *pclass);
90 |
91 | USBD_StatusTypeDef USBD_RunTestMode(USBD_HandleTypeDef *pdev);
92 | USBD_StatusTypeDef USBD_SetClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx);
93 | USBD_StatusTypeDef USBD_ClrClassConfig(USBD_HandleTypeDef *pdev, uint8_t cfgidx);
94 |
95 | USBD_StatusTypeDef USBD_LL_SetupStage(USBD_HandleTypeDef *pdev, uint8_t *psetup);
96 | USBD_StatusTypeDef USBD_LL_DataOutStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata);
97 | USBD_StatusTypeDef USBD_LL_DataInStage(USBD_HandleTypeDef *pdev, uint8_t epnum, uint8_t *pdata);
98 |
99 | USBD_StatusTypeDef USBD_LL_Reset(USBD_HandleTypeDef *pdev);
100 | USBD_StatusTypeDef USBD_LL_SetSpeed(USBD_HandleTypeDef *pdev, USBD_SpeedTypeDef speed);
101 | USBD_StatusTypeDef USBD_LL_Suspend(USBD_HandleTypeDef *pdev);
102 | USBD_StatusTypeDef USBD_LL_Resume(USBD_HandleTypeDef *pdev);
103 |
104 | USBD_StatusTypeDef USBD_LL_SOF(USBD_HandleTypeDef *pdev);
105 | USBD_StatusTypeDef USBD_LL_IsoINIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum);
106 | USBD_StatusTypeDef USBD_LL_IsoOUTIncomplete(USBD_HandleTypeDef *pdev, uint8_t epnum);
107 |
108 | USBD_StatusTypeDef USBD_LL_DevConnected(USBD_HandleTypeDef *pdev);
109 | USBD_StatusTypeDef USBD_LL_DevDisconnected(USBD_HandleTypeDef *pdev);
110 |
111 | /* USBD Low Level Driver */
112 | USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev);
113 | USBD_StatusTypeDef USBD_LL_DeInit(USBD_HandleTypeDef *pdev);
114 | USBD_StatusTypeDef USBD_LL_Start(USBD_HandleTypeDef *pdev);
115 | USBD_StatusTypeDef USBD_LL_Stop(USBD_HandleTypeDef *pdev);
116 |
117 | USBD_StatusTypeDef USBD_LL_OpenEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
118 | uint8_t ep_type, uint16_t ep_mps);
119 |
120 | USBD_StatusTypeDef USBD_LL_CloseEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
121 | USBD_StatusTypeDef USBD_LL_FlushEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
122 | USBD_StatusTypeDef USBD_LL_StallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
123 | USBD_StatusTypeDef USBD_LL_ClearStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
124 | USBD_StatusTypeDef USBD_LL_SetUSBAddress(USBD_HandleTypeDef *pdev, uint8_t dev_addr);
125 |
126 | USBD_StatusTypeDef USBD_LL_Transmit(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
127 | uint8_t *pbuf, uint32_t size);
128 |
129 | USBD_StatusTypeDef USBD_LL_PrepareReceive(USBD_HandleTypeDef *pdev, uint8_t ep_addr,
130 | uint8_t *pbuf, uint32_t size);
131 |
132 | uint8_t USBD_LL_IsStallEP(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
133 | uint32_t USBD_LL_GetRxDataSize(USBD_HandleTypeDef *pdev, uint8_t ep_addr);
134 |
135 | void USBD_LL_Delay(uint32_t Delay);
136 |
137 | /**
138 | * @}
139 | */
140 |
141 | #ifdef __cplusplus
142 | }
143 | #endif
144 |
145 | #endif /* __USBD_CORE_H */
146 |
147 | /**
148 | * @}
149 | */
150 |
151 | /**
152 | * @}
153 | */
154 |
155 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_ioreq.c
4 | * @author MCD Application Team
5 | * @brief This file provides the IO requests APIs for control endpoints.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Includes ------------------------------------------------------------------*/
21 | #include "usbd_ioreq.h"
22 |
23 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
24 | * @{
25 | */
26 |
27 |
28 | /** @defgroup USBD_IOREQ
29 | * @brief control I/O requests module
30 | * @{
31 | */
32 |
33 | /** @defgroup USBD_IOREQ_Private_TypesDefinitions
34 | * @{
35 | */
36 | /**
37 | * @}
38 | */
39 |
40 |
41 | /** @defgroup USBD_IOREQ_Private_Defines
42 | * @{
43 | */
44 |
45 | /**
46 | * @}
47 | */
48 |
49 |
50 | /** @defgroup USBD_IOREQ_Private_Macros
51 | * @{
52 | */
53 | /**
54 | * @}
55 | */
56 |
57 |
58 | /** @defgroup USBD_IOREQ_Private_Variables
59 | * @{
60 | */
61 |
62 | /**
63 | * @}
64 | */
65 |
66 |
67 | /** @defgroup USBD_IOREQ_Private_FunctionPrototypes
68 | * @{
69 | */
70 | /**
71 | * @}
72 | */
73 |
74 |
75 | /** @defgroup USBD_IOREQ_Private_Functions
76 | * @{
77 | */
78 |
79 | /**
80 | * @brief USBD_CtlSendData
81 | * send data on the ctl pipe
82 | * @param pdev: device instance
83 | * @param buff: pointer to data buffer
84 | * @param len: length of data to be sent
85 | * @retval status
86 | */
87 | USBD_StatusTypeDef USBD_CtlSendData(USBD_HandleTypeDef *pdev,
88 | uint8_t *pbuf, uint32_t len)
89 | {
90 | /* Set EP0 State */
91 | pdev->ep0_state = USBD_EP0_DATA_IN;
92 | pdev->ep_in[0].total_length = len;
93 |
94 | #ifdef USBD_AVOID_PACKET_SPLIT_MPS
95 | pdev->ep_in[0].rem_length = 0U;
96 | #else
97 | pdev->ep_in[0].rem_length = len;
98 | #endif
99 |
100 | /* Start the transfer */
101 | (void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
102 |
103 | return USBD_OK;
104 | }
105 |
106 | /**
107 | * @brief USBD_CtlContinueSendData
108 | * continue sending data on the ctl pipe
109 | * @param pdev: device instance
110 | * @param buff: pointer to data buffer
111 | * @param len: length of data to be sent
112 | * @retval status
113 | */
114 | USBD_StatusTypeDef USBD_CtlContinueSendData(USBD_HandleTypeDef *pdev,
115 | uint8_t *pbuf, uint32_t len)
116 | {
117 | /* Start the next transfer */
118 | (void)USBD_LL_Transmit(pdev, 0x00U, pbuf, len);
119 |
120 | return USBD_OK;
121 | }
122 |
123 | /**
124 | * @brief USBD_CtlPrepareRx
125 | * receive data on the ctl pipe
126 | * @param pdev: device instance
127 | * @param buff: pointer to data buffer
128 | * @param len: length of data to be received
129 | * @retval status
130 | */
131 | USBD_StatusTypeDef USBD_CtlPrepareRx(USBD_HandleTypeDef *pdev,
132 | uint8_t *pbuf, uint32_t len)
133 | {
134 | /* Set EP0 State */
135 | pdev->ep0_state = USBD_EP0_DATA_OUT;
136 | pdev->ep_out[0].total_length = len;
137 |
138 | #ifdef USBD_AVOID_PACKET_SPLIT_MPS
139 | pdev->ep_out[0].rem_length = 0U;
140 | #else
141 | pdev->ep_out[0].rem_length = len;
142 | #endif
143 |
144 | /* Start the transfer */
145 | (void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
146 |
147 | return USBD_OK;
148 | }
149 |
150 | /**
151 | * @brief USBD_CtlContinueRx
152 | * continue receive data on the ctl pipe
153 | * @param pdev: device instance
154 | * @param buff: pointer to data buffer
155 | * @param len: length of data to be received
156 | * @retval status
157 | */
158 | USBD_StatusTypeDef USBD_CtlContinueRx(USBD_HandleTypeDef *pdev,
159 | uint8_t *pbuf, uint32_t len)
160 | {
161 | (void)USBD_LL_PrepareReceive(pdev, 0U, pbuf, len);
162 |
163 | return USBD_OK;
164 | }
165 |
166 | /**
167 | * @brief USBD_CtlSendStatus
168 | * send zero lzngth packet on the ctl pipe
169 | * @param pdev: device instance
170 | * @retval status
171 | */
172 | USBD_StatusTypeDef USBD_CtlSendStatus(USBD_HandleTypeDef *pdev)
173 | {
174 | /* Set EP0 State */
175 | pdev->ep0_state = USBD_EP0_STATUS_IN;
176 |
177 | /* Start the transfer */
178 | (void)USBD_LL_Transmit(pdev, 0x00U, NULL, 0U);
179 |
180 | return USBD_OK;
181 | }
182 |
183 | /**
184 | * @brief USBD_CtlReceiveStatus
185 | * receive zero lzngth packet on the ctl pipe
186 | * @param pdev: device instance
187 | * @retval status
188 | */
189 | USBD_StatusTypeDef USBD_CtlReceiveStatus(USBD_HandleTypeDef *pdev)
190 | {
191 | /* Set EP0 State */
192 | pdev->ep0_state = USBD_EP0_STATUS_OUT;
193 |
194 | /* Start the transfer */
195 | (void)USBD_LL_PrepareReceive(pdev, 0U, NULL, 0U);
196 |
197 | return USBD_OK;
198 | }
199 |
200 | /**
201 | * @brief USBD_GetRxCount
202 | * returns the received data length
203 | * @param pdev: device instance
204 | * @param ep_addr: endpoint address
205 | * @retval Rx Data blength
206 | */
207 | uint32_t USBD_GetRxCount(USBD_HandleTypeDef *pdev, uint8_t ep_addr)
208 | {
209 | return USBD_LL_GetRxDataSize(pdev, ep_addr);
210 | }
211 |
212 | /**
213 | * @}
214 | */
215 |
216 |
217 | /**
218 | * @}
219 | */
220 |
221 |
222 | /**
223 | * @}
224 | */
225 |
226 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
227 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_flash_ramfunc.c
4 | * @author MCD Application Team
5 | * @brief FLASH RAMFUNC module driver.
6 | * This file provides a FLASH firmware functions which should be
7 | * executed from internal SRAM
8 | * + Stop/Start the flash interface while System Run
9 | * + Enable/Disable the flash sleep while System Run
10 | @verbatim
11 | ==============================================================================
12 | ##### APIs executed from Internal RAM #####
13 | ==============================================================================
14 | [..]
15 | *** ARM Compiler ***
16 | --------------------
17 | [..] RAM functions are defined using the toolchain options.
18 | Functions that are be executed in RAM should reside in a separate
19 | source module. Using the 'Options for File' dialog you can simply change
20 | the 'Code / Const' area of a module to a memory space in physical RAM.
21 | Available memory areas are declared in the 'Target' tab of the
22 | Options for Target' dialog.
23 |
24 | *** ICCARM Compiler ***
25 | -----------------------
26 | [..] RAM functions are defined using a specific toolchain keyword "__ramfunc".
27 |
28 | *** GNU Compiler ***
29 | --------------------
30 | [..] RAM functions are defined using a specific toolchain attribute
31 | "__attribute__((section(".RamFunc")))".
32 |
33 | @endverbatim
34 | ******************************************************************************
35 | * @attention
36 | *
37 | * © Copyright (c) 2017 STMicroelectronics.
38 | * All rights reserved.
39 | *
40 | * This software component is licensed by ST under BSD 3-Clause license,
41 | * the "License"; You may not use this file except in compliance with the
42 | * License. You may obtain a copy of the License at:
43 | * opensource.org/licenses/BSD-3-Clause
44 | *
45 | ******************************************************************************
46 | */
47 |
48 | /* Includes ------------------------------------------------------------------*/
49 | #include "stm32f4xx_hal.h"
50 |
51 | /** @addtogroup STM32F4xx_HAL_Driver
52 | * @{
53 | */
54 |
55 | /** @defgroup FLASH_RAMFUNC FLASH RAMFUNC
56 | * @brief FLASH functions executed from RAM
57 | * @{
58 | */
59 | #ifdef HAL_FLASH_MODULE_ENABLED
60 | #if defined(STM32F410Tx) || defined(STM32F410Cx) || defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \
61 | defined(STM32F412Rx) || defined(STM32F412Cx)
62 |
63 | /* Private typedef -----------------------------------------------------------*/
64 | /* Private define ------------------------------------------------------------*/
65 | /* Private macro -------------------------------------------------------------*/
66 | /* Private variables ---------------------------------------------------------*/
67 | /* Private function prototypes -----------------------------------------------*/
68 | /* Exported functions --------------------------------------------------------*/
69 | /** @defgroup FLASH_RAMFUNC_Exported_Functions FLASH RAMFUNC Exported Functions
70 | * @{
71 | */
72 |
73 | /** @defgroup FLASH_RAMFUNC_Exported_Functions_Group1 Peripheral features functions executed from internal RAM
74 | * @brief Peripheral Extended features functions
75 | *
76 | @verbatim
77 |
78 | ===============================================================================
79 | ##### ramfunc functions #####
80 | ===============================================================================
81 | [..]
82 | This subsection provides a set of functions that should be executed from RAM
83 | transfers.
84 |
85 | @endverbatim
86 | * @{
87 | */
88 |
89 | /**
90 | * @brief Stop the flash interface while System Run
91 | * @note This mode is only available for STM32F41xxx/STM32F446xx devices.
92 | * @note This mode couldn't be set while executing with the flash itself.
93 | * It should be done with specific routine executed from RAM.
94 | * @retval HAL status
95 | */
96 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StopFlashInterfaceClk(void)
97 | {
98 | /* Enable Power ctrl clock */
99 | __HAL_RCC_PWR_CLK_ENABLE();
100 | /* Stop the flash interface while System Run */
101 | SET_BIT(PWR->CR, PWR_CR_FISSR);
102 |
103 | return HAL_OK;
104 | }
105 |
106 | /**
107 | * @brief Start the flash interface while System Run
108 | * @note This mode is only available for STM32F411xx/STM32F446xx devices.
109 | * @note This mode couldn't be set while executing with the flash itself.
110 | * It should be done with specific routine executed from RAM.
111 | * @retval HAL status
112 | */
113 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_StartFlashInterfaceClk(void)
114 | {
115 | /* Enable Power ctrl clock */
116 | __HAL_RCC_PWR_CLK_ENABLE();
117 | /* Start the flash interface while System Run */
118 | CLEAR_BIT(PWR->CR, PWR_CR_FISSR);
119 |
120 | return HAL_OK;
121 | }
122 |
123 | /**
124 | * @brief Enable the flash sleep while System Run
125 | * @note This mode is only available for STM32F41xxx/STM32F446xx devices.
126 | * @note This mode could n't be set while executing with the flash itself.
127 | * It should be done with specific routine executed from RAM.
128 | * @retval HAL status
129 | */
130 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_EnableFlashSleepMode(void)
131 | {
132 | /* Enable Power ctrl clock */
133 | __HAL_RCC_PWR_CLK_ENABLE();
134 | /* Enable the flash sleep while System Run */
135 | SET_BIT(PWR->CR, PWR_CR_FMSSR);
136 |
137 | return HAL_OK;
138 | }
139 |
140 | /**
141 | * @brief Disable the flash sleep while System Run
142 | * @note This mode is only available for STM32F41xxx/STM32F446xx devices.
143 | * @note This mode couldn't be set while executing with the flash itself.
144 | * It should be done with specific routine executed from RAM.
145 | * @retval HAL status
146 | */
147 | __RAM_FUNC HAL_StatusTypeDef HAL_FLASHEx_DisableFlashSleepMode(void)
148 | {
149 | /* Enable Power ctrl clock */
150 | __HAL_RCC_PWR_CLK_ENABLE();
151 | /* Disable the flash sleep while System Run */
152 | CLEAR_BIT(PWR->CR, PWR_CR_FMSSR);
153 |
154 | return HAL_OK;
155 | }
156 |
157 | /**
158 | * @}
159 | */
160 |
161 | /**
162 | * @}
163 | */
164 |
165 | #endif /* STM32F410xx || STM32F411xE || STM32F446xx || STM32F412Zx || STM32F412Vx || STM32F412Rx || STM32F412Cx */
166 | #endif /* HAL_FLASH_MODULE_ENABLED */
167 | /**
168 | * @}
169 | */
170 |
171 | /**
172 | * @}
173 | */
174 |
175 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
176 |
--------------------------------------------------------------------------------
/Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc/usbd_audio.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file usbd_audio.h
4 | * @author MCD Application Team
5 | * @brief header file for the usbd_audio.c file.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2015 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef __USB_AUDIO_H
22 | #define __USB_AUDIO_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "usbd_ioreq.h"
30 |
31 | /** @addtogroup STM32_USB_DEVICE_LIBRARY
32 | * @{
33 | */
34 |
35 | /** @defgroup USBD_AUDIO
36 | * @brief This file is the Header file for usbd_audio.c
37 | * @{
38 | */
39 |
40 |
41 | /** @defgroup USBD_AUDIO_Exported_Defines
42 | * @{
43 | */
44 | #ifndef USBD_AUDIO_FREQ
45 | /* AUDIO Class Config */
46 | #define USBD_AUDIO_FREQ 48000U
47 | #endif /* USBD_AUDIO_FREQ */
48 |
49 | #ifndef USBD_MAX_NUM_INTERFACES
50 | #define USBD_MAX_NUM_INTERFACES 1U
51 | #endif /* USBD_AUDIO_FREQ */
52 |
53 | #ifndef AUDIO_HS_BINTERVAL
54 | #define AUDIO_HS_BINTERVAL 0x01U
55 | #endif /* AUDIO_HS_BINTERVAL */
56 |
57 | #ifndef AUDIO_FS_BINTERVAL
58 | #define AUDIO_FS_BINTERVAL 0x01U
59 | #endif /* AUDIO_FS_BINTERVAL */
60 |
61 | #define AUDIO_OUT_EP 0x01U
62 | #define USB_AUDIO_CONFIG_DESC_SIZ 0x6DU
63 | #define AUDIO_INTERFACE_DESC_SIZE 0x09U
64 | #define USB_AUDIO_DESC_SIZ 0x09U
65 | #define AUDIO_STANDARD_ENDPOINT_DESC_SIZE 0x09U
66 | #define AUDIO_STREAMING_ENDPOINT_DESC_SIZE 0x07U
67 |
68 | #define AUDIO_DESCRIPTOR_TYPE 0x21U
69 | #define USB_DEVICE_CLASS_AUDIO 0x01U
70 | #define AUDIO_SUBCLASS_AUDIOCONTROL 0x01U
71 | #define AUDIO_SUBCLASS_AUDIOSTREAMING 0x02U
72 | #define AUDIO_PROTOCOL_UNDEFINED 0x00U
73 | #define AUDIO_STREAMING_GENERAL 0x01U
74 | #define AUDIO_STREAMING_FORMAT_TYPE 0x02U
75 |
76 | /* Audio Descriptor Types */
77 | #define AUDIO_INTERFACE_DESCRIPTOR_TYPE 0x24U
78 | #define AUDIO_ENDPOINT_DESCRIPTOR_TYPE 0x25U
79 |
80 | /* Audio Control Interface Descriptor Subtypes */
81 | #define AUDIO_CONTROL_HEADER 0x01U
82 | #define AUDIO_CONTROL_INPUT_TERMINAL 0x02U
83 | #define AUDIO_CONTROL_OUTPUT_TERMINAL 0x03U
84 | #define AUDIO_CONTROL_FEATURE_UNIT 0x06U
85 |
86 | #define AUDIO_INPUT_TERMINAL_DESC_SIZE 0x0CU
87 | #define AUDIO_OUTPUT_TERMINAL_DESC_SIZE 0x09U
88 | #define AUDIO_STREAMING_INTERFACE_DESC_SIZE 0x07U
89 |
90 | #define AUDIO_CONTROL_MUTE 0x0001U
91 |
92 | #define AUDIO_FORMAT_TYPE_I 0x01U
93 | #define AUDIO_FORMAT_TYPE_III 0x03U
94 |
95 | #define AUDIO_ENDPOINT_GENERAL 0x01U
96 |
97 | #define AUDIO_REQ_GET_CUR 0x81U
98 | #define AUDIO_REQ_SET_CUR 0x01U
99 |
100 | #define AUDIO_OUT_STREAMING_CTRL 0x02U
101 |
102 | #define AUDIO_OUT_TC 0x01U
103 | #define AUDIO_IN_TC 0x02U
104 |
105 |
106 | #define AUDIO_OUT_PACKET (uint16_t)(((USBD_AUDIO_FREQ * 2U * 2U) / 1000U))
107 | #define AUDIO_DEFAULT_VOLUME 70U
108 |
109 | /* Number of sub-packets in the audio transfer buffer. You can modify this value but always make sure
110 | that it is an even number and higher than 3 */
111 | #define AUDIO_OUT_PACKET_NUM 80U
112 | /* Total size of the audio transfer buffer */
113 | #define AUDIO_TOTAL_BUF_SIZE ((uint16_t)(AUDIO_OUT_PACKET * AUDIO_OUT_PACKET_NUM))
114 |
115 | /* Audio Commands enumeration */
116 | typedef enum
117 | {
118 | AUDIO_CMD_START = 1,
119 | AUDIO_CMD_PLAY,
120 | AUDIO_CMD_STOP,
121 | } AUDIO_CMD_TypeDef;
122 |
123 |
124 | typedef enum
125 | {
126 | AUDIO_OFFSET_NONE = 0,
127 | AUDIO_OFFSET_HALF,
128 | AUDIO_OFFSET_FULL,
129 | AUDIO_OFFSET_UNKNOWN,
130 | } AUDIO_OffsetTypeDef;
131 | /**
132 | * @}
133 | */
134 |
135 |
136 | /** @defgroup USBD_CORE_Exported_TypesDefinitions
137 | * @{
138 | */
139 | typedef struct
140 | {
141 | uint8_t cmd;
142 | uint8_t data[USB_MAX_EP0_SIZE];
143 | uint8_t len;
144 | uint8_t unit;
145 | } USBD_AUDIO_ControlTypeDef;
146 |
147 |
148 | typedef struct
149 | {
150 | uint32_t alt_setting;
151 | uint8_t buffer[AUDIO_TOTAL_BUF_SIZE];
152 | AUDIO_OffsetTypeDef offset;
153 | uint8_t rd_enable;
154 | uint16_t rd_ptr;
155 | uint16_t wr_ptr;
156 | USBD_AUDIO_ControlTypeDef control;
157 | } USBD_AUDIO_HandleTypeDef;
158 |
159 |
160 | typedef struct
161 | {
162 | int8_t (*Init)(uint32_t AudioFreq, uint32_t Volume, uint32_t options);
163 | int8_t (*DeInit)(uint32_t options);
164 | int8_t (*AudioCmd)(uint8_t *pbuf, uint32_t size, uint8_t cmd);
165 | int8_t (*VolumeCtl)(uint8_t vol);
166 | int8_t (*MuteCtl)(uint8_t cmd);
167 | int8_t (*PeriodicTC)(uint8_t *pbuf, uint32_t size, uint8_t cmd);
168 | int8_t (*GetState)(void);
169 | } USBD_AUDIO_ItfTypeDef;
170 | /**
171 | * @}
172 | */
173 |
174 |
175 |
176 | /** @defgroup USBD_CORE_Exported_Macros
177 | * @{
178 | */
179 |
180 | /**
181 | * @}
182 | */
183 |
184 | /** @defgroup USBD_CORE_Exported_Variables
185 | * @{
186 | */
187 |
188 | extern USBD_ClassTypeDef USBD_AUDIO;
189 | #define USBD_AUDIO_CLASS &USBD_AUDIO
190 | /**
191 | * @}
192 | */
193 |
194 | /** @defgroup USB_CORE_Exported_Functions
195 | * @{
196 | */
197 | uint8_t USBD_AUDIO_RegisterInterface(USBD_HandleTypeDef *pdev,
198 | USBD_AUDIO_ItfTypeDef *fops);
199 |
200 | void USBD_AUDIO_Sync(USBD_HandleTypeDef *pdev, AUDIO_OffsetTypeDef offset);
201 | /**
202 | * @}
203 | */
204 |
205 | #ifdef __cplusplus
206 | }
207 | #endif
208 |
209 | #endif /* __USB_AUDIO_H */
210 | /**
211 | * @}
212 | */
213 |
214 | /**
215 | * @}
216 | */
217 |
218 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
219 |
--------------------------------------------------------------------------------
/Core/Src/st7789.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file ili9341.h
4 | * @author MCD Application Team
5 | * @version V1.0.2
6 | * @date 02-December-2014
7 | * @brief This file contains all the functions prototypes for the ili9341.c
8 | * driver.
9 | ******************************************************************************
10 | * @attention
11 | *
12 | * © COPYRIGHT(c) 2014 STMicroelectronics
13 | *
14 | * Redistribution and use in source and binary forms, with or without modification,
15 | * are permitted provided that the following conditions are met:
16 | * 1. Redistributions of source code must retain the above copyright notice,
17 | * this list of conditions and the following disclaimer.
18 | * 2. Redistributions in binary form must reproduce the above copyright notice,
19 | * this list of conditions and the following disclaimer in the documentation
20 | * and/or other materials provided with the distribution.
21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors
22 | * may be used to endorse or promote products derived from this software
23 | * without specific prior written permission.
24 | *
25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 | *
36 | ******************************************************************************
37 | */
38 |
39 | /* Define to prevent recursive inclusion -------------------------------------*/
40 | #ifndef __ST7789_H
41 | #define __ST7789_H
42 |
43 | #ifdef __cplusplus
44 | extern "C" {
45 | #endif
46 | #include
47 | #define BLACK 0x0000 /* 0, 0, 0 */
48 | #define NAVY 0x000F /* 0, 0, 128 */
49 | #define DGREEN 0x03E0 /* 0, 128, 0 */
50 | #define DCYAN 0x03EF /* 0, 128, 128 */
51 | #define MAROON 0x7800 /* 128, 0, 0 */
52 | #define PURPLE 0x780F /* 128, 0, 128 */
53 | #define OLIVE 0x7BE0 /* 128, 128, 0 */
54 | #define LGRAY 0xC618 /* 192, 192, 192 */
55 | #define DGRAY 0x7BEF /* 128, 128, 128 */
56 | #define BLUE 0x001F /* 0, 0, 255 */
57 | #define GREEN 0x07E0 /* 0, 255, 0 */
58 | #define CYAN 0x07FF /* 0, 255, 255 */
59 | #define RED 0xF800 /* 255, 0, 0 */
60 | #define MAGENTA 0xF81F /* 255, 0, 255 */
61 | #define YELLOW 0xFFE0 /* 255, 255, 0 */
62 | #define WHITE 0xFFFF /* 255, 255, 255 */
63 | #define ORANGE 0xFD20 /* 255, 165, 0 */
64 | #define GREENYELLOW 0xAFE5 /* 173, 255, 47 */
65 | #define BROWN 0XBC40
66 | #define BRRED 0XFC07
67 | #define LG ((0xd7>>3)<<11)|((0xd0>>2)<<5)|(0xd7>>3)
68 | #define ST7789_TFTWIDTH_240 240
69 | #define ST7789_TFTHEIGHT_240 240
70 |
71 | #define ST7789_240x240_XSTART 0
72 | #define ST7789_240x240_YSTART 0
73 |
74 | #define ST_CMD_DELAY 0x80 // special signifier for command lists
75 |
76 | #define ST7789_NOP 0x00
77 | #define ST7789_SWRESET 0x01
78 | #define ST7789_RDDID 0x04
79 | #define ST7789_RDDST 0x09
80 |
81 | #define ST7789_SLPIN 0x10
82 | #define ST7789_SLPOUT 0x11
83 | #define ST7789_PTLON 0x12
84 | #define ST7789_NORON 0x13
85 |
86 | #define ST7789_INVOFF 0x20
87 | #define ST7789_INVON 0x21
88 | #define ST7789_DISPOFF 0x28
89 | #define ST7789_DISPON 0x29
90 | #define ST7789_CASET 0x2A
91 | #define ST7789_RASET 0x2B
92 | #define ST7789_RAMWR 0x2C
93 | #define ST7789_RAMRD 0x2E
94 |
95 | #define ST7789_PTLAR 0x30
96 | #define ST7789_COLMOD 0x3A
97 | #define ST7789_MADCTL 0x36
98 |
99 | #define ST7789_MADCTL_MY 0x80
100 | #define ST7789_MADCTL_MX 0x40
101 | #define ST7789_MADCTL_MV 0x20
102 | #define ST7789_MADCTL_ML 0x10
103 | #define ST7789_MADCTL_RGB 0x00
104 |
105 | #define ST7789_RDID1 0xDA
106 | #define ST7789_RDID2 0xDB
107 | #define ST7789_RDID3 0xDC
108 | #define ST7789_RDID4 0xDD
109 |
110 | // Color definitions
111 | #define BLACK 0x0000
112 | #define BLUE 0x001F
113 | #define RED 0xF800
114 | #define GREEN 0x07E0
115 | #define CYAN 0x07FF
116 | #define MAGENTA 0xF81F
117 | #define YELLOW 0xFFE0
118 | #define WHITE 0xFFFF
119 |
120 | /* Includes ------------------------------------------------------------------*/
121 |
122 | #define ILI9341_LCD_PIXEL_WIDTH ((uint16_t)240)
123 | #define ILI9341_LCD_PIXEL_HEIGHT ((uint16_t)240)
124 |
125 |
126 | void LCD_init();
127 | uint32_t LCD_ReadID();
128 | void LCD_setRotation(uint8_t rotation);
129 | void LCD_sendLineRect(uint16_t y1,uint8_t * data);
130 | void LCD_fillRect(uint16_t x1, uint16_t y1, uint16_t w, uint16_t h, uint16_t color);
131 | void LCD_fillRect(uint16_t x1, uint16_t y1, uint16_t w, uint16_t h, uint16_t color);
132 | void LCD_fillRectDataTable(uint16_t x1, uint16_t y1, uint16_t w, uint16_t h,uint8_t*,uint8_t*);
133 | void LCD_Draw_Char(char Character, int16_t X, int16_t Y, uint16_t Colour, uint16_t Size, uint16_t Background_Colour);
134 | void LCD_Draw_Text(const char* Text, int16_t X, int16_t Y, uint16_t Colour, uint16_t Size, uint16_t Background_Colour);
135 | void LCD_Draw_Text2(const char* Text, int16_t X, int16_t Y, uint16_t Colour, uint16_t SizeX, uint16_t SizeY,uint16_t Background_Colour);
136 | void LCD_Draw_LineP(int x0, int y0, int x1, int y1,uint8_t* color) ;
137 | void LCD_Draw_Line(int x0, int y0, int x1, int y1,uint16_t color) ;
138 | void LCD_reset();
139 | void setLCD(int num);
140 | uint16_t color_convertRGB_to16(uint8_t * adress);
141 | uint16_t color_convertRGB_to16d(uint16_t R,uint16_t G,uint16_t B);
142 | void LCD_Draw_LinePNX(int x0, int y0, int x1, int y1,int Width,int N,uint8_t* color);
143 |
144 | void LCD_Draw_LinePNX8(int x0, int y0, int x1, int y1,int Width,int N,uint8_t* color_ind,uint16_t* color16);
145 | void LCD_Draw_LinePNXShadow8(int x0, int y0, int x1, int y1,int Width,int N,uint8_t* color_ind,uint16_t* color16);
146 |
147 | void setBacklight(int percent);
148 | int getBacklight();
149 |
150 | /* Level 1 Commands */
151 |
152 | #define PORTRAIT 0
153 | #define LANDSCAPE 1
154 | #define PORTRAIT_FLIP 2
155 | #define LANDSCAPE_FLIP 3
156 |
157 | //#define COLOR_3BYTES 1
158 |
159 | /* LCD IO functions */
160 | //~ void LCD_IO_Init(void);
161 | //~ void LCD_IO_WriteData(uint16_t RegValue);
162 | //~ void LCD_IO_WriteReg(uint8_t Reg);
163 | //~ uint16_t LCD_IO_ReadData(uint16_t RegValue);
164 | void LCD_Delay (uint32_t delay);
165 |
166 | #ifdef __cplusplus
167 | }
168 | #endif
169 |
170 | #endif /* __ILI9341_H */
171 |
172 | /**
173 | * @}
174 | */
175 |
176 | /**
177 | * @}
178 | */
179 |
180 | /**
181 | * @}
182 | */
183 |
184 | /**
185 | * @}
186 | */
187 |
188 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
189 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.c:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_ll_exti.c
4 | * @author MCD Application Team
5 | * @brief EXTI LL module driver.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2016 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under BSD 3-Clause license,
13 | * the "License"; You may not use this file except in compliance with the
14 | * License. You may obtain a copy of the License at:
15 | * opensource.org/licenses/BSD-3-Clause
16 | *
17 | ******************************************************************************
18 | */
19 | #if defined(USE_FULL_LL_DRIVER)
20 |
21 | /* Includes ------------------------------------------------------------------*/
22 | #include "stm32f4xx_ll_exti.h"
23 | #ifdef USE_FULL_ASSERT
24 | #include "stm32_assert.h"
25 | #else
26 | #define assert_param(expr) ((void)0U)
27 | #endif
28 |
29 | /** @addtogroup STM32F4xx_LL_Driver
30 | * @{
31 | */
32 |
33 | #if defined (EXTI)
34 |
35 | /** @defgroup EXTI_LL EXTI
36 | * @{
37 | */
38 |
39 | /* Private types -------------------------------------------------------------*/
40 | /* Private variables ---------------------------------------------------------*/
41 | /* Private constants ---------------------------------------------------------*/
42 | /* Private macros ------------------------------------------------------------*/
43 | /** @addtogroup EXTI_LL_Private_Macros
44 | * @{
45 | */
46 |
47 | #define IS_LL_EXTI_LINE_0_31(__VALUE__) (((__VALUE__) & ~LL_EXTI_LINE_ALL_0_31) == 0x00000000U)
48 |
49 | #define IS_LL_EXTI_MODE(__VALUE__) (((__VALUE__) == LL_EXTI_MODE_IT) \
50 | || ((__VALUE__) == LL_EXTI_MODE_EVENT) \
51 | || ((__VALUE__) == LL_EXTI_MODE_IT_EVENT))
52 |
53 |
54 | #define IS_LL_EXTI_TRIGGER(__VALUE__) (((__VALUE__) == LL_EXTI_TRIGGER_NONE) \
55 | || ((__VALUE__) == LL_EXTI_TRIGGER_RISING) \
56 | || ((__VALUE__) == LL_EXTI_TRIGGER_FALLING) \
57 | || ((__VALUE__) == LL_EXTI_TRIGGER_RISING_FALLING))
58 |
59 | /**
60 | * @}
61 | */
62 |
63 | /* Private function prototypes -----------------------------------------------*/
64 |
65 | /* Exported functions --------------------------------------------------------*/
66 | /** @addtogroup EXTI_LL_Exported_Functions
67 | * @{
68 | */
69 |
70 | /** @addtogroup EXTI_LL_EF_Init
71 | * @{
72 | */
73 |
74 | /**
75 | * @brief De-initialize the EXTI registers to their default reset values.
76 | * @retval An ErrorStatus enumeration value:
77 | * - SUCCESS: EXTI registers are de-initialized
78 | * - ERROR: not applicable
79 | */
80 | uint32_t LL_EXTI_DeInit(void)
81 | {
82 | /* Interrupt mask register set to default reset values */
83 | LL_EXTI_WriteReg(IMR, 0x00000000U);
84 | /* Event mask register set to default reset values */
85 | LL_EXTI_WriteReg(EMR, 0x00000000U);
86 | /* Rising Trigger selection register set to default reset values */
87 | LL_EXTI_WriteReg(RTSR, 0x00000000U);
88 | /* Falling Trigger selection register set to default reset values */
89 | LL_EXTI_WriteReg(FTSR, 0x00000000U);
90 | /* Software interrupt event register set to default reset values */
91 | LL_EXTI_WriteReg(SWIER, 0x00000000U);
92 | /* Pending register set to default reset values */
93 | LL_EXTI_WriteReg(PR, 0x00FFFFFFU);
94 |
95 | return SUCCESS;
96 | }
97 |
98 | /**
99 | * @brief Initialize the EXTI registers according to the specified parameters in EXTI_InitStruct.
100 | * @param EXTI_InitStruct pointer to a @ref LL_EXTI_InitTypeDef structure.
101 | * @retval An ErrorStatus enumeration value:
102 | * - SUCCESS: EXTI registers are initialized
103 | * - ERROR: not applicable
104 | */
105 | uint32_t LL_EXTI_Init(LL_EXTI_InitTypeDef *EXTI_InitStruct)
106 | {
107 | ErrorStatus status = SUCCESS;
108 | /* Check the parameters */
109 | assert_param(IS_LL_EXTI_LINE_0_31(EXTI_InitStruct->Line_0_31));
110 | assert_param(IS_FUNCTIONAL_STATE(EXTI_InitStruct->LineCommand));
111 | assert_param(IS_LL_EXTI_MODE(EXTI_InitStruct->Mode));
112 |
113 | /* ENABLE LineCommand */
114 | if (EXTI_InitStruct->LineCommand != DISABLE)
115 | {
116 | assert_param(IS_LL_EXTI_TRIGGER(EXTI_InitStruct->Trigger));
117 |
118 | /* Configure EXTI Lines in range from 0 to 31 */
119 | if (EXTI_InitStruct->Line_0_31 != LL_EXTI_LINE_NONE)
120 | {
121 | switch (EXTI_InitStruct->Mode)
122 | {
123 | case LL_EXTI_MODE_IT:
124 | /* First Disable Event on provided Lines */
125 | LL_EXTI_DisableEvent_0_31(EXTI_InitStruct->Line_0_31);
126 | /* Then Enable IT on provided Lines */
127 | LL_EXTI_EnableIT_0_31(EXTI_InitStruct->Line_0_31);
128 | break;
129 | case LL_EXTI_MODE_EVENT:
130 | /* First Disable IT on provided Lines */
131 | LL_EXTI_DisableIT_0_31(EXTI_InitStruct->Line_0_31);
132 | /* Then Enable Event on provided Lines */
133 | LL_EXTI_EnableEvent_0_31(EXTI_InitStruct->Line_0_31);
134 | break;
135 | case LL_EXTI_MODE_IT_EVENT:
136 | /* Directly Enable IT & Event on provided Lines */
137 | LL_EXTI_EnableIT_0_31(EXTI_InitStruct->Line_0_31);
138 | LL_EXTI_EnableEvent_0_31(EXTI_InitStruct->Line_0_31);
139 | break;
140 | default:
141 | status = ERROR;
142 | break;
143 | }
144 | if (EXTI_InitStruct->Trigger != LL_EXTI_TRIGGER_NONE)
145 | {
146 | switch (EXTI_InitStruct->Trigger)
147 | {
148 | case LL_EXTI_TRIGGER_RISING:
149 | /* First Disable Falling Trigger on provided Lines */
150 | LL_EXTI_DisableFallingTrig_0_31(EXTI_InitStruct->Line_0_31);
151 | /* Then Enable Rising Trigger on provided Lines */
152 | LL_EXTI_EnableRisingTrig_0_31(EXTI_InitStruct->Line_0_31);
153 | break;
154 | case LL_EXTI_TRIGGER_FALLING:
155 | /* First Disable Rising Trigger on provided Lines */
156 | LL_EXTI_DisableRisingTrig_0_31(EXTI_InitStruct->Line_0_31);
157 | /* Then Enable Falling Trigger on provided Lines */
158 | LL_EXTI_EnableFallingTrig_0_31(EXTI_InitStruct->Line_0_31);
159 | break;
160 | case LL_EXTI_TRIGGER_RISING_FALLING:
161 | LL_EXTI_EnableRisingTrig_0_31(EXTI_InitStruct->Line_0_31);
162 | LL_EXTI_EnableFallingTrig_0_31(EXTI_InitStruct->Line_0_31);
163 | break;
164 | default:
165 | status = ERROR;
166 | break;
167 | }
168 | }
169 | }
170 | }
171 | /* DISABLE LineCommand */
172 | else
173 | {
174 | /* De-configure EXTI Lines in range from 0 to 31 */
175 | LL_EXTI_DisableIT_0_31(EXTI_InitStruct->Line_0_31);
176 | LL_EXTI_DisableEvent_0_31(EXTI_InitStruct->Line_0_31);
177 | }
178 | return status;
179 | }
180 |
181 | /**
182 | * @brief Set each @ref LL_EXTI_InitTypeDef field to default value.
183 | * @param EXTI_InitStruct Pointer to a @ref LL_EXTI_InitTypeDef structure.
184 | * @retval None
185 | */
186 | void LL_EXTI_StructInit(LL_EXTI_InitTypeDef *EXTI_InitStruct)
187 | {
188 | EXTI_InitStruct->Line_0_31 = LL_EXTI_LINE_NONE;
189 | EXTI_InitStruct->LineCommand = DISABLE;
190 | EXTI_InitStruct->Mode = LL_EXTI_MODE_IT;
191 | EXTI_InitStruct->Trigger = LL_EXTI_TRIGGER_FALLING;
192 | }
193 |
194 | /**
195 | * @}
196 | */
197 |
198 | /**
199 | * @}
200 | */
201 |
202 | /**
203 | * @}
204 | */
205 |
206 | #endif /* defined (EXTI) */
207 |
208 | /**
209 | * @}
210 | */
211 |
212 | #endif /* USE_FULL_LL_DRIVER */
213 |
214 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
215 |
--------------------------------------------------------------------------------
/USB_DEVICE/App/usbd_audio_if.c:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file : usbd_audio_if.c
5 | * @version : v1.0_Cube
6 | * @brief : Generic media access layer.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2022 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under Ultimate Liberty license
14 | * SLA0044, the "License"; You may not use this file except in compliance with
15 | * the License. You may obtain a copy of the License at:
16 | * www.st.com/SLA0044
17 | *
18 | ******************************************************************************
19 | */
20 | /* USER CODE END Header */
21 |
22 | /* Includes ------------------------------------------------------------------*/
23 | #include "usbd_audio_if.h"
24 |
25 | /* USER CODE BEGIN INCLUDE */
26 | void AUDIO_OUT_Start(uint16_t* pBuffer, uint32_t Size);
27 | void AUDIO_OUT_Periodic(uint16_t* pBuffer, uint32_t Size);
28 | void AUDIO_Init(uint32_t AudioFreq, uint32_t Volume, uint32_t options);
29 | /* USER CODE END INCLUDE */
30 |
31 | /* Private typedef -----------------------------------------------------------*/
32 | /* Private define ------------------------------------------------------------*/
33 | /* Private macro -------------------------------------------------------------*/
34 |
35 | /* USER CODE BEGIN PV */
36 | /* Private variables ---------------------------------------------------------*/
37 |
38 | /* USER CODE END PV */
39 |
40 | /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
41 | * @brief Usb device library.
42 | * @{
43 | */
44 |
45 | /** @addtogroup USBD_AUDIO_IF
46 | * @{
47 | */
48 |
49 | /** @defgroup USBD_AUDIO_IF_Private_TypesDefinitions USBD_AUDIO_IF_Private_TypesDefinitions
50 | * @brief Private types.
51 | * @{
52 | */
53 |
54 | /* USER CODE BEGIN PRIVATE_TYPES */
55 |
56 | /* USER CODE END PRIVATE_TYPES */
57 |
58 | /**
59 | * @}
60 | */
61 |
62 | /** @defgroup USBD_AUDIO_IF_Private_Defines USBD_AUDIO_IF_Private_Defines
63 | * @brief Private defines.
64 | * @{
65 | */
66 |
67 | /* USER CODE BEGIN PRIVATE_DEFINES */
68 |
69 | /* USER CODE END PRIVATE_DEFINES */
70 |
71 | /**
72 | * @}
73 | */
74 |
75 | /** @defgroup USBD_AUDIO_IF_Private_Macros USBD_AUDIO_IF_Private_Macros
76 | * @brief Private macros.
77 | * @{
78 | */
79 |
80 | /* USER CODE BEGIN PRIVATE_MACRO */
81 |
82 | /* USER CODE END PRIVATE_MACRO */
83 |
84 | /**
85 | * @}
86 | */
87 |
88 | /** @defgroup USBD_AUDIO_IF_Private_Variables USBD_AUDIO_IF_Private_Variables
89 | * @brief Private variables.
90 | * @{
91 | */
92 |
93 | /* USER CODE BEGIN PRIVATE_VARIABLES */
94 |
95 | /* USER CODE END PRIVATE_VARIABLES */
96 |
97 | /**
98 | * @}
99 | */
100 |
101 | /** @defgroup USBD_AUDIO_IF_Exported_Variables USBD_AUDIO_IF_Exported_Variables
102 | * @brief Public variables.
103 | * @{
104 | */
105 |
106 | extern USBD_HandleTypeDef hUsbDeviceFS;
107 |
108 | /* USER CODE BEGIN EXPORTED_VARIABLES */
109 |
110 | /* USER CODE END EXPORTED_VARIABLES */
111 |
112 | /**
113 | * @}
114 | */
115 |
116 | /** @defgroup USBD_AUDIO_IF_Private_FunctionPrototypes USBD_AUDIO_IF_Private_FunctionPrototypes
117 | * @brief Private functions declaration.
118 | * @{
119 | */
120 |
121 | static int8_t AUDIO_Init_FS(uint32_t AudioFreq, uint32_t Volume, uint32_t options);
122 | static int8_t AUDIO_DeInit_FS(uint32_t options);
123 | static int8_t AUDIO_AudioCmd_FS(uint8_t* pbuf, uint32_t size, uint8_t cmd);
124 | static int8_t AUDIO_VolumeCtl_FS(uint8_t vol);
125 | static int8_t AUDIO_MuteCtl_FS(uint8_t cmd);
126 | static int8_t AUDIO_PeriodicTC_FS(uint8_t *pbuf, uint32_t size, uint8_t cmd);
127 | static int8_t AUDIO_GetState_FS(void);
128 |
129 | /* USER CODE BEGIN PRIVATE_FUNCTIONS_DECLARATION */
130 |
131 | /* USER CODE END PRIVATE_FUNCTIONS_DECLARATION */
132 |
133 | /**
134 | * @}
135 | */
136 |
137 | USBD_AUDIO_ItfTypeDef USBD_AUDIO_fops_FS =
138 | {
139 | AUDIO_Init_FS,
140 | AUDIO_DeInit_FS,
141 | AUDIO_AudioCmd_FS,
142 | AUDIO_VolumeCtl_FS,
143 | AUDIO_MuteCtl_FS,
144 | AUDIO_PeriodicTC_FS,
145 | AUDIO_GetState_FS,
146 | };
147 |
148 | /* Private functions ---------------------------------------------------------*/
149 | /**
150 | * @brief Initializes the AUDIO media low layer over USB FS IP
151 | * @param AudioFreq: Audio frequency used to play the audio stream.
152 | * @param Volume: Initial volume level (from 0 (Mute) to 100 (Max))
153 | * @param options: Reserved for future use
154 | * @retval USBD_OK if all operations are OK else USBD_FAIL
155 | */
156 | static int8_t AUDIO_Init_FS(uint32_t AudioFreq, uint32_t Volume, uint32_t options)
157 | {
158 | /* USER CODE BEGIN 0 */
159 | AUDIO_Init(AudioFreq,Volume,options);
160 | UNUSED(AudioFreq);
161 | UNUSED(Volume);
162 | UNUSED(options);
163 | return (USBD_OK);
164 | /* USER CODE END 0 */
165 | }
166 |
167 | /**
168 | * @brief De-Initializes the AUDIO media low layer
169 | * @param options: Reserved for future use
170 | * @retval USBD_OK if all operations are OK else USBD_FAIL
171 | */
172 | static int8_t AUDIO_DeInit_FS(uint32_t options)
173 | {
174 | /* USER CODE BEGIN 1 */
175 | UNUSED(options);
176 | return (USBD_OK);
177 | /* USER CODE END 1 */
178 | }
179 |
180 | /**
181 | * @brief Handles AUDIO command.
182 | * @param pbuf: Pointer to buffer of data to be sent
183 | * @param size: Number of data to be sent (in bytes)
184 | * @param cmd: Command opcode
185 | * @retval USBD_OK if all operations are OK else USBD_FAIL
186 | */
187 | static int8_t AUDIO_AudioCmd_FS(uint8_t* pbuf, uint32_t size, uint8_t cmd)
188 | {
189 | /* USER CODE BEGIN 2 */
190 | switch(cmd)
191 | {
192 | case AUDIO_CMD_START:
193 | AUDIO_OUT_Start(pbuf,size*2);
194 | break;
195 |
196 | case AUDIO_CMD_PLAY:
197 | break;
198 | }
199 | UNUSED(pbuf);
200 | UNUSED(size);
201 | UNUSED(cmd);
202 | return (USBD_OK);
203 | /* USER CODE END 2 */
204 | }
205 |
206 | /**
207 | * @brief Controls AUDIO Volume.
208 | * @param vol: volume level (0..100)
209 | * @retval USBD_OK if all operations are OK else USBD_FAIL
210 | */
211 | static int8_t AUDIO_VolumeCtl_FS(uint8_t vol)
212 | {
213 | /* USER CODE BEGIN 3 */
214 | UNUSED(vol);
215 | return (USBD_OK);
216 | /* USER CODE END 3 */
217 | }
218 |
219 | /**
220 | * @brief Controls AUDIO Mute.
221 | * @param cmd: command opcode
222 | * @retval USBD_OK if all operations are OK else USBD_FAIL
223 | */
224 | static int8_t AUDIO_MuteCtl_FS(uint8_t cmd)
225 | {
226 | /* USER CODE BEGIN 4 */
227 | UNUSED(cmd);
228 | return (USBD_OK);
229 | /* USER CODE END 4 */
230 | }
231 |
232 | /**
233 | * @brief AUDIO_PeriodicT_FS
234 | * @param cmd: Command opcode
235 | * @retval USBD_OK if all operations are OK else USBD_FAIL
236 | */
237 | static int8_t AUDIO_PeriodicTC_FS(uint8_t *pbuf, uint32_t size, uint8_t cmd)
238 | {
239 | /* USER CODE BEGIN 5 */
240 | AUDIO_OUT_Periodic(pbuf,size);
241 | UNUSED(pbuf);
242 | UNUSED(size);
243 | UNUSED(cmd);
244 | return (USBD_OK);
245 | /* USER CODE END 5 */
246 | }
247 |
248 | /**
249 | * @brief Gets AUDIO State.
250 | * @retval USBD_OK if all operations are OK else USBD_FAIL
251 | */
252 | static int8_t AUDIO_GetState_FS(void)
253 | {
254 | /* USER CODE BEGIN 6 */
255 | return (USBD_OK);
256 | /* USER CODE END 6 */
257 | }
258 |
259 | /**
260 | * @brief Manages the DMA full transfer complete event.
261 | * @retval None
262 | */
263 | void TransferComplete_CallBack_FS(void)
264 | {
265 | /* USER CODE BEGIN 7 */
266 | USBD_AUDIO_Sync(&hUsbDeviceFS, AUDIO_OFFSET_FULL);
267 | /* USER CODE END 7 */
268 | }
269 |
270 | /**
271 | * @brief Manages the DMA Half transfer complete event.
272 | * @retval None
273 | */
274 | void HalfTransfer_CallBack_FS(void)
275 | {
276 | /* USER CODE BEGIN 8 */
277 | USBD_AUDIO_Sync(&hUsbDeviceFS, AUDIO_OFFSET_HALF);
278 | /* USER CODE END 8 */
279 | }
280 |
281 | /* USER CODE BEGIN PRIVATE_FUNCTIONS_IMPLEMENTATION */
282 |
283 | /* USER CODE END PRIVATE_FUNCTIONS_IMPLEMENTATION */
284 |
285 | /**
286 | * @}
287 | */
288 |
289 | /**
290 | * @}
291 | */
292 |
293 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
294 |
--------------------------------------------------------------------------------
/stm32f401ccAudioNative Release.launch:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_def.h
4 | * @author MCD Application Team
5 | * @brief This file contains HAL common defines, enumeration, macros and
6 | * structures definitions.
7 | ******************************************************************************
8 | * @attention
9 | *
10 | * © Copyright (c) 2017 STMicroelectronics.
11 | * All rights reserved.
12 | *
13 | * This software component is licensed by ST under BSD 3-Clause license,
14 | * the "License"; You may not use this file except in compliance with the
15 | * License. You may obtain a copy of the License at:
16 | * opensource.org/licenses/BSD-3-Clause
17 | *
18 | ******************************************************************************
19 | */
20 |
21 | /* Define to prevent recursive inclusion -------------------------------------*/
22 | #ifndef __STM32F4xx_HAL_DEF
23 | #define __STM32F4xx_HAL_DEF
24 |
25 | #ifdef __cplusplus
26 | extern "C" {
27 | #endif
28 |
29 | /* Includes ------------------------------------------------------------------*/
30 | #include "stm32f4xx.h"
31 | #include "Legacy/stm32_hal_legacy.h"
32 | #include
33 |
34 | /* Exported types ------------------------------------------------------------*/
35 |
36 | /**
37 | * @brief HAL Status structures definition
38 | */
39 | typedef enum
40 | {
41 | HAL_OK = 0x00U,
42 | HAL_ERROR = 0x01U,
43 | HAL_BUSY = 0x02U,
44 | HAL_TIMEOUT = 0x03U
45 | } HAL_StatusTypeDef;
46 |
47 | /**
48 | * @brief HAL Lock structures definition
49 | */
50 | typedef enum
51 | {
52 | HAL_UNLOCKED = 0x00U,
53 | HAL_LOCKED = 0x01U
54 | } HAL_LockTypeDef;
55 |
56 | /* Exported macro ------------------------------------------------------------*/
57 |
58 | #define UNUSED(X) (void)X /* To avoid gcc/g++ warnings */
59 |
60 | #define HAL_MAX_DELAY 0xFFFFFFFFU
61 |
62 | #define HAL_IS_BIT_SET(REG, BIT) (((REG) & (BIT)) == (BIT))
63 | #define HAL_IS_BIT_CLR(REG, BIT) (((REG) & (BIT)) == 0U)
64 |
65 | #define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
66 | do{ \
67 | (__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
68 | (__DMA_HANDLE__).Parent = (__HANDLE__); \
69 | } while(0U)
70 |
71 | /** @brief Reset the Handle's State field.
72 | * @param __HANDLE__ specifies the Peripheral Handle.
73 | * @note This macro can be used for the following purpose:
74 | * - When the Handle is declared as local variable; before passing it as parameter
75 | * to HAL_PPP_Init() for the first time, it is mandatory to use this macro
76 | * to set to 0 the Handle's "State" field.
77 | * Otherwise, "State" field may have any random value and the first time the function
78 | * HAL_PPP_Init() is called, the low level hardware initialization will be missed
79 | * (i.e. HAL_PPP_MspInit() will not be executed).
80 | * - When there is a need to reconfigure the low level hardware: instead of calling
81 | * HAL_PPP_DeInit() then HAL_PPP_Init(), user can make a call to this macro then HAL_PPP_Init().
82 | * In this later function, when the Handle's "State" field is set to 0, it will execute the function
83 | * HAL_PPP_MspInit() which will reconfigure the low level hardware.
84 | * @retval None
85 | */
86 | #define __HAL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = 0U)
87 |
88 | #if (USE_RTOS == 1U)
89 | /* Reserved for future use */
90 | #error "USE_RTOS should be 0 in the current HAL release"
91 | #else
92 | #define __HAL_LOCK(__HANDLE__) \
93 | do{ \
94 | if((__HANDLE__)->Lock == HAL_LOCKED) \
95 | { \
96 | return HAL_BUSY; \
97 | } \
98 | else \
99 | { \
100 | (__HANDLE__)->Lock = HAL_LOCKED; \
101 | } \
102 | }while (0U)
103 |
104 | #define __HAL_UNLOCK(__HANDLE__) \
105 | do{ \
106 | (__HANDLE__)->Lock = HAL_UNLOCKED; \
107 | }while (0U)
108 | #endif /* USE_RTOS */
109 |
110 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
111 | #ifndef __weak
112 | #define __weak __attribute__((weak))
113 | #endif
114 | #ifndef __packed
115 | #define __packed __attribute__((packed))
116 | #endif
117 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
118 | #ifndef __weak
119 | #define __weak __attribute__((weak))
120 | #endif /* __weak */
121 | #ifndef __packed
122 | #define __packed __attribute__((__packed__))
123 | #endif /* __packed */
124 | #endif /* __GNUC__ */
125 |
126 |
127 | /* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
128 | #if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler V6 */
129 | #ifndef __ALIGN_BEGIN
130 | #define __ALIGN_BEGIN
131 | #endif
132 | #ifndef __ALIGN_END
133 | #define __ALIGN_END __attribute__ ((aligned (4)))
134 | #endif
135 | #elif defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
136 | #ifndef __ALIGN_END
137 | #define __ALIGN_END __attribute__ ((aligned (4)))
138 | #endif /* __ALIGN_END */
139 | #ifndef __ALIGN_BEGIN
140 | #define __ALIGN_BEGIN
141 | #endif /* __ALIGN_BEGIN */
142 | #else
143 | #ifndef __ALIGN_END
144 | #define __ALIGN_END
145 | #endif /* __ALIGN_END */
146 | #ifndef __ALIGN_BEGIN
147 | #if defined (__CC_ARM) /* ARM Compiler V5*/
148 | #define __ALIGN_BEGIN __align(4)
149 | #elif defined (__ICCARM__) /* IAR Compiler */
150 | #define __ALIGN_BEGIN
151 | #endif /* __CC_ARM */
152 | #endif /* __ALIGN_BEGIN */
153 | #endif /* __GNUC__ */
154 |
155 |
156 | /**
157 | * @brief __RAM_FUNC definition
158 | */
159 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
160 | /* ARM Compiler V4/V5 and V6
161 | --------------------------
162 | RAM functions are defined using the toolchain options.
163 | Functions that are executed in RAM should reside in a separate source module.
164 | Using the 'Options for File' dialog you can simply change the 'Code / Const'
165 | area of a module to a memory space in physical RAM.
166 | Available memory areas are declared in the 'Target' tab of the 'Options for Target'
167 | dialog.
168 | */
169 | #define __RAM_FUNC
170 |
171 | #elif defined ( __ICCARM__ )
172 | /* ICCARM Compiler
173 | ---------------
174 | RAM functions are defined using a specific toolchain keyword "__ramfunc".
175 | */
176 | #define __RAM_FUNC __ramfunc
177 |
178 | #elif defined ( __GNUC__ )
179 | /* GNU Compiler
180 | ------------
181 | RAM functions are defined using a specific toolchain attribute
182 | "__attribute__((section(".RamFunc")))".
183 | */
184 | #define __RAM_FUNC __attribute__((section(".RamFunc")))
185 |
186 | #endif
187 |
188 | /**
189 | * @brief __NOINLINE definition
190 | */
191 | #if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )
192 | /* ARM V4/V5 and V6 & GNU Compiler
193 | -------------------------------
194 | */
195 | #define __NOINLINE __attribute__ ( (noinline) )
196 |
197 | #elif defined ( __ICCARM__ )
198 | /* ICCARM Compiler
199 | ---------------
200 | */
201 | #define __NOINLINE _Pragma("optimize = no_inline")
202 |
203 | #endif
204 |
205 | #ifdef __cplusplus
206 | }
207 | #endif
208 |
209 | #endif /* ___STM32F4xx_HAL_DEF */
210 |
211 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
212 |
--------------------------------------------------------------------------------
/stm32f401ccAudioNative Debug.launch:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_i2s_ex.h:
--------------------------------------------------------------------------------
1 | /**
2 | ******************************************************************************
3 | * @file stm32f4xx_hal_i2s_ex.h
4 | * @author MCD Application Team
5 | * @brief Header file of I2S HAL module.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2016 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under BSD 3-Clause license,
13 | * the "License"; You may not use this file except in compliance with the
14 | * License. You may obtain a copy of the License at:
15 | * opensource.org/licenses/BSD-3-Clause
16 | *
17 | ******************************************************************************
18 | */
19 |
20 | /* Define to prevent recursive inclusion -------------------------------------*/
21 | #ifndef STM32F4xx_HAL_I2S_EX_H
22 | #define STM32F4xx_HAL_I2S_EX_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif
27 |
28 | /* Includes ------------------------------------------------------------------*/
29 | #include "stm32f4xx_hal_def.h"
30 |
31 | /** @addtogroup STM32F4xx_HAL_Driver
32 | * @{
33 | */
34 | #if defined(SPI_I2S_FULLDUPLEX_SUPPORT)
35 | /** @addtogroup I2SEx I2SEx
36 | * @{
37 | */
38 |
39 | /* Exported types ------------------------------------------------------------*/
40 | /* Exported constants --------------------------------------------------------*/
41 | /* Exported macros -----------------------------------------------------------*/
42 | /** @defgroup I2SEx_Exported_Macros I2S Extended Exported Macros
43 | * @{
44 | */
45 |
46 | #define I2SxEXT(__INSTANCE__) ((__INSTANCE__) == (SPI2)? (SPI_TypeDef *)(I2S2ext_BASE): (SPI_TypeDef *)(I2S3ext_BASE))
47 |
48 | /** @brief Enable or disable the specified I2SExt peripheral.
49 | * @param __HANDLE__ specifies the I2S Handle.
50 | * @retval None
51 | */
52 | #define __HAL_I2SEXT_ENABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR |= SPI_I2SCFGR_I2SE)
53 | #define __HAL_I2SEXT_DISABLE(__HANDLE__) (I2SxEXT((__HANDLE__)->Instance)->I2SCFGR &= ~SPI_I2SCFGR_I2SE)
54 |
55 | /** @brief Enable or disable the specified I2SExt interrupts.
56 | * @param __HANDLE__ specifies the I2S Handle.
57 | * @param __INTERRUPT__ specifies the interrupt source to enable or disable.
58 | * This parameter can be one of the following values:
59 | * @arg I2S_IT_TXE: Tx buffer empty interrupt enable
60 | * @arg I2S_IT_RXNE: RX buffer not empty interrupt enable
61 | * @arg I2S_IT_ERR: Error interrupt enable
62 | * @retval None
63 | */
64 | #define __HAL_I2SEXT_ENABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 |= (__INTERRUPT__))
65 | #define __HAL_I2SEXT_DISABLE_IT(__HANDLE__, __INTERRUPT__) (I2SxEXT((__HANDLE__)->Instance)->CR2 &= ~(__INTERRUPT__))
66 |
67 | /** @brief Checks if the specified I2SExt interrupt source is enabled or disabled.
68 | * @param __HANDLE__ specifies the I2S Handle.
69 | * This parameter can be I2S where x: 1, 2, or 3 to select the I2S peripheral.
70 | * @param __INTERRUPT__ specifies the I2S interrupt source to check.
71 | * This parameter can be one of the following values:
72 | * @arg I2S_IT_TXE: Tx buffer empty interrupt enable
73 | * @arg I2S_IT_RXNE: RX buffer not empty interrupt enable
74 | * @arg I2S_IT_ERR: Error interrupt enable
75 | * @retval The new state of __IT__ (TRUE or FALSE).
76 | */
77 | #define __HAL_I2SEXT_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((I2SxEXT((__HANDLE__)->Instance)->CR2\
78 | & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET)
79 |
80 | /** @brief Checks whether the specified I2SExt flag is set or not.
81 | * @param __HANDLE__ specifies the I2S Handle.
82 | * @param __FLAG__ specifies the flag to check.
83 | * This parameter can be one of the following values:
84 | * @arg I2S_FLAG_RXNE: Receive buffer not empty flag
85 | * @arg I2S_FLAG_TXE: Transmit buffer empty flag
86 | * @arg I2S_FLAG_UDR: Underrun flag
87 | * @arg I2S_FLAG_OVR: Overrun flag
88 | * @arg I2S_FLAG_FRE: Frame error flag
89 | * @arg I2S_FLAG_CHSIDE: Channel Side flag
90 | * @arg I2S_FLAG_BSY: Busy flag
91 | * @retval The new state of __FLAG__ (TRUE or FALSE).
92 | */
93 | #define __HAL_I2SEXT_GET_FLAG(__HANDLE__, __FLAG__) (((I2SxEXT((__HANDLE__)->Instance)->SR) & (__FLAG__)) == (__FLAG__))
94 |
95 | /** @brief Clears the I2SExt OVR pending flag.
96 | * @param __HANDLE__ specifies the I2S Handle.
97 | * @retval None
98 | */
99 | #define __HAL_I2SEXT_CLEAR_OVRFLAG(__HANDLE__) do{ \
100 | __IO uint32_t tmpreg_ovr = 0x00U; \
101 | tmpreg_ovr = I2SxEXT((__HANDLE__)->Instance)->DR;\
102 | tmpreg_ovr = I2SxEXT((__HANDLE__)->Instance)->SR;\
103 | UNUSED(tmpreg_ovr); \
104 | }while(0U)
105 | /** @brief Clears the I2SExt UDR pending flag.
106 | * @param __HANDLE__ specifies the I2S Handle.
107 | * @retval None
108 | */
109 | #define __HAL_I2SEXT_CLEAR_UDRFLAG(__HANDLE__) do{ \
110 | __IO uint32_t tmpreg_udr = 0x00U; \
111 | tmpreg_udr = I2SxEXT((__HANDLE__)->Instance)->SR;\
112 | UNUSED(tmpreg_udr); \
113 | }while(0U)
114 | /** @brief Flush the I2S and I2SExt DR Registers.
115 | * @param __HANDLE__ specifies the I2S Handle.
116 | * @retval None
117 | */
118 | #define __HAL_I2SEXT_FLUSH_RX_DR(__HANDLE__) do{ \
119 | __IO uint32_t tmpreg_dr = 0x00U; \
120 | tmpreg_dr = I2SxEXT((__HANDLE__)->Instance)->DR; \
121 | tmpreg_dr = ((__HANDLE__)->Instance->DR); \
122 | UNUSED(tmpreg_dr); \
123 | }while(0U)
124 | /**
125 | * @}
126 | */
127 |
128 | /* Exported functions --------------------------------------------------------*/
129 | /** @addtogroup I2SEx_Exported_Functions I2S Extended Exported Functions
130 | * @{
131 | */
132 |
133 | /** @addtogroup I2SEx_Exported_Functions_Group1 I2S Extended IO operation functions
134 | * @{
135 | */
136 |
137 | /* Extended features functions *************************************************/
138 | /* Blocking mode: Polling */
139 | HAL_StatusTypeDef HAL_I2SEx_TransmitReceive(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData,
140 | uint16_t Size, uint32_t Timeout);
141 | /* Non-Blocking mode: Interrupt */
142 | HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_IT(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData,
143 | uint16_t Size);
144 | /* Non-Blocking mode: DMA */
145 | HAL_StatusTypeDef HAL_I2SEx_TransmitReceive_DMA(I2S_HandleTypeDef *hi2s, uint16_t *pTxData, uint16_t *pRxData,
146 | uint16_t Size);
147 | /* I2S IRQHandler and Callbacks used in non blocking modes (Interrupt and DMA) */
148 | void HAL_I2SEx_FullDuplex_IRQHandler(I2S_HandleTypeDef *hi2s);
149 | void HAL_I2SEx_TxRxHalfCpltCallback(I2S_HandleTypeDef *hi2s);
150 | void HAL_I2SEx_TxRxCpltCallback(I2S_HandleTypeDef *hi2s);
151 | /**
152 | * @}
153 | */
154 |
155 | /**
156 | * @}
157 | */
158 | /* Private types -------------------------------------------------------------*/
159 | /* Private variables ---------------------------------------------------------*/
160 | /* Private constants ---------------------------------------------------------*/
161 | /* Private macros ------------------------------------------------------------*/
162 |
163 | /**
164 | * @}
165 | */
166 |
167 | /* Private functions ---------------------------------------------------------*/
168 |
169 | /**
170 | * @}
171 | */
172 |
173 | #endif /* SPI_I2S_FULLDUPLEX_SUPPORT */
174 | /**
175 | * @}
176 | */
177 |
178 | #ifdef __cplusplus
179 | }
180 | #endif
181 |
182 |
183 | #endif /* STM32F4xx_HAL_I2S_EX_H */
184 |
185 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
186 |
--------------------------------------------------------------------------------
/Core/Src/stm32f4xx_it.c:
--------------------------------------------------------------------------------
1 | /* USER CODE BEGIN Header */
2 | /**
3 | ******************************************************************************
4 | * @file stm32f4xx_it.c
5 | * @brief Interrupt Service Routines.
6 | ******************************************************************************
7 | * @attention
8 | *
9 | * © Copyright (c) 2022 STMicroelectronics.
10 | * All rights reserved.
11 | *
12 | * This software component is licensed by ST under Ultimate Liberty license
13 | * SLA0044, the "License"; You may not use this file except in compliance with
14 | * the License. You may obtain a copy of the License at:
15 | * www.st.com/SLA0044
16 | *
17 | ******************************************************************************
18 | */
19 | /* USER CODE END Header */
20 |
21 | /* Includes ------------------------------------------------------------------*/
22 | #include "main.h"
23 | #include "stm32f4xx_it.h"
24 | /* Private includes ----------------------------------------------------------*/
25 | /* USER CODE BEGIN Includes */
26 | /* USER CODE END Includes */
27 |
28 | /* Private typedef -----------------------------------------------------------*/
29 | /* USER CODE BEGIN TD */
30 |
31 | /* USER CODE END TD */
32 |
33 | /* Private define ------------------------------------------------------------*/
34 | /* USER CODE BEGIN PD */
35 |
36 | /* USER CODE END PD */
37 |
38 | /* Private macro -------------------------------------------------------------*/
39 | /* USER CODE BEGIN PM */
40 |
41 | /* USER CODE END PM */
42 |
43 | /* Private variables ---------------------------------------------------------*/
44 | /* USER CODE BEGIN PV */
45 |
46 | /* USER CODE END PV */
47 |
48 | /* Private function prototypes -----------------------------------------------*/
49 | /* USER CODE BEGIN PFP */
50 |
51 | /* USER CODE END PFP */
52 |
53 | /* Private user code ---------------------------------------------------------*/
54 | /* USER CODE BEGIN 0 */
55 |
56 | /* USER CODE END 0 */
57 |
58 | /* External variables --------------------------------------------------------*/
59 | extern PCD_HandleTypeDef hpcd_USB_OTG_FS;
60 | extern DMA_HandleTypeDef hdma_spi2_tx;
61 | extern DMA_HandleTypeDef hdma_spi3_tx;
62 | /* USER CODE BEGIN EV */
63 |
64 | /* USER CODE END EV */
65 |
66 | /******************************************************************************/
67 | /* Cortex-M4 Processor Interruption and Exception Handlers */
68 | /******************************************************************************/
69 | /**
70 | * @brief This function handles Non maskable interrupt.
71 | */
72 | void NMI_Handler(void)
73 | {
74 | /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
75 |
76 | /* USER CODE END NonMaskableInt_IRQn 0 */
77 | /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
78 | while (1)
79 | {
80 | }
81 | /* USER CODE END NonMaskableInt_IRQn 1 */
82 | }
83 |
84 | /**
85 | * @brief This function handles Hard fault interrupt.
86 | */
87 | void HardFault_Handler(void)
88 | {
89 | /* USER CODE BEGIN HardFault_IRQn 0 */
90 |
91 | /* USER CODE END HardFault_IRQn 0 */
92 | while (1)
93 | {
94 | /* USER CODE BEGIN W1_HardFault_IRQn 0 */
95 | /* USER CODE END W1_HardFault_IRQn 0 */
96 | }
97 | }
98 |
99 | /**
100 | * @brief This function handles Memory management fault.
101 | */
102 | void MemManage_Handler(void)
103 | {
104 | /* USER CODE BEGIN MemoryManagement_IRQn 0 */
105 |
106 | /* USER CODE END MemoryManagement_IRQn 0 */
107 | while (1)
108 | {
109 | /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
110 | /* USER CODE END W1_MemoryManagement_IRQn 0 */
111 | }
112 | }
113 |
114 | /**
115 | * @brief This function handles Pre-fetch fault, memory access fault.
116 | */
117 | void BusFault_Handler(void)
118 | {
119 | /* USER CODE BEGIN BusFault_IRQn 0 */
120 |
121 | /* USER CODE END BusFault_IRQn 0 */
122 | while (1)
123 | {
124 | /* USER CODE BEGIN W1_BusFault_IRQn 0 */
125 | /* USER CODE END W1_BusFault_IRQn 0 */
126 | }
127 | }
128 |
129 | /**
130 | * @brief This function handles Undefined instruction or illegal state.
131 | */
132 | void UsageFault_Handler(void)
133 | {
134 | /* USER CODE BEGIN UsageFault_IRQn 0 */
135 |
136 | /* USER CODE END UsageFault_IRQn 0 */
137 | while (1)
138 | {
139 | /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
140 | /* USER CODE END W1_UsageFault_IRQn 0 */
141 | }
142 | }
143 |
144 | /**
145 | * @brief This function handles System service call via SWI instruction.
146 | */
147 | void SVC_Handler(void)
148 | {
149 | /* USER CODE BEGIN SVCall_IRQn 0 */
150 |
151 | /* USER CODE END SVCall_IRQn 0 */
152 | /* USER CODE BEGIN SVCall_IRQn 1 */
153 |
154 | /* USER CODE END SVCall_IRQn 1 */
155 | }
156 |
157 | /**
158 | * @brief This function handles Debug monitor.
159 | */
160 | void DebugMon_Handler(void)
161 | {
162 | /* USER CODE BEGIN DebugMonitor_IRQn 0 */
163 |
164 | /* USER CODE END DebugMonitor_IRQn 0 */
165 | /* USER CODE BEGIN DebugMonitor_IRQn 1 */
166 |
167 | /* USER CODE END DebugMonitor_IRQn 1 */
168 | }
169 |
170 | /**
171 | * @brief This function handles Pendable request for system service.
172 | */
173 | void PendSV_Handler(void)
174 | {
175 | /* USER CODE BEGIN PendSV_IRQn 0 */
176 |
177 | /* USER CODE END PendSV_IRQn 0 */
178 | /* USER CODE BEGIN PendSV_IRQn 1 */
179 |
180 | /* USER CODE END PendSV_IRQn 1 */
181 | }
182 |
183 | /**
184 | * @brief This function handles System tick timer.
185 | */
186 | void SysTick_Handler(void)
187 | {
188 | /* USER CODE BEGIN SysTick_IRQn 0 */
189 |
190 | /* USER CODE END SysTick_IRQn 0 */
191 | HAL_IncTick();
192 | /* USER CODE BEGIN SysTick_IRQn 1 */
193 |
194 | /* USER CODE END SysTick_IRQn 1 */
195 | }
196 |
197 | /******************************************************************************/
198 | /* STM32F4xx Peripheral Interrupt Handlers */
199 | /* Add here the Interrupt Handlers for the used peripherals. */
200 | /* For the available peripheral interrupt handler names, */
201 | /* please refer to the startup file (startup_stm32f4xx.s). */
202 | /******************************************************************************/
203 |
204 | /**
205 | * @brief This function handles DMA1 stream4 global interrupt.
206 | */
207 | void DMA1_Stream4_IRQHandler(void)
208 | {
209 | /* USER CODE BEGIN DMA1_Stream4_IRQn 0 */
210 |
211 | /* USER CODE END DMA1_Stream4_IRQn 0 */
212 | HAL_DMA_IRQHandler(&hdma_spi2_tx);
213 | /* USER CODE BEGIN DMA1_Stream4_IRQn 1 */
214 |
215 | /* USER CODE END DMA1_Stream4_IRQn 1 */
216 | }
217 |
218 | /**
219 | * @brief This function handles DMA1 stream5 global interrupt.
220 | */
221 | void DMA1_Stream5_IRQHandler(void)
222 | {
223 | /* USER CODE BEGIN DMA1_Stream5_IRQn 0 */
224 |
225 | /* USER CODE END DMA1_Stream5_IRQn 0 */
226 | HAL_DMA_IRQHandler(&hdma_spi3_tx);
227 | /* USER CODE BEGIN DMA1_Stream5_IRQn 1 */
228 |
229 | /* USER CODE END DMA1_Stream5_IRQn 1 */
230 | }
231 |
232 | /**
233 | * @brief This function handles DMA2 stream1 global interrupt.
234 | */
235 | void DMA2_Stream1_IRQHandler(void)
236 | {
237 | /* USER CODE BEGIN DMA2_Stream1_IRQn 0 */
238 | if(LL_DMA_IsActiveFlag_TC1(DMA2) == 1)
239 | {
240 | LL_DMA_ClearFlag_TC1(DMA2);
241 | TIM1_TC1();
242 | }
243 | if(LL_DMA_IsActiveFlag_HT1(DMA2) == 1)
244 | {
245 | LL_DMA_ClearFlag_HT1(DMA2);
246 | TIM1_HT1();
247 | }
248 | if(LL_DMA_IsActiveFlag_TE1(DMA2) == 1)
249 | {
250 | LL_DMA_ClearFlag_TE1(DMA2);
251 | TIM1_TE1();
252 | }
253 |
254 | /* USER CODE END DMA2_Stream1_IRQn 0 */
255 |
256 | /* USER CODE BEGIN DMA2_Stream1_IRQn 1 */
257 |
258 | /* USER CODE END DMA2_Stream1_IRQn 1 */
259 | }
260 |
261 | /**
262 | * @brief This function handles DMA2 stream2 global interrupt.
263 | */
264 | void DMA2_Stream2_IRQHandler(void)
265 | {
266 | /* USER CODE BEGIN DMA2_Stream2_IRQn 0 */
267 | if(LL_DMA_IsActiveFlag_TC2(DMA2) == 1)
268 | {
269 | LL_DMA_ClearFlag_TC2(DMA2);
270 | TIM1_TC2();
271 | }
272 | if(LL_DMA_IsActiveFlag_HT2(DMA2) == 1)
273 | {
274 | LL_DMA_ClearFlag_HT2(DMA2);
275 | TIM1_HT2();
276 | }
277 | if(LL_DMA_IsActiveFlag_TE2(DMA2) == 1)
278 | {
279 | LL_DMA_ClearFlag_TE2(DMA2);
280 | TIM1_TE2();
281 | }
282 |
283 | /* USER CODE END DMA2_Stream2_IRQn 0 */
284 |
285 | /* USER CODE BEGIN DMA2_Stream2_IRQn 1 */
286 |
287 | /* USER CODE END DMA2_Stream2_IRQn 1 */
288 | }
289 |
290 | /**
291 | * @brief This function handles USB On The Go FS global interrupt.
292 | */
293 | void OTG_FS_IRQHandler(void)
294 | {
295 | /* USER CODE BEGIN OTG_FS_IRQn 0 */
296 |
297 | /* USER CODE END OTG_FS_IRQn 0 */
298 | HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS);
299 | /* USER CODE BEGIN OTG_FS_IRQn 1 */
300 |
301 | /* USER CODE END OTG_FS_IRQn 1 */
302 | }
303 |
304 | /* USER CODE BEGIN 1 */
305 |
306 | /* USER CODE END 1 */
307 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
308 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Device/ST/STM32F4xx/License.md:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10 |
11 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12 |
13 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14 |
15 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16 |
17 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18 |
19 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20 |
21 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22 |
23 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24 |
25 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26 |
27 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28 |
29 | 2. Grant of Copyright License.
30 |
31 | Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32 |
33 | 3. Grant of Patent License.
34 |
35 | Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
36 |
37 | 4. Redistribution.
38 |
39 | You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
40 | 1.You must give any other recipients of the Work or Derivative Works a copy of this License; and
41 | 2.You must cause any modified files to carry prominent notices stating that You changed the files; and
42 | 3.You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
43 | 4.If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
44 |
45 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46 |
47 | 5. Submission of Contributions.
48 |
49 | Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
50 |
51 | 6. Trademarks.
52 |
53 | This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
54 |
55 | 7. Disclaimer of Warranty.
56 |
57 | Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
58 |
59 | 8. Limitation of Liability.
60 |
61 | In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
62 |
63 | 9. Accepting Warranty or Additional Liability.
64 |
65 | While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
66 |
67 | END OF TERMS AND CONDITIONS
68 |
69 | APPENDIX:
70 |
71 | Copyright [2019] [STMicroelectronics]
72 |
73 | Licensed under the Apache License, Version 2.0 (the "License");
74 | you may not use this file except in compliance with the License.
75 | You may obtain a copy of the License at
76 |
77 | http://www.apache.org/licenses/LICENSE-2.0
78 |
79 | Unless required by applicable law or agreed to in writing, software
80 | distributed under the License is distributed on an "AS IS" BASIS,
81 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
82 | See the License for the specific language governing permissions and
83 | limitations under the License.
84 |
--------------------------------------------------------------------------------
/Drivers/CMSIS/Include/cmsis_compiler.h:
--------------------------------------------------------------------------------
1 | /**************************************************************************//**
2 | * @file cmsis_compiler.h
3 | * @brief CMSIS compiler generic header file
4 | * @version V5.0.4
5 | * @date 10. January 2018
6 | ******************************************************************************/
7 | /*
8 | * Copyright (c) 2009-2018 Arm Limited. All rights reserved.
9 | *
10 | * SPDX-License-Identifier: Apache-2.0
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the License); you may
13 | * not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
20 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | */
24 |
25 | #ifndef __CMSIS_COMPILER_H
26 | #define __CMSIS_COMPILER_H
27 |
28 | #include
29 |
30 | /*
31 | * Arm Compiler 4/5
32 | */
33 | #if defined ( __CC_ARM )
34 | #include "cmsis_armcc.h"
35 |
36 |
37 | /*
38 | * Arm Compiler 6 (armclang)
39 | */
40 | #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
41 | #include "cmsis_armclang.h"
42 |
43 |
44 | /*
45 | * GNU Compiler
46 | */
47 | #elif defined ( __GNUC__ )
48 | #include "cmsis_gcc.h"
49 |
50 |
51 | /*
52 | * IAR Compiler
53 | */
54 | #elif defined ( __ICCARM__ )
55 | #include
56 |
57 |
58 | /*
59 | * TI Arm Compiler
60 | */
61 | #elif defined ( __TI_ARM__ )
62 | #include
63 |
64 | #ifndef __ASM
65 | #define __ASM __asm
66 | #endif
67 | #ifndef __INLINE
68 | #define __INLINE inline
69 | #endif
70 | #ifndef __STATIC_INLINE
71 | #define __STATIC_INLINE static inline
72 | #endif
73 | #ifndef __STATIC_FORCEINLINE
74 | #define __STATIC_FORCEINLINE __STATIC_INLINE
75 | #endif
76 | #ifndef __NO_RETURN
77 | #define __NO_RETURN __attribute__((noreturn))
78 | #endif
79 | #ifndef __USED
80 | #define __USED __attribute__((used))
81 | #endif
82 | #ifndef __WEAK
83 | #define __WEAK __attribute__((weak))
84 | #endif
85 | #ifndef __PACKED
86 | #define __PACKED __attribute__((packed))
87 | #endif
88 | #ifndef __PACKED_STRUCT
89 | #define __PACKED_STRUCT struct __attribute__((packed))
90 | #endif
91 | #ifndef __PACKED_UNION
92 | #define __PACKED_UNION union __attribute__((packed))
93 | #endif
94 | #ifndef __UNALIGNED_UINT32 /* deprecated */
95 | struct __attribute__((packed)) T_UINT32 { uint32_t v; };
96 | #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
97 | #endif
98 | #ifndef __UNALIGNED_UINT16_WRITE
99 | __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
100 | #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
101 | #endif
102 | #ifndef __UNALIGNED_UINT16_READ
103 | __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
104 | #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
105 | #endif
106 | #ifndef __UNALIGNED_UINT32_WRITE
107 | __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
108 | #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
109 | #endif
110 | #ifndef __UNALIGNED_UINT32_READ
111 | __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
112 | #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
113 | #endif
114 | #ifndef __ALIGNED
115 | #define __ALIGNED(x) __attribute__((aligned(x)))
116 | #endif
117 | #ifndef __RESTRICT
118 | #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
119 | #define __RESTRICT
120 | #endif
121 |
122 |
123 | /*
124 | * TASKING Compiler
125 | */
126 | #elif defined ( __TASKING__ )
127 | /*
128 | * The CMSIS functions have been implemented as intrinsics in the compiler.
129 | * Please use "carm -?i" to get an up to date list of all intrinsics,
130 | * Including the CMSIS ones.
131 | */
132 |
133 | #ifndef __ASM
134 | #define __ASM __asm
135 | #endif
136 | #ifndef __INLINE
137 | #define __INLINE inline
138 | #endif
139 | #ifndef __STATIC_INLINE
140 | #define __STATIC_INLINE static inline
141 | #endif
142 | #ifndef __STATIC_FORCEINLINE
143 | #define __STATIC_FORCEINLINE __STATIC_INLINE
144 | #endif
145 | #ifndef __NO_RETURN
146 | #define __NO_RETURN __attribute__((noreturn))
147 | #endif
148 | #ifndef __USED
149 | #define __USED __attribute__((used))
150 | #endif
151 | #ifndef __WEAK
152 | #define __WEAK __attribute__((weak))
153 | #endif
154 | #ifndef __PACKED
155 | #define __PACKED __packed__
156 | #endif
157 | #ifndef __PACKED_STRUCT
158 | #define __PACKED_STRUCT struct __packed__
159 | #endif
160 | #ifndef __PACKED_UNION
161 | #define __PACKED_UNION union __packed__
162 | #endif
163 | #ifndef __UNALIGNED_UINT32 /* deprecated */
164 | struct __packed__ T_UINT32 { uint32_t v; };
165 | #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
166 | #endif
167 | #ifndef __UNALIGNED_UINT16_WRITE
168 | __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
169 | #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
170 | #endif
171 | #ifndef __UNALIGNED_UINT16_READ
172 | __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
173 | #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
174 | #endif
175 | #ifndef __UNALIGNED_UINT32_WRITE
176 | __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
177 | #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
178 | #endif
179 | #ifndef __UNALIGNED_UINT32_READ
180 | __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
181 | #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
182 | #endif
183 | #ifndef __ALIGNED
184 | #define __ALIGNED(x) __align(x)
185 | #endif
186 | #ifndef __RESTRICT
187 | #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
188 | #define __RESTRICT
189 | #endif
190 |
191 |
192 | /*
193 | * COSMIC Compiler
194 | */
195 | #elif defined ( __CSMC__ )
196 | #include
197 |
198 | #ifndef __ASM
199 | #define __ASM _asm
200 | #endif
201 | #ifndef __INLINE
202 | #define __INLINE inline
203 | #endif
204 | #ifndef __STATIC_INLINE
205 | #define __STATIC_INLINE static inline
206 | #endif
207 | #ifndef __STATIC_FORCEINLINE
208 | #define __STATIC_FORCEINLINE __STATIC_INLINE
209 | #endif
210 | #ifndef __NO_RETURN
211 | // NO RETURN is automatically detected hence no warning here
212 | #define __NO_RETURN
213 | #endif
214 | #ifndef __USED
215 | #warning No compiler specific solution for __USED. __USED is ignored.
216 | #define __USED
217 | #endif
218 | #ifndef __WEAK
219 | #define __WEAK __weak
220 | #endif
221 | #ifndef __PACKED
222 | #define __PACKED @packed
223 | #endif
224 | #ifndef __PACKED_STRUCT
225 | #define __PACKED_STRUCT @packed struct
226 | #endif
227 | #ifndef __PACKED_UNION
228 | #define __PACKED_UNION @packed union
229 | #endif
230 | #ifndef __UNALIGNED_UINT32 /* deprecated */
231 | @packed struct T_UINT32 { uint32_t v; };
232 | #define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
233 | #endif
234 | #ifndef __UNALIGNED_UINT16_WRITE
235 | __PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
236 | #define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
237 | #endif
238 | #ifndef __UNALIGNED_UINT16_READ
239 | __PACKED_STRUCT T_UINT16_READ { uint16_t v; };
240 | #define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
241 | #endif
242 | #ifndef __UNALIGNED_UINT32_WRITE
243 | __PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
244 | #define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
245 | #endif
246 | #ifndef __UNALIGNED_UINT32_READ
247 | __PACKED_STRUCT T_UINT32_READ { uint32_t v; };
248 | #define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
249 | #endif
250 | #ifndef __ALIGNED
251 | #warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
252 | #define __ALIGNED(x)
253 | #endif
254 | #ifndef __RESTRICT
255 | #warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
256 | #define __RESTRICT
257 | #endif
258 |
259 |
260 | #else
261 | #error Unknown compiler.
262 | #endif
263 |
264 |
265 | #endif /* __CMSIS_COMPILER_H */
266 |
267 |
--------------------------------------------------------------------------------
/Release/Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # Automatically-generated file. Do not edit!
3 | # Toolchain: GNU Tools for STM32 (10.3-2021.10)
4 | ################################################################################
5 |
6 | # Add inputs and outputs from these tool invocations to the build variables
7 | C_SRCS += \
8 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \
9 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c \
10 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c \
11 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c \
12 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c \
13 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c \
14 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c \
15 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c \
16 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c \
17 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.c \
18 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.c \
19 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.c \
20 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.c \
21 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c \
22 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c \
23 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c \
24 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c \
25 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c \
26 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c \
27 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c \
28 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c \
29 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.c \
30 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.c \
31 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.c \
32 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.c \
33 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.c \
34 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c \
35 | ../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.c
36 |
37 | OBJS += \
38 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o \
39 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o \
40 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o \
41 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o \
42 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o \
43 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o \
44 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o \
45 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o \
46 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o \
47 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.o \
48 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.o \
49 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o \
50 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o \
51 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o \
52 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o \
53 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o \
54 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o \
55 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o \
56 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o \
57 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o \
58 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o \
59 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.o \
60 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.o \
61 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.o \
62 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.o \
63 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.o \
64 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o \
65 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.o
66 |
67 | C_DEPS += \
68 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.d \
69 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.d \
70 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.d \
71 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.d \
72 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.d \
73 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.d \
74 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.d \
75 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.d \
76 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.d \
77 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.d \
78 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.d \
79 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.d \
80 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.d \
81 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.d \
82 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.d \
83 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.d \
84 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.d \
85 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.d \
86 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.d \
87 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.d \
88 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.d \
89 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.d \
90 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.d \
91 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.d \
92 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.d \
93 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.d \
94 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.d \
95 | ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.d
96 |
97 |
98 | # Each subdirectory must supply rules for building sources it contributes
99 | Drivers/STM32F4xx_HAL_Driver/Src/%.o Drivers/STM32F4xx_HAL_Driver/Src/%.su: ../Drivers/STM32F4xx_HAL_Driver/Src/%.c Drivers/STM32F4xx_HAL_Driver/Src/subdir.mk
100 | arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -DSTM32F401xC -c -I../USB_DEVICE/App -I../USB_DEVICE/Target -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../Middlewares/ST/STM32_USB_Device_Library/Class/AUDIO/Inc -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -O3 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@"
101 |
102 | clean: clean-Drivers-2f-STM32F4xx_HAL_Driver-2f-Src
103 |
104 | clean-Drivers-2f-STM32F4xx_HAL_Driver-2f-Src:
105 | -$(RM) ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2s_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pcd_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_dma.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_exti.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_gpio.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_rcc.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_tim.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.su ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.d ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.o ./Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_utils.su
106 |
107 | .PHONY: clean-Drivers-2f-STM32F4xx_HAL_Driver-2f-Src
108 |
109 |
--------------------------------------------------------------------------------