# cckey **Repository Path**: FlechazoCLF/cckey ## Basic Information - **Project Name**: cckey - **Description**: 一个超级舒适的按键触发,以及调用按键回调的框架! - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-25 - **Last Updated**: 2025-06-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SmartSofa Control System This is an intelligent sofa control system based on the STM32F103 series microcontroller, designed to manage various functions of the sofa, including button control, LED indicators, motor control, timers, Flash storage, power management, and more. ## Project Structure - **Libraries/CMSIS** Contains ARM Cortex-M3 core support and startup files for low-level hardware operations. - **Libraries/FWlib** STM32F10x standard peripheral driver library, providing encapsulated functions for ADC, CAN, GPIO, I2C, SPI, TIM, USART, and other peripherals. - **User/App** Application layer modules, including: - **App_Init.c/h** - System initialization module. - **App_ModeManagement** - Mode management module. - **App_Task** - Task scheduling module. - **App_Key** - Button event handling module. - **App_Led** - LED control module. - **App_Motor** - Motor control module. - **User/Bsp** Board Support Package (BSP), including: - **Bsp_Init** - Hardware initialization. - **Bsp_Gpio** - General-purpose input/output control. - **Bsp_Key** - Button detection and processing. - **Bsp_Led** - LED driver. - **Bsp_Motor** - Motor control interface. - **Bsp_Timer** - Timer management. - **Bsp_Flash** - Flash memory read/write. - **Bsp_Pvd** - Power voltage detection. - **User/Cfg** System configuration files, defining global structures and configuration parameters. - **User/Components/Debug** Debugging module for log output and handling debug information. - **main.c** Program entry point, calls system initialization and enters the main loop. ## Module Descriptions ### Button Control (App_Key) - Supports single click, double click, and long press triggering methods. - Configurable button mappings and callback functions. - Supports multiple physical buttons (e.g., trunk, drawer, lamp, etc.). ### LED Control (App_Led) - Supports brightness adjustment, color switching, and breathing LED effects. - Supports runtime status control and mode switching. ### Motor Control (App_Motor) - Supports motor start/stop control. - Supports sensor feedback status detection. - Supports triggering motor actions via buttons. ### Timer (Bsp_Timer) - Provides millisecond and second-level timing functionality. - Supports timeout detection. ### Flash Storage (Bsp_Flash) - Provides Flash read/write interfaces. - Supports data verification and storage management. ### Power Management (Bsp_Pvd) - Supports low-voltage detection. - Provides low-power callback functions. ## Compilation and Debugging This project is compiled and debugged using the Keil MDK development environment. Main configuration files include: - **smartsofa.uvprojx** - Keil project file. - **smartsofa.sct** - Linker script. - **startup_stm32f10x_*.s** - Startup files. ## Development Environment - **IDE**: Keil MDK-ARM - **MCU**: STM32F103RC - **Compiler**: ARMCC or GCC (depending on configuration) ## License This project is licensed under the MIT License. Please refer to the LICENSE file for detailed terms.