?? def.h
字號:
#ifndef __DEF_H_
#define __DEF_H_
#define U32 unsigned int
#define U16 unsigned short
#define S32 int
#define S16 short int
#define U8 unsigned char
#define S8 char
#define TRUE 1
#define FALSE 0
#define OK 1
#define FAIL 0
#define FileEnd 1
#define NotEnd 0
#ifndef SINT8
#define SINT8 signed char
#endif
#ifndef UINT8
#define UINT8 unsigned char
#endif
#ifndef SINT16
#define SINT16 signed short
#endif
#ifndef UINT16
#define UINT16 unsigned short
#endif
#ifndef SINT32
#define SINT32 signed long
#endif
#ifndef UINT32
#define UINT32 unsigned long
#endif
#ifndef NULL
#define NULL ((void *)0)
#endif
///////////////////////////////////////////////////////////////////////////////////////////
//Pre compile.
#ifndef _DEBUG
#define _DEBUG
#endif
#ifndef _DEBUG_STREAM_INT
#define _DEBUG_STREAM_INT
#endif
///////////////////////////////////////////////////////////////////////////////////////////
typedef __packed struct
{
U8 bySignature_b1; //Signature that helps identify this data packet as an OBW
U8 bySignature_b2; //Signature that helps identify this data packet as an OBW
U8 bySignature_b3; //Signature that helps identify this data packet as an OBW
U8 bySignature_b4; //Signature that helps identify this data packet as an OBW
U8 byDataLength; //Data Lenth.
U8 byOpenrationCode;
U8 byPara1_b1;
U8 byPara1_b2;
U8 byPara1_b3;
U8 byPara1_b4;
U8 byPara2_b1;
U8 byPara2_b2;
U8 byPara2_b3;
U8 byPara2_b4;
}OBW, *pOBW;
typedef __packed struct
{
U8 bySignature_b1; //Signature that helps identify this data packet as an RSW
U8 bySignature_b2; //Signature that helps identify this data packet as an RSW
U8 bySignature_b3; //Signature that helps identify this data packet as an RSW
U8 bySignature_b4; //Signature that helps identify this data packet as an RSW
U8 Status; //Status indicates the success or failure of the operation.0 = Success1 = Failed2 = Phase Error
U8 byPara1_b1;
U8 byPara1_b2;
U8 byPara1_b3;
U8 byPara1_b4;
U8 byPara2_b1;
U8 byPara2_b2;
U8 byPara2_b3;
U8 byPara2_b4;
}RSW, *pRSW;
typedef enum
{
BEG_STATE = 0,
R_STATE,
M_STATE,
C_STATE,
CMDDATA_STATE,
RECIVEDATA_STATE
}RAMCOMD_STATE;
////////////////////////////////////////////////
//CMD
////////////////////////////////////////////////
typedef enum
{
CMD_Undefined = 0x0,
//Chip command.
CMD_WMAGETREG ,
CMD_WMASETREG ,
CMD_WMAPLAY ,
CMD_WMASTOP ,
CMD_WMAPAUSE ,
CMD_WMARESTART ,
CMD_WMASEEK ,
CMD_WMAVOLUME ,
//Uart command.
CMD_TRANSFEREVENT ,
CMD_TRANSFERSTREAM ,
CMD_TRANSFERCOMMAND ,
CMD_TRANSFERPRELOAD ,
CMD_TRANSFERMEDIA ,
CMD_TRANSFERWAVE ,
CMD_PLAYEVENT ,
CMD_PLAYSTREAM ,
CMD_PLAYCOMMAND ,
CMD_PLAYPRELOAD ,
CMD_PLAYMEDIA ,
CMD_PLAYWAVE ,
CMD_STOPEVENT ,
CMD_STOPMEDIA ,
CMD_STOPWAVE ,
CMD_SETSTREAMADDR ,
CMD_SETPRELOADADDR ,
CMD_SETSTREAMCHECK ,
CMD_GETDEBUGINFO
}ARMCMD;
#define SIGNATURE_RSW 0x534D5241
#define SIZE_OBW 14
#define SIZE_RSW 13
#define UART_PACKET_LENGTH 255
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -