From be247229d5e1542fce78b92fdc37f9cbbbfb5726 Mon Sep 17 00:00:00 2001
From: Zhangwen <13970730+mkc46119@user.noreply.gitee.com>
Date: Wed, 16 Apr 2025 16:29:19 +0800
Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A1.=E6=B5=8B=E8=AF=95=E9=9F=B3?=
=?UTF-8?q?=E9=A2=91=E6=A8=A1=E5=9D=97=E6=92=AD=E6=94=BE=E4=B8=8D=E7=A8=B3?=
=?UTF-8?q?=E5=AE=9A=E9=97=AE=E9=A2=98=EF=BC=8C=E6=9C=80=E7=BB=88=E6=9B=B4?=
=?UTF-8?q?=E6=8D=A2=E7=94=B5=E8=B7=AF=E6=9D=BF=EF=BC=8C=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=87=BA=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
keilp/cc_as_stc02_ps5ws.uvprojx | 30 +++++++++++++++---------------
source/app/main.c | 21 ++++++++++++++++++++-
source/app/task_game.c | 30 +++++++++++++++---------------
source/bsp/bsp_WT2605B.c | 4 ++--
source/bsp/bsp_config.c | 1 -
source/msp/UART3.c | 2 +-
6 files changed, 53 insertions(+), 35 deletions(-)
diff --git a/keilp/cc_as_stc02_ps5ws.uvprojx b/keilp/cc_as_stc02_ps5ws.uvprojx
index 4de37ba..f2b8cc1 100644
--- a/keilp/cc_as_stc02_ps5ws.uvprojx
+++ b/keilp/cc_as_stc02_ps5ws.uvprojx
@@ -12,14 +12,14 @@
MCS-51
- AT80C31X2
- Atmel
- IRAM(0 - 0x7F) CLOCK(60000000) MODP2
+ STC8H8K64U Series
+ STC
+ IRAM(0-0xFF) XRAM(0-0x1FFF) IROM(0-0xFFF8) CLOCK(35000000)
"LIB\STARTUP.A51" ("Standard 8051 Startup Code")
- 4027
- REG51.H
+ 63364
+ STC8.H
@@ -35,8 +35,8 @@
d:\Keil\C51\BIN\
-
-
+ STC\
+ STC\
0
0
@@ -109,11 +109,11 @@
S8051.DLL
DP51.DLL
- -p51X
+ -pDP8051
S8051.DLL
TP51.DLL
- -p51X
+ -p51
@@ -195,11 +195,11 @@
0
0
1
- 0
- 0
+ 1
+ 1
0
0
- 1
+ 0
0
0
0
@@ -270,17 +270,17 @@
1
0x0
- 0x0
+ 0xfff9
0
0x0
- 0x80
+ 0x100
0
0x0
- 0x0
+ 0x2000
0
diff --git a/source/app/main.c b/source/app/main.c
index f2108c8..3475913 100644
--- a/source/app/main.c
+++ b/source/app/main.c
@@ -65,6 +65,7 @@ void L0_TASK_init(void)
//===============================================
void main(void)
{
+ u8 i = 0;
//板U初始化
L0_MCU_init();
//eeprom参数读取
@@ -87,6 +88,8 @@ void main(void)
L0_uart0_sendArrayHex(G.mcu_id, MSP_ID_LEN);
L0_uart0_0d0a();
+
+
// //版本信息
// L0_uart0_sendstr("Version info : ");
// L0_uart0_sendArray("PEN_V3",6);
@@ -94,6 +97,7 @@ void main(void)
while(1)
{
+
if(1 == s_nos_tick.t1s_heartbeat)//1s
{
s_nos_tick.t1s_heartbeat = 0;//置0清空
@@ -103,7 +107,22 @@ void main(void)
// L0_uart0_0d0a();
// L0_uart0_sendstr("Vin = ");
// L0_uart0_ushex(G.Vin);
- // L2_WT2605B_Broadcast(&audio_tcp_noplan);
+ // i++;
+ // if (i == 3)
+ // {
+ // L2_WT2605B_Broadcast(&audio_tcp_maze);
+ // L0_uart0_0d0a();
+ // L0_uart0_sendstr("gipuhafpg");
+ // L0_uart0_0d0a();
+
+ // i = 0;
+ // }
+ // if (ts_uart[uNum3].r.ok == 1)
+ // {
+ // L0_uart0_sendArrayHex(ts_uart[uNum3].r.buf,ts_uart[uNum3].r.num);
+ // ts_uart[uNum3].r.ok = 0;
+ // }
+ // L0_uart3_sendstr("1123456789abcdefg");
}
// 系统状态任务
L3_task_appstatus_handler(&_s_task_appstatus);
diff --git a/source/app/task_game.c b/source/app/task_game.c
index 4fc6d8c..d2f6390 100644
--- a/source/app/task_game.c
+++ b/source/app/task_game.c
@@ -143,105 +143,105 @@ void L3_task_game_init(void)
// 众里寻三3星
_s_task_game.game_info[3].game_oid = GAME_OID_ZLXS_4;
_s_task_game.game_info[3].game_audio = &audio_game_zlxs_4;
- _s_task_game.game_info[3].game_supported_oid[0].oid = 0x28EF;
+ _s_task_game.game_info[3].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[3].game_order = 0;
_s_task_game.game_info[3].game_timeout_seconds = 60;
_s_task_game.game_info[3].game_score = 0;
// 火眼金晶3星
_s_task_game.game_info[4].game_oid = GAME_OID_HYJJ_3;
_s_task_game.game_info[4].game_audio = &audio_game_hyjj_3;
- _s_task_game.game_info[4].game_supported_oid[0].oid = 0x29EF;
+ _s_task_game.game_info[4].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[4].game_order = 0;
_s_task_game.game_info[4].game_timeout_seconds = 60;
_s_task_game.game_info[4].game_score = 0;
// 火眼金晶4星
_s_task_game.game_info[5].game_oid = GAME_OID_HYJJ_4;
_s_task_game.game_info[5].game_audio = &audio_game_hyjj_4;
- _s_task_game.game_info[5].game_supported_oid[0].oid = 0x2AEF;
+ _s_task_game.game_info[5].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[5].game_order = 0;
_s_task_game.game_info[5].game_timeout_seconds = 60;
_s_task_game.game_info[5].game_score = 0;
// 火眼金晶5星
_s_task_game.game_info[6].game_oid = GAME_OID_HYJJ_5;
_s_task_game.game_info[6].game_audio = &audio_game_hyjj_5;
- _s_task_game.game_info[6].game_supported_oid[0].oid = 0x2BEF;
+ _s_task_game.game_info[6].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[6].game_order = 0;
_s_task_game.game_info[6].game_timeout_seconds = 60;
_s_task_game.game_info[6].game_score = 0;
// 从小到大4星
_s_task_game.game_info[7].game_oid = GAME_OID_CXDD_4;
_s_task_game.game_info[7].game_audio = &audio_game_cxdd_4;
- _s_task_game.game_info[7].game_supported_oid[0].oid = 0x2CEF;
+ _s_task_game.game_info[7].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[7].game_order = 0;
_s_task_game.game_info[7].game_timeout_seconds = 60;
_s_task_game.game_info[7].game_score = 0;
// 明察秋毫4星
_s_task_game.game_info[8].game_oid = GAME_OID_MCQH_4;
_s_task_game.game_info[8].game_audio = &audio_game_mcqh_4;
- _s_task_game.game_info[8].game_supported_oid[0].oid = 0x2DEF;
+ _s_task_game.game_info[8].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[8].game_order = 0;
_s_task_game.game_info[8].game_timeout_seconds = 60;
_s_task_game.game_info[8].game_score = 0;
// 明察秋毫5星
_s_task_game.game_info[9].game_oid = GAME_OID_MCQH_5;
_s_task_game.game_info[9].game_audio = &audio_game_mcqh_5;
- _s_task_game.game_info[9].game_supported_oid[0].oid = 0x2EEF;
+ _s_task_game.game_info[9].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[9].game_order = 0;
_s_task_game.game_info[9].game_timeout_seconds = 60;
_s_task_game.game_info[9].game_score = 0;
// 积木再现3星
_s_task_game.game_info[10].game_oid = GAME_OID_JMZX_3;
_s_task_game.game_info[10].game_audio = &audio_game_jmzx_3;
- _s_task_game.game_info[10].game_supported_oid[0].oid = 0x2FEF;
+ _s_task_game.game_info[10].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[10].game_order = 0;
_s_task_game.game_info[10].game_timeout_seconds = 60;
_s_task_game.game_info[10].game_score = 0;
// 积木再现4星
_s_task_game.game_info[11].game_oid = GAME_OID_JMZX_4;
_s_task_game.game_info[11].game_audio = &audio_game_jmzx_4;
- _s_task_game.game_info[11].game_supported_oid[0].oid = 0x30EF;
+ _s_task_game.game_info[11].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[11].game_order = 0;
_s_task_game.game_info[11].game_timeout_seconds = 60;
_s_task_game.game_info[11].game_score = 0;
// 积木再现5星
_s_task_game.game_info[12].game_oid = GAME_OID_JMZX_5;
_s_task_game.game_info[12].game_audio = &audio_game_jmzx_5;
- _s_task_game.game_info[12].game_supported_oid[0].oid = 0x31EF;
+ _s_task_game.game_info[12].game_supported_oid[0].oid = 0x10FE;
_s_task_game.game_info[12].game_order = 0;
_s_task_game.game_info[12].game_timeout_seconds = 60;
_s_task_game.game_info[12].game_score = 0;
// 还原钟表1星
_s_task_game.game_info[13].game_oid = GAME_OID_HYZB_1;
_s_task_game.game_info[13].game_audio = &audio_game_hyzb_1;
- _s_task_game.game_info[13].game_supported_oid[0].oid = 0x40EF;
+ _s_task_game.game_info[13].game_supported_oid[0].oid = 0x40FE;
_s_task_game.game_info[13].game_order = 0;
_s_task_game.game_info[13].game_timeout_seconds = 60;
_s_task_game.game_info[13].game_score = 0;
// 还原钟表2星
_s_task_game.game_info[14].game_oid = GAME_OID_HYZB_2;
_s_task_game.game_info[14].game_audio = &audio_game_hyzb_2;
- _s_task_game.game_info[14].game_supported_oid[0].oid = 0x41EF;
+ _s_task_game.game_info[14].game_supported_oid[0].oid = 0x40FE;
_s_task_game.game_info[14].game_order = 0;
_s_task_game.game_info[14].game_timeout_seconds = 60;
_s_task_game.game_info[14].game_score = 0;
// 时间规划3星
_s_task_game.game_info[15].game_oid = GAME_OID_SJGH_3;
_s_task_game.game_info[15].game_audio = &audio_game_sjgh_3;
- _s_task_game.game_info[15].game_supported_oid[0].oid = 0x42EF;
+ _s_task_game.game_info[15].game_supported_oid[0].oid = 0x40FE;
_s_task_game.game_info[15].game_order = 0;
_s_task_game.game_info[15].game_timeout_seconds = 60;
_s_task_game.game_info[15].game_score = 0;
// 计算时间4星
_s_task_game.game_info[16].game_oid = GAME_OID_JSSJ_4;
_s_task_game.game_info[16].game_audio = &audio_game_jssj_4;
- _s_task_game.game_info[16].game_supported_oid[0].oid = 0x43EF;
+ _s_task_game.game_info[16].game_supported_oid[0].oid = 0x40FE;
_s_task_game.game_info[16].game_order = 0;
_s_task_game.game_info[16].game_timeout_seconds = 60;
_s_task_game.game_info[16].game_score = 0;
// 计算时间5星
_s_task_game.game_info[17].game_oid = GAME_OID_JSSJ_5;
_s_task_game.game_info[17].game_audio = &audio_game_jssj_5;
- _s_task_game.game_info[17].game_supported_oid[0].oid = 0x44EF;
+ _s_task_game.game_info[17].game_supported_oid[0].oid = 0x40FE;
_s_task_game.game_info[17].game_order = 0;
_s_task_game.game_info[17].game_timeout_seconds = 60;
_s_task_game.game_info[17].game_score = 0;
diff --git a/source/bsp/bsp_WT2605B.c b/source/bsp/bsp_WT2605B.c
index 3ca05a1..4e0a768 100644
--- a/source/bsp/bsp_WT2605B.c
+++ b/source/bsp/bsp_WT2605B.c
@@ -60,11 +60,10 @@ void L2_WT2605B_init()
// 初始化功放控制引脚P26
// 0 开启 1 关闭
D_stdIO_P2(BITN6);
+ L2_WT2605B_ON();
// 初始化音量
L2_WT2605B_VolumeControl(G.volume);
-
- L2_WT2605B_ON();
}
void L2_WT2605B_ON()
@@ -79,6 +78,7 @@ void L2_WT2605B_OFF()
void L2_WT2605B_Broadcast(TS_SPEECH_AUDIO *music)
{
L0_uart3_sendArray((U8 *)music,9);
+ L0_uart0_sendArray((U8 *)music,9);
}
void L2_WT2605B_Broadcast_TPC(U8* GameID)
diff --git a/source/bsp/bsp_config.c b/source/bsp/bsp_config.c
index 92e2464..1598e70 100644
--- a/source/bsp/bsp_config.c
+++ b/source/bsp/bsp_config.c
@@ -71,7 +71,6 @@ void L0_board_config(void)
D_stdIO_P3(BITN6);
D_stdIO_P3(BITN7);
D_stdIO_P2(BITN7);
- D_stdIO_P2(BITN6);
D_stdIO_P0(BITN2);
D_HighI_P3(BITN4);
diff --git a/source/msp/UART3.c b/source/msp/UART3.c
index 1f392be..47961f5 100644
--- a/source/msp/UART3.c
+++ b/source/msp/UART3.c
@@ -41,7 +41,7 @@ void L0_uart3_buf_init(void)
//串口协议解析专用字段
// ts_uart[uNum3].tp_handler = L0_uartN_overtime_callback;
- ts_uart[uNum3].tp_handler = NULL;
+ // ts_uart[uNum3].tp_handler = NULL;
ts_uart[uNum3].uartx = uNum3;
//串口初始化