Files
SmartPetFeeder_STM32/CMakeLists.txt
wangbeihong 9cadad138e ```
feat(bluetooth): 添加多按钮支持和WiFi连接音频反馈

添加MultiButton库支持多按键功能,重构SPI显示屏驱动代码,
迁移MP3音频文件至正确目录并集成WiFi连接状态音频提示音。

- 添加Multi_Button.c源文件和相关头文件包含
- 重构spi_st7735s.c中的数组初始化格式,优化代码可读性
- 将MP3音频文件从Development_Docs/MP3迁移到Core/Bsp/BSP_Device/bsp_mp3/MP3
- 在WiFi连接过程中添加MP3音频反馈(连接成功/失败提示音)
- 优化ST7735显示屏驱动中的DMA传输模式支持
```
2026-02-23 16:59:34 +08:00

89 lines
2.3 KiB
CMake

cmake_minimum_required(VERSION 3.22)
#
# This file is generated only once,
# and is not re-generated if converter is called multiple times.
#
# User is free to modify the file as much as necessary
#
# Setup compiler settings
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)
# Define the build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
endif()
# Set the project name
set(CMAKE_PROJECT_NAME hahha)
# Enable compile command to ease indexing with e.g. clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
# Core project settings
project(${CMAKE_PROJECT_NAME})
message("Build type: " ${CMAKE_BUILD_TYPE})
# Enable CMake support for ASM and C languages
enable_language(C ASM)
# Create an executable object type
add_executable(${CMAKE_PROJECT_NAME}
# Add user sources here
Core/Bsp/easylogger/inc/elog.h
Core/Bsp/easylogger/port/elog_port.c
Core/Bsp/easylogger/src/elog.c
Core/Bsp/easylogger/src/elog_utils.c
Core/Bsp/BSP_WF_24/dx_wf_24.c
Core/Bsp/BSP_Device/device_ctrl/device_ctrl.c
Core/Bsp/BSP_Device/spi_st7735s/spi_st7735s.c
Core/Bsp/BSP_Device/spi_st7735s/fonts.c
Core/Bsp/BSP_Device/bsp_mp3/mp3_driver.c
Core/Bsp/MultiButton-master/Multi_Button.c
)
# Add STM32CubeMX generated sources
add_subdirectory(cmake/stm32cubemx)
# Link directories setup
target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE
# Add user defined library search paths
)
# Add sources to executable
target_sources(${CMAKE_PROJECT_NAME} PRIVATE
# Add user sources here
)
# Add include paths
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
# Add user defined include paths
Core/Bsp/easylogger
Core/Bsp/easylogger/inc
Core/Bsp/easylogger/port
Core/Bsp/easylogger/src
Core/Bsp/BSP_WF_24
Core/Bsp/BSP_Device/device_ctrl
Core/Bsp/BSP_Device/spi_st7735s
Core/Bsp/BSP_Device/bsp_mp3
Core/Bsp/MultiButton-master
)
# Add project symbols (macros)
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
# Add user defined symbols
)
# Remove wrong libob.a library dependency when using cpp files
list(REMOVE_ITEM CMAKE_C_IMPLICIT_LINK_LIBRARIES ob)
# Add linked libraries
target_link_libraries(${CMAKE_PROJECT_NAME}
stm32cubemx
# Add user defined libraries
)