⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wua_common.h

📁 wi-fi手机原代码
💻 H
字号:
/********************************************************************
    created:    2005/05/20
    filename:   wua_common.h
    file path:
    file base:
    file ext:
    author:     Ouyang Lei

    purpose:
        This file contain common definition of WUA Module.
*********************************************************************/
#ifndef _M_WUA_H_
#define _M_WUA_H_

#include "define.h"
#include "porting.h"

extern MSG_Q_ID        MSG_Q_WUA;

typedef enum
{
    MODULE_NULL=0,
    MODULE_MMI,
    MODULE_WUA,

    /* add new module id above this line */ 
    MODULE_END
} module_id_e;

#if 0
typedef enum
{
    KEY_MMI=0,
    MMI_MMI,
    TIMER_MMI, 
    PM_MMI,
    MMI_PM,
    RTC_MMI,
    ANALOG_MMI,
    TFTP_MMI,
    FLIP_MMI,
    RSSI_PM,

    /* MMI <-> WUA */
    MMIWUA_GET_REQ,
    WUAMMI_GET_RSP,
    WUAMMI_USER_INPUT_REQ,
    MMIWUA_USER_INPUT_RSP,


    /* add new primitive above this line */ 
    PRIMITIVE_END
} primitive_e;
#endif

typedef struct qbuf_s
{
    char   *data_p;         /* pointer to beginning of user data */
    U16     data_size;      /* size of user data in bytes */
    U16     primitive;      /* defined in primitive_e */
    U8      source;         /* indicating sender process  */

    U8      buffer_retain;
#define BUFFER_FREE     0   /* buffer is freed after usage */
#define BUFFER_RETAIN   1   /* buffer is retained after usage */

    U8      padding[2];     /* MUST BE LAST AND FILL TO 32-BIT BOUNDARY! */

} qbuf_t;


/* structure for bbuf[12] in MsgMMI */
typedef struct
{
    int size;
    void* ptr;
    int buffer_retain;
} mmi_msg_body_format_t;



/* -- defination and declaration for script download function
      In WF10 project, the following blocks should be duplicated to xxx.h */
//#define SCRIPT_DIR "/flash/script/"
#define MAX_SCRIPT_SIZE 2048
#define MAX_SCRIPT_NAM_LEN 20
typedef struct {
    char count;
    char default_file;
    char file1[MAX_SCRIPT_NAM_LEN];
    char file2[MAX_SCRIPT_NAM_LEN];
    char file3[MAX_SCRIPT_NAM_LEN];
    char file4[MAX_SCRIPT_NAM_LEN];
} script_info_t;
extern int wua_get_scriptfile_info(script_info_t*);
extern int wua_validate_script (char*, int);
extern int wua_set_dft_script (char);
extern int wua_get_dft_script (char*);
extern FILE* wua_fopen (char, const char*, const char*);
extern int wua_fclose (FILE *);
extern int wua_fread (void *, int, int, FILE*);
extern int wua_fwrite (const void *, int size, int count, FILE *);
extern int wua_rename(char, const char*);
extern int wua_backup(char index);
extern int wua_recover(char index);

/* --  */




#endif /* #ifndef _M_WUA_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -