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
1.1 KiB

#ifndef _APP_TASK_SPEECH_H
#define _APP_TASK_SPEECH_H
#include "../tpc/ccmodbus.h"
#include "../ctask/task.h"
#define CC_SPEECH_INFO_MAX 1
#define D_s_TS_speech_max 16
enum SPEECH_OPER
{
SPEECH_NAME_PLAY = 0xA3,
};
typedef struct
{
vU8 start;
vU8 num;
vU8 oper;
vU8 title;
vU8 buf[3];
vU8 crc;
vU8 end;
}TS_SPEECH;
typedef struct
{
U16 start;
U16 num;
U16 oper;
U16 title;
//U8 buf[2];
U16 end;
}CCMD_SPEECH_INFO;
typedef struct
{
TS_task task;
U16 slaverIndex;
U16 pkglen;
TS_PH3_ccmodbus *pkg;
TS_PH3_ccmodbus *ack;
TS_SPEECH *speech_pkg;
CCMD_SPEECH_INFO ccmd_speech_info[CC_SPEECH_INFO_MAX];
}TS_TASK_SPEECH;
extern TS_TASK_SPEECH ts_speech;
extern void L3_task_speech_init(void);
extern void L3_task_speech_handle(TS_TASK_SPEECH *s);
extern U8 L3_pack_speech_A3(TS_SPEECH *pspeech , U8 start ,U8 num ,U8 title ,U8 end);//tcp传来的buf;//tcp传来的buf
extern U8 L3_pack_speech(TS_SPEECH *pspeech, CCMD_SPEECH_INFO *speech_info);
extern U8 *hexBytes2AsciiBytes(U8 asciiBytes[],U8 hexBytes[],U8 hexBytesLen);
extern U8 Fun_SC_Check(U8 *p1, unsigned short int len);
#endif