📄 locust_defs.h
字号:
/*------------------------------------------------------------------------------
[BASIC]
{
[FILENAME] locust_defs.h
[CONTENT] project data struct define, and project configuration macro
[AUTHOR] XuCao
[VERSION] 01.0.00.051120
[COMPANY] APLUS COMMUNICATION TECHNOLOGY (BeiJing) CO.,LTD
}
[MOD]
{
01.0.00.051120:
1.Created initial version
}
------------------------------------------------------------------------------*/
#ifndef _LOCUST_DEFS_H_
#ifdef __cplusplus
extern "C" { /* C declarations in C++ */
#endif
#define _LOCUST_DEFS_H_
/*---------------------------------- project platform property define ---------------------------- */
/* LCD pannel define */
#define LCD_PANEL_SHARP8 1 /* it is techor's demo board pannel */
#define LCD_PANEL_SUMSANG35 0 /* sumsang's 3.5" lcd pannel */
#define LCD_PANEL_SUMSANG283 0 /* sumsang's 2.83" lcd pannel */
/* hardware board define */
#define DIGITAL_TECHOR 1 /* it is techor's demo board */
#define DIGITAL_APLUS_V1 0 /* Aplus's first main board */
/* timer tick define */
#define NU_TICK 5 /* it is 2ms */
/*----------------------------- logic defines -------------------------------*/
#ifndef NULL
#define NULL 0
#endif
#ifndef DISABLE
#define DISABLE 0
#endif
#ifndef ENABLE
#define ENABLE 1
#endif
#ifndef bool
typedef enum _bool{
_FALSE = 0,
_TRUE,
} bool;
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
/* ---------------------------------- message define ------------------------------------ */
/* message source & destination module define */
#define MSG_MODULE_UI 0x01
#define MSG_MODULE_UI_CTRLBAR 0x02
#define MSG_MODULE_UI_STATBAR 0x03
#define MSG_MODULE_KBS 0x04
#define MSG_MODULE_UI_TIMER_RTC 0x05
#define MSG_MODULE_DEBUG 0x06
#define MSG_MODULE_DEBUG_IDLE 0x07
#define MSG_MODULE_UART1 0x08
#define MSG_MODULE_UART2 0x09 /* UART2 HISR */
#define MSG_MODULE_MODEM 0x0A /* MODEM TASK */
#define MSG_MODULE_AT 0x0B /* MODEM AT command control TASK */
#define MSG_MODULE_SYS_WD 0x0C
#define MSG_MODULE_AVI 0x0D
#define MSG_MODULE_H324 0x0E
#define MSG_MODULE_BUS 0x0F
#define MSG_MODULE_WAVELET_ENCODER 0x10
#define MSG_MODULE_WAVELET_DECODER 0x11
#define MSG_MODULE_HC007 0x12
#define MSG_MODULE_DOG 0X13
/* message id define */
typedef enum ATTICA_MESSAGE{
/* hsm message define */
Q_EMPTY_SIG = 0,
Q_INIT_SIG = 1,
Q_ENTRY_SIG,
Q_EXIT_SIG,
Q_USER_SIG,
/* ui message */
MSG_KEY_DOWN = 0x000A, /* Key pressed */
MSG_KEY_UP, /* key releases */
MSG_BACKLIGHT_ON, /* LCD backlight turn on */
MSG_BACKLIGHT_OFF, /* LCD backlight turn off */
MSG_BACKLIGHT_UP, /* LCD backlight lighter */
MSG_BACKLIGHT_DOWN, /* LCD backlight darker */
MSG_UI_CTRLBAR_CAP, /* button caption changed */
MSG_UI_CTRLBAR_OPR, /* button up,down,flat */
MSG_UI_CTRLBAR_INIT, /* initial the control bar of ui */
MSG_UI_CTRLBAR_HIDE, /* hide the control bar */
MSG_UI_CTRLBAR_SHOW, /* show the control bar */
MSG_UI_STATBAR_INIT, /* initial the status bar of ui */
MSG_UI_STATBAR_HIDE, /* hide the status bar */
MSG_UI_STATBAR_SHOW, /* show the status bar */
MSG_UI_APP_INIT, /* ui application initial */
MSG_UI_APP_CREATE, /* create a new app */
MSG_UI_APP_EXIT, /* ui application exit */
MSG_UI_APP_PUSH, /* the app will be push into stack */
MSG_UI_APP_POP, /* the app will be pop up to running */
MSG_UI_FONT_SIZE, /* language changed */
MSG_UI_FONT_REQ, /* ui font change request */
MSG_UI_LANGUAGE, /* language changed */
MSG_UI_LANGUAGE_REQ, /* ui language change request */
MSG_UI_RTC, /* update the time of status bar */
MSG_UI_RTC_STOP, /* stop the rtc update */
MSG_UI_RTC_START, /* start the rtc update */
MSG_UI_LCD_SNAP, /* UI send a snap to debug */
MSG_UI_CHILD_ENTER, /* UI app enter a child status */
MSG_UI_CHILD_EXIT, /* UI app exit from a child status */
MSG_UI_BACKGOUND_REDRAW, /* UI redraw the backgound */
MSG_UI_VCALL_EXIT, /* exit from video call */
MSG_VCALL_PRESSED, /* user pressed vcall for connect vcall */
MSG_VCALL_REVED, /* received vcall request */
MSG_KEY_LONG_PRESS, /* some key long pressed */
MSG_STABAR_ADD_ICON, /* add a icon to status bar */
MSG_STABAR_DEL_ICON, /* delete a icon from status bar */
MSG_SIM_NEEDPIN, /* need PIN to check*/
MSG_SIM_CHECKIN, /* checking in the record*/
MSG_SIM_CHECKIN_END, /* checkin end*/
MSG_SIM_PINERROR, /* pin error */
MSG_SIM_ERROR, /* sim error */
MSG_SIM_BLOCK, /* sim blocked */
MSG_SIM_BROWSE_END, /* sim browse end */
MSG_SIM_BACKUP_END, /* sim backup end */
MSG_SIM_RESTORE, /* sim start restore*/
MSG_SIM_RESTORE_END, /*sime restore end*/
MSG_SIM_CHECKIN_ITEM, /*sim checkin a item start*/
MSG_SIM_ITEM_END, /*sim checkin a item end */
MSG_SIM_ITEM_FAIL, /*sim checkin a item fail*/
MSG_SIM_SIM_FULL, /*sim contacts is full*/
MSG_SIM_EXT1_FULL, /* sim ext1 full*/
MSG_SIM_STOP_RES,
MSG_IM_CURSOR_CHANGED, /* UI APP input cursor changed */
MSG_IM_CHAR_INPUTTED, /* some chatacter inputed */
MSG_IM_CHAR_INPUTTING, /* some chatacter inputting */
MSG_IM_INPUTTING_TIMEOUT, /* inputting char timeout */
MSG_RINGING = 0x2001, /* ringing */
MSG_RING_OVER, /* ring over */
MSG_HANG_UP, /* on hook */
MSG_HANG_OFF, /* off hook */
MSG_VANS_REQ, /* video call answer request */
MSG_VCALL_REQ, /* video call request */
MSG_CALL_REQ, /* call request */
MSG_CALLER_ID, /* received caller ID */
MSG_TIME_DATE_IN, /* receive time and date from hc007, ywj 050704 */
MSG_AT_SLEEP, /* SLEEP TIME */
MSG_AT_DTR, /* DTR command send to at task */
MSG_AT_HANG_UP, /* AT message for hang up */
MSG_AT_CMD, /* AT command send to at TASK */
MSG_AT_OK, /* AT command return ok */
MSG_AT_ERROR, /* AT command return error */
MSG_AT_NO_ANSWER, /* AT command call no answer */
MSG_AT_BUSY, /* AT command phone line busy */
MSG_AT_NO_DIALTONE, /* AT command no dialtone */
MSG_AT_STOP_CMD, /* MODEM command to stop AT command */
MSG_CONNECT_OK, /* MODEM connected ok */
MSG_CONNECT_FAIL, /* MODEM connected fail */
MSG_MODEM_OVER, /* MODEM DCD error */
MSG_MODEM_TEST_CMD, /* MODEM test command */
MSG_MODEM_TEST_OK, /* MODEM test OK */
MSG_CONNECT_STARTING, /* starting connect */
MSG_VCALL_FAILED, /* tell modem to reset at command */
MSG_REDIAL, /* redial */
MSG_AT_V8BIS_ERROR, /* V8bis not set correctly */
MSG_REDIAL_REFRESH,
MSG_HC007_INIT, /* initialize hc007 */
MSG_HC007_SEND_OFFHOOK, /* enable hc007 send offhook signal or not */
MSG_HC007_CHECK_OFFHOOK, /* enable hc007 check whether remote hang off or not */
MSG_HC007_ANALOG_STATUS, /* read hc007 status, on hook or off hook */
MSG_HC007_MASK, /* mask hc007's function key */
MSG_HC007_UNMASK, /* unmask hc007's function key */
MSG_HC007_DIALOUT, /* command hc007 to dial a number */
MSG_HC007_CMD_OK, /* hc007 execute command correctly */
MSG_HC007_CMD_ERROR, /* error occured when hc007 execute command */
MSG_HC007_LOST_CONTROL, /* hc007 lost control, maybe need power off */
MSG_AVI_OK = 0x3001, /* AV module work ok */
MSG_AVI_ERROR, /* AV module work error */
MSG_SNAP, /* snap command */
MSG_INTIMACY, /* intimacy (private) command */
MSG_WD_6204, /* watch dog message for 6204 */
MSG_AUDIO_OUT, /* audio data need send to modem */
MSG_VIDEO_OUT, /* video data need send to modem */
MSG_AV_OUT, /* audio & video data need send to modem */
MSG_SNAP_OUT, /* snap data need send to modem */
MSG_AS_OUT, /* audio & snap data need send to modem */
MSG_AVI_INT_IN, /* has a dpram interrupt */
MSG_ZSP_START, /* start zsp for audio codec */
MSG_ZSP_STOP, /* stop zsp codec */
MSG_6204_START, /* start 6204 for video codec */
MSG_6204_STOP, /* stop 6204 codec */
MSG_RRN_RESULT, /* Rate command */
MSG_WAIT_SOUND, /* need to play wait voice */
MSG_ERR_SOUND, /* need to play error voice */
MSG_FRAME_RATE, /* video codec frame rate set */
MSG_MODE_CHANGE, /* video codec mode change */
MSG_AUDIO_IN, /* get some audio data from modem */
MSG_VIDEO_IN, /* get some video data from modem */
MSG_AV_IN, /* get some audio and video data from modem */
MSG_SNAP_IN, /* get some snap data from modem */
MSG_AS_IN, /* get some audio and snap data from modem */
MSG_RMT_VCALL, /* remote video phone has pressed vcall */
MSG_SNAP_DATA, /* for snap data save */
MSG_LOCCIRCLE_START, /* message local loop start */
MSG_LOCCIRCLE_STOP, /* message local loop stop */
MSG_MIC_GAIN, /* adjust the gain of zsp mic */
MSG_SPEAK_GAIN, /* adjust the gain of zsp speak */
MSG_AV_TIMEOUT, /* command ack time out */
MSG_SENSOR_MODE, /* sensor mode change, only for au pannel */
MSG_ZSP_STARTED, /* zsp STARTED */
MSG_6204_RELEASE_LCDC, /* 6204 has accessed lcdc and released it */
MSG_STOP_WAIT_SOUND, /* stop playing wait voice */
MSG_AV_STOPPED, /* av module received hang up message */
/*WANGHONG ADD FOR WATCHDOG*/
MSG_ZSP_ERROR,
MSG_ZSP_IN_RUN,
MSG_ZSP_IN_STOP,
MSG_UI_IN_RUN,
MSG_WD_WATCH_ZSP = 0x4001, /* watch the dog of zsp */
MSG_WD_ZSP_RESULT, /* in answer to zsp watch dog */
MSG_WD_WATCH_6204, /* watch the dog of 6204 */
MSG_WD_6204_ACK, /* watch the dog of 6204 */
MSG_WD_WATCH_UI,
MSG_WAVELET_VIDEO_ENCODER = 0x5001, /* encode the normal video data*/
MSG_WAVELET_SNAP_ENCODER, /* encode the snap video data*/
MSG_WAVELET_VIDEO_ENCODER_COMPELED, /* normal video data encode over */
MSG_WAVELET_SNAP_ENCODER_COMPELED, /* snap video data encode over */
MSG_SNAP_CAPTURE_OK, /* snap capture data ok */
MSG_WAVELET_SET_RATE, /* MODEM CONNECT rate set,
low 16 bit is rx, high 16 bit is tx */
MSG_WAVELET_VIDEO_DECODER, /* decode the normal video data*/
MSG_WAVELET_SNAP_DECODER, /* decode the snap video data*/
MSG_WAVELET_VIDEO_DECODER_COMPELED, /* decode normal data over */
MSG_WAVELET_SNAP_DECODER_COMPELED, /* decode snap data over */
MSG_WAVELET_ENCODER_COMPELED, /* ui to avi, need to send video data */
MSG_WAVELET_RCV_START, /* ui to avi, init data buffer for starting recieving data */
MSG_WAVELET_VIDEO_ENCODER_START, /* need to start encode */
MSG_WAVELET_VIDEO_DECODER_START,
MSG_SNAP_RECEIVING,
MSG_SNAP_RECEVICE_ERROR,
MSG_SNAP_SEND_OVER, /* snap send over, AVI->UI */
VIDEO_SNAP_SENDED_OK,
// MSG_WAVELET_INTIMACY_DECODER, /* decode the INTIMACY video data*/
// MSG_WAVELET_LOOPBACK_DECODER, /*decode in the loopback mode*/
MSG_UI_SET_WALLPAPER_COMPLETED,
MSG_UI_SET_WALLPAPER,
MSG_UI_SET_WALLPAPER_BACKGROUND_INIT,
MSG_PDU_LOSE = 0x60, /* H324 found lose error */
MSG_EXIT_V80, /* loss of carrier detected, return to command state */
MSG_RRN_INDICATE, /* indicate rate renegotiation */
MSG_RTN_INDICATE,
MSG_ERROR_V80, /* Proceeding data is invalid frame */
MSG_UNDERRUN,
MSG_OVERRUN,
MSG_SC_SETUP,
MSG_SC_CONNECT,
MSG_SC_RELEASE,
MSG_SC_RELEASECOMPLETE,
MSG_SC_FACILITY,
MSG_SC_FAILED,
MSG_SC_TIMEOUT,
MSG_SC_SRP,
MSG_SC_ERROR,
MSG_SC_SRPERROR,
MSG_SC_CHANGE_DATATYPE,
/* debug message */
MSG_DEBUG_IDLE = 0x1001, /* ARM cpu idle num debug */
MSG_DEBUG_IDLE_NUM, /* idle num result */
MSG_UART1_DATA, /* uart1 data ready */
MSG_DEBUG_LCD_SNAP, /* snap lcd display request */
MSG_DEBUG_RQST_SNAP, /* snap requestion from pc app. */
MSG_DEBUG_MODIFY_STATUS, /* modify phone status */
/*wanghong add*/
/*callreg interal message*/
MSG_UI_CHILD_SECOND_ENTER = 0X800,
MSG_UI_CHILD_FIRST_ENTER,
MSG_UI_CHILD_THIRD_ENTER,
MSG_UI_CHILD_FORTH_ENTER,
MSG_UI_CHILD_FIRST_EXIT,
MSG_UI_CHILD_SECOND_EXIT,
MSG_UI_CHILD_THIRD_EXIT,
MSG_UI_CHILD_FORTH_EXIT,
MSG_UI_APHONE_CALLER_ID,
MSG_UI_APHONE_CALL_MISSED,
MSG_UI_APHONE_CALL_END,
MSG_SKIP_CALLREG,
MSG_CLEAR_LAST_NOT_PICK ,
MSG_APHONE_STATBAR_REFRESH,
MSG_DATA_REFRESH,
MSG_DEFAULT_WALLPAER_REDRAW,
MSG_UI_RTC_GPIO
}TATTICA_MESSAGE_ID;
/* message length of UNSIGNED */
#define MSG_LENGTH 2
/* message id value is null */
#define MSG_ID_NULL 0x0000
/* message para value is null */
#define MSG_PARA_NULL 0x0000
/* system message object and object pointer definition */
typedef struct SYSTEM_MESSAGE
{
unsigned char src; /* the module message from */
unsigned char des; /* the modele message recieve */
unsigned short id; /* message id */
unsigned int para; /* message value */
} TSYSTEM_MESSAGE, *P_SYSTEM_MESSAGE;
/* system status define */
typedef enum SYSTEM_STATUS
{
UNDEF_SYS_STATUS = 0, /* undifed system status */
PHONE_OFF_HOOK, /* analog phone hang off */
PHONE_ON_HOOK, /* analog phone hang off */
PHONE_AV_LOOP, /* come into av loop */
PHONE_VIDEO_CALL, /* video call */
/*wanghong add*/
PHONE_RINGING = 0X100,
PHONE_ACALL
} TSYSTEM_STATUS;
#ifdef __cplusplus
} /* End of C declarations */
#endif
#endif //_LOCUST_DEFS_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -