- 新增MP3语音模块驱动,集成18个语音提示,支持播放/停止/音量调节 - 实现0/10/20/30分钟循环定时倒计时,实时显示剩余时间,定时结束自动停机 - 优化电机控制:一档力度提升至75%,降档冲击时间延长至800ms,降档时触发100%冲击防卡顿 - 屏幕显示重构为分区动态更新:时间状态(Zone1)/档位(Zone2)/加热(Zone3),性能优化 - 新增LED指示:运行时RUN_LED以500ms周期闪烁,无效操作ERR_LED亮1秒 - 操作逻辑改进:所有操作需先设定时间,否则播放"请先设定时间"并亮ERR_LED - 加热控制由GPIO改为PWM(TIM1_CH1),占空比300 - 调整USART3波特率为9600适配MP3模块 - FreeRTOS任务优化:Motor周期500ms,Screen周期10ms,新增定时器秒Tick处理 - 完善开发文档:MP3集成指南、校验和验证脚本、文件重命名工具等 新增文件:mp3_driver.h/c, 多项开发文档 修改文件:freertos.c, gbk_text.h/c, motor_driver.c, screen.h/c, usart.c, gpio.c等
52 lines
1.6 KiB
C
52 lines
1.6 KiB
C
#ifndef __GBK_TEXT_H__
|
||
#define __GBK_TEXT_H__
|
||
|
||
#include <stdint.h>
|
||
|
||
// GBK文本数组声明(定义在gbk_text.c中)
|
||
extern const uint8_t text_device_name_GBK[];
|
||
extern const uint8_t text_loading_GBK[];
|
||
extern const uint8_t text_massage_off_GBK[];
|
||
extern const uint8_t text_heat_on_GBK[];
|
||
extern const uint8_t text_heat_off_GBK[];
|
||
extern const uint8_t text_gear_1_GBK[];
|
||
extern const uint8_t text_gear_2_GBK[];
|
||
extern const uint8_t text_gear_3_GBK[];
|
||
extern const uint8_t text_time_1_GBK[];
|
||
extern const uint8_t text_time_2_GBK[];
|
||
extern const uint8_t text_time_3_GBK[];
|
||
extern const uint8_t text_remaining_GBK[];
|
||
extern const uint8_t text_stop_GBK[];
|
||
|
||
// GBK文本长度宏(预计算,不含\0)
|
||
#define text_device_name_LEN (10)
|
||
#define text_loading_LEN (6)
|
||
#define text_massage_off_LEN (13)
|
||
#define text_heat_on_LEN (13)
|
||
#define text_heat_off_LEN (13)
|
||
#define text_gear_1_LEN (15)
|
||
#define text_gear_2_LEN (15)
|
||
#define text_gear_3_LEN (15)
|
||
#define text_time_1_LEN (15)
|
||
#define text_time_2_LEN (15)
|
||
#define text_time_3_LEN (15)
|
||
#define text_remaining_LEN (13)
|
||
#define text_stop_LEN (14)
|
||
|
||
// 兼容旧代码的别名
|
||
#define text_device_name text_device_name_GBK
|
||
#define text_loading text_loading_GBK
|
||
#define text_massage_off text_massage_off_GBK
|
||
#define text_heat_on text_heat_on_GBK
|
||
#define text_heat_off text_heat_off_GBK
|
||
#define text_gear_1 text_gear_1_GBK
|
||
#define text_gear_2 text_gear_2_GBK
|
||
#define text_gear_3 text_gear_3_GBK
|
||
#define text_time_1 text_time_1_GBK
|
||
#define text_time_2 text_time_2_GBK
|
||
#define text_time_3 text_time_3_GBK
|
||
#define text_remaining text_remaining_GBK
|
||
#define text_stop text_stop_GBK
|
||
|
||
#endif // __GBK_TEXT_H__
|