|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
///@copyright Copyright (c) 2018, 传控科技 All rights reserved.
|
|
|
|
///-------------------------------------------------------------------------
|
|
|
|
/// @file bsp_drv.h
|
|
|
|
/// @brief bsp @ driver config
|
|
|
|
///-------------------------------------------------------------------------
|
|
|
|
/// @version 1.0
|
|
|
|
/// @author CC
|
|
|
|
/// @date 20180331
|
|
|
|
/// @note cc_AS_stc02
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _APP_TASK_GAME_H
|
|
|
|
#define _APP_TASK_GAME_H
|
|
|
|
|
|
|
|
#include "../ctask/task.h"
|
|
|
|
#include "../clib/clib.h"
|
|
|
|
#include "../bsp/bsp_WT2605B.h"
|
|
|
|
|
|
|
|
|
|
|
|
// #define game_supported_oid_max 32
|
|
|
|
#define game_num_max 20
|
|
|
|
|
|
|
|
#define zbt_1_num 5
|
|
|
|
#define zmg_1_num 6
|
|
|
|
#define shert_1_num 32
|
|
|
|
#define zlxs_4_num 1
|
|
|
|
#define hyjj_3_num 1
|
|
|
|
#define hyjj_4_num 1
|
|
|
|
#define hyjj_5_num 1
|
|
|
|
#define cxdd_4_num 1
|
|
|
|
#define mcqh_4_num 1
|
|
|
|
#define mcqh_5_num 1
|
|
|
|
#define jmzx_3_num 1
|
|
|
|
#define jmzx_4_num 1
|
|
|
|
#define jmzx_5_num 1
|
|
|
|
#define hyzb_1_num 1
|
|
|
|
#define hyzb_2_num 1
|
|
|
|
#define sjgh_3_num 1
|
|
|
|
#define jssj_4_num 1
|
|
|
|
#define jssj_5_num 1
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _point_info
|
|
|
|
{
|
|
|
|
U16 oid; //点的oid值
|
|
|
|
U8 yes_or_no; //1错误,0正确
|
|
|
|
TS_SPEECH_AUDIO* point_audio; //点对应的音频
|
|
|
|
U8 handled; //游戏进行过程中是否已经被处理 0 未处理,1 已处理
|
|
|
|
}POINT_INFO;
|
|
|
|
|
|
|
|
typedef struct _point_buf
|
|
|
|
{
|
|
|
|
POINT_INFO zbt_1[zbt_1_num];
|
|
|
|
POINT_INFO zmg_1[zmg_1_num];
|
|
|
|
POINT_INFO shert_1[shert_1_num];
|
|
|
|
POINT_INFO zlxs_4[zlxs_4_num];
|
|
|
|
POINT_INFO hyjj_3[hyjj_3_num];
|
|
|
|
POINT_INFO hyjj_4[hyjj_4_num];
|
|
|
|
POINT_INFO hyjj_5[hyjj_5_num];
|
|
|
|
POINT_INFO cxdd_4[cxdd_4_num];
|
|
|
|
POINT_INFO mcqh_4[mcqh_4_num];
|
|
|
|
POINT_INFO mcqh_5[mcqh_5_num];
|
|
|
|
POINT_INFO jmzx_3[jmzx_3_num];
|
|
|
|
POINT_INFO jmzx_4[jmzx_4_num];
|
|
|
|
POINT_INFO jmzx_5[jmzx_5_num];
|
|
|
|
POINT_INFO hyzb_1[hyzb_1_num];
|
|
|
|
POINT_INFO hyzb_2[hyzb_2_num];
|
|
|
|
POINT_INFO sjgh_3[sjgh_3_num];
|
|
|
|
POINT_INFO jssj_4[jssj_4_num];
|
|
|
|
POINT_INFO jssj_5[jssj_5_num];
|
|
|
|
}POINT_BUF;
|
|
|
|
|
|
|
|
typedef struct game_info
|
|
|
|
{
|
|
|
|
U16 game_oid; //游戏oid
|
|
|
|
TS_SPEECH_AUDIO* game_audio; //游戏音频
|
|
|
|
POINT_INFO* game_supported_oid; //游戏支持的point
|
|
|
|
U8 game_oid_num;
|
|
|
|
U8 game_order; //游戏顺序 0不排序,1排序
|
|
|
|
U16 game_timeout_seconds; //游戏超时时间(秒)
|
|
|
|
U16 game_score; //游戏得分
|
|
|
|
}GAME_INF;
|
|
|
|
|
|
|
|
typedef struct _s_task_game
|
|
|
|
{
|
|
|
|
TS_task task;
|
|
|
|
U16 read_oid; //读取到的oid值
|
|
|
|
U16 error_oid; //代表错误的oid值,0x3FFF
|
|
|
|
U16 game_maxseconds; //所有游戏超时的最大时间,单位为秒
|
|
|
|
GAME_INF game_info[game_num_max]; //游戏信息数组
|
|
|
|
S8 game_info_index; //当前选中的游戏,初始化值为-1代表未选中任何游戏
|
|
|
|
S8 game_point_index; //当前正在处理的点
|
|
|
|
U32 start_seconds; //游戏开始时间
|
|
|
|
U8 eeror_times; //错误次数
|
|
|
|
U8 timeover_flag; //超时标志 0未超时 1超时
|
|
|
|
|
|
|
|
}S_TASK_GAME;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern S_TASK_GAME _s_task_game;
|
|
|
|
|
|
|
|
extern void L3_task_game_init(void);
|
|
|
|
extern void L3_task_game_handler(S_TASK_GAME *s);
|
|
|
|
|
|
|
|
#endif // #ifndef
|