You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

64 lines
2.0 KiB

////////////////////////////////////////////////////////////////////////////
///@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 5
typedef struct _point_info
{
U16 oid; //点的oid值
U8 yes_or_no; //0错误,1正确
TS_SPEECH_AUDIO* point_audio; //点对应的音频
U8 handled; //游戏进行过程中是否已经被处理 0 未处理,1 已处理
}POINT_INFO;
typedef struct game_info
{
U16 game_oid; //游戏oid
TS_SPEECH_AUDIO* game_audio; //游戏音频
POINT_INFO game_supported_oid[game_supported_oid_max]; //游戏支持的point
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; //错误次数
}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