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

📄 diagdiag.h

📁 free sources for gsm
💻 H
📖 第 1 页 / 共 3 页
字号:

  word port;                   /* number of port to output to */
  byte data;                   /* data to write to port */

DIAGPKT_REQ_END


/*==========================================================================

PACKET   DIAG_INPW_F

PURPOSE  Request sent from the DM to the DMSS to read a 16-bit word from an
         IO port

============================================================================*/
DIAGPKT_REQ_DEFINE( DIAG_INPW_F )

  word port;                   /* number of port to output to */

DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE( DIAG_INPW_F )

  word port;                   /* number of port to output to */
  word data;                   /* data to write to port */

DIAGPKT_REQ_END


/*===========================================================================

PACKET   diag_dipsw_req_type

ID       DIAG_DIPSW_F

PURPOSE  Sent by DM to retreive the current dip switch settings

RESPONSE DMSS performs the test, then responds.

===========================================================================*/
typedef PACKED struct
{
  byte cmd_code;
  word switches;
} diag_dipsw_req_type;

typedef diag_dipsw_req_type diag_dipsw_rsp_type;


/*==========================================================================

PACKET   DIAG_LOG_ON_DEMAND_F

PURPOSE  Request sent from the user to register a function pointer and 
         log_code with the diagnostic service for every log that needs 
         logging on demand support.
         
============================================================================*/
DIAGPKT_REQ_DEFINE( DIAG_LOG_ON_DEMAND_F )

   uint16 log_code;             /* The log_code to be sent */
   
DIAGPKT_REQ_END


DIAGPKT_RSP_DEFINE( DIAG_LOG_ON_DEMAND_F )

  uint16 log_code;             /* The log_code sent */
  uint8  status;               /* status returned from the function pointer */

DIAGPKT_RSP_END

/* Diagnostic extensions */
/*
** The maximum number of properties and callback functions. These are not
** used to determine the size of any data structure; they are used merely
** to guard against infinite loops caused by corruption of the callback
** and properties tables.
*/
#define DIAG_MAX_NUM_PROPS 20
#define DIAG_MAX_NUM_FUNCS 20

typedef void (*diag_cb_func_type) (
                                   unsigned char  *data_ptr,
                                   unsigned short  data_len,
                                   unsigned char  *rsp_ptr,
                                   unsigned short *rsp_len_ptr
);

typedef struct
{
   char             *name;
   diag_cb_func_type address;
} diag_cb_struct_type;

typedef struct
{
   char *name;
   void *address;
} diag_prop_struct_type;

typedef enum
{
  DIAG_EXTN_INVALID_GUID = 1,
  DIAG_EXTN_INVALID_SIZE,
  DIAG_EXTN_INVALID_ADDRESS,
  DIAG_EXTN_INVALID_NAME,
  DIAG_EXTN_INVALID_DATA
} diag_extn_err_type;


/*===========================================================================

PACKET   DIAG_GET_PROPERTY_F

PURPOSE  Sent by the DM to retrieve a specified number of bytes from
         memory starting at a specified location.

===========================================================================*/
#define DIAG_MAX_PROPERTY_SIZE 800
typedef PACKED unsigned long diag_guid_type[ 4 ];

DIAGPKT_REQ_DEFINE(DIAG_GET_PROPERTY_F)
  diag_guid_type guid;                     /* GUID for verification       */
  dword          address;                  /* Starting address in memory  */
  word           size;                     /* Number of bytes to retrieve */
DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE(DIAG_GET_PROPERTY_F)
  diag_guid_type guid;                    /* GUID for verification       */
  dword          address;                 /* Starting address in memory  */
  word           size;                    /* Number of bytes to retrieve */
  byte           data[ DIAG_MAX_PROPERTY_SIZE ]; /* Byte values          */
DIAGPKT_RSP_END


/*===========================================================================

PACKET   DIAG_PUT_PROPERTY_F

PURPOSE  Sent by the DM to set the values of a specified number of bytes
         in memory starting at a specified location.

===========================================================================*/
DIAGPKT_REQ_DEFINE(DIAG_PUT_PROPERTY_F)
  diag_guid_type guid;                   /* GUID for verification      */
  dword          address;                /* Starting address in memory */
  word           size;                   /* Number of bytes to set     */
  byte           data[ DIAG_MAX_PROPERTY_SIZE ]; /* Values             */
DIAGPKT_REQ_END

DIAGPKT_DEFINE_RSP_AS_REQ(DIAG_PUT_PROPERTY_F)

/*===========================================================================

PACKET   DIAG_GET_GUID_F

PURPOSE  Sent by the DM to retrieve the GUID (globally unique identifier)
         for the current build. This is stored during the build process.

===========================================================================*/
DIAGPKT_REQ_DEFINE(DIAG_GET_GUID_F)
DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE(DIAG_GET_GUID_F)
  diag_guid_type guid;               /* Globally unique identifier  */
DIAGPKT_RSP_END

/*===========================================================================

PACKET   DIAG_GET_PERM_PROPERTY_F

PURPOSE  Sent by the DM to retrieve the contents of a structure specified
         by name.

===========================================================================*/
#define DIAG_MAX_PROPERTY_NAME_SIZE 40

DIAGPKT_REQ_DEFINE(DIAG_GET_PERM_PROPERTY_F)
  diag_guid_type guid;                     /* GUID for verification       */
  byte           name[ DIAG_MAX_PROPERTY_NAME_SIZE ]; /* Structure name   */
  word           size;                     /* Number of bytes to retrieve */
DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE(DIAG_GET_PERM_PROPERTY_F)
  diag_guid_type guid;                     /* GUID for verification       */
  byte           name[ DIAG_MAX_PROPERTY_NAME_SIZE ]; /* Structure name   */
  word           size;                    /* Number of bytes to retrieve  */
  byte           data[ DIAG_MAX_PROPERTY_SIZE ]; /* Structure Contents    */
DIAGPKT_RSP_END

/*===========================================================================

PACKET   DIAG_PUT_PERM_PROPERTY_F

PURPOSE  Sent by the DM to fill in a structure specified by name.

===========================================================================*/
DIAGPKT_REQ_DEFINE(DIAG_PUT_PERM_PROPERTY_F)
  diag_guid_type guid;                   /* GUID for verification         */
  byte           name[ DIAG_MAX_PROPERTY_NAME_SIZE ]; /* Structure name   */
  word           size;                     /* Number of bytes of data     */
  byte           data[ DIAG_MAX_PROPERTY_SIZE ]; /* Values                */
DIAGPKT_REQ_END

DIAGPKT_DEFINE_RSP_AS_REQ(DIAG_PUT_PERM_PROPERTY_F)


#ifdef DEBUG_DIAG_TEST
#error code not present
#endif /* DEBUG_DIAG_TEST */

/*==========================================================================

PACKET   DIAG_EVENT_MASK_GET_F

PURPOSE  Request sent from the DM to the DMSS to retrieve the event mask.
============================================================================*/

typedef struct {
  diagpkt_header_type header;
  uint8 pad;
  uint16 reserved;
} event_mask_get_req_type;

typedef struct {
  diagpkt_header_type header;
  uint8 error_code;
  uint16 reserved;
  uint16 numbits;         /* number of bits in the mask           */
  unsigned char mask[1];  /* size of this field = (numbits + 7)/8 */
} event_mask_get_rsp_type;


#ifdef _SAMSUNG_MP_RTC_TIME

#define DIAG_RTC_SET_ITEM_SIZE  128
DIAGPKT_REQ_DEFINE(DIAG_RTC_SET_F)
 uint16 item;                         /* Which item - use nv_items_enum_type      */
 uint8  item_data[DIAG_RTC_SET_ITEM_SIZE]; /* Item itself - use nv_item_type    */
 uint16 status;                       /* Status of operation                      */
DIAGPKT_REQ_END

DIAGPKT_DEFINE_RSP_AS_REQ(DIAG_RTC_SET_F)


typedef enum{
 TEMP_RTC_TIME_SET = 0,
 TEMP_RTC_TIME_GET = 1,
 TEMP_POWER_RESET = 2,
 TEMP_POWER_DELAY_RESET = 3,

 TEMP_TEST_MAX = 200
}temp_items_enum_type;

/*  */
typedef PACKED struct { 
  word y;            /* Year [1980..2100]                            */
  word m;            /* Month of year [1..12]                        */
  word d;            /* Day of month [1..31] or day of year [1..366] */
  word h;            /* Hour of day [0..23]                          */
  word min;          /* Minute of hour [0..59]                       */
  word s;            /* Second of minute [0..59]                     */
  word d_of_week;    /* Day of the week [0..6] Monday..Sunday        */
} julian_type;

typedef PACKED union {
  julian_type 		rtc_time_set;
  dword			delay;
	
}temp_item_type;

#endif // _SAMSUNG_MP_RTC_TIME

#ifdef _SAMSUNG_MP_PRECONFIG//SEC_UI2_KKW_20050808_1

/*===========================================================================

PACKET   DIAG_FAC_PRECFG_SET_F
PURPOSE  BY Factory Preconfiguration, UE set Carriers Dependant value 
         of WAP/MMS/SMS/JAVA etc on getting only Country Name.

===========================================================================*/
DIAGPKT_REQ_DEFINE(DIAG_FAC_PRECFG_SET_F)
  word  country_name;                     /* country name */
DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE(DIAG_FAC_PRECFG_SET_F)
  word  country_name;                     /* country name */
DIAGPKT_RSP_END

/*===========================================================================

PACKET   DIAG_FAC_PRECFG_GET_F
PURPOSE  External Equipment get Preconfiguration value(country name) set by UE.

===========================================================================*/
DIAGPKT_REQ_DEFINE(DIAG_FAC_PRECFG_GET_F)
DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE(DIAG_FAC_PRECFG_GET_F)
  word  country_name;                     /* country name */
DIAGPKT_RSP_END

#endif //_SAMSUNG_MP_PRECONFIG

#ifdef _SAMSUNG_HW_TFLASH //sec_sysetem_Erik_051231_1
/*===========================================================================

PACKET   DIAG_TFS4_EXPLORER_ENA_F
PURPOSE  External Equipment get Preconfiguration value(country name) set by UE.

===========================================================================*/
DIAGPKT_REQ_DEFINE(DIAG_TFS4_EXPLORER_ENA_F)
DIAGPKT_REQ_END

DIAGPKT_RSP_DEFINE(DIAG_TFS4_EXPLORER_ENA_F)
  boolean status;                     /* country name */
DIAGPKT_RSP_END
  
  /*===========================================================================
  
  PACKET   DIAG_TFS4_EXPLORER_DIS_F
  PURPOSE  External Equipment get Preconfiguration value(country name) set by UE.
  
  ===========================================================================*/
  DIAGPKT_REQ_DEFINE(DIAG_TFS4_EXPLORER_DIS_F)
  DIAGPKT_REQ_END
  
  DIAGPKT_RSP_DEFINE(DIAG_TFS4_EXPLORER_DIS_F)
    boolean status;                     /* country name */
  DIAGPKT_RSP_END
#endif /* _SAMSUNG_HW_TFLASH */

/*==========================================================================

PACKET   DIAG_EVENT_MASK_SET_F

PURPOSE  Request sent from the DM to the DMSS to set the event mask.
============================================================================*/

typedef struct {
  diagpkt_header_type header;
  uint8 pad;
  uint16 reserved;
  uint16 numbits;         /* number of bits in the mask           */
  unsigned char mask[1];  /* size of this field = (numbits + 7)/8 */
} event_mask_set_req_type;

typedef struct {
  diagpkt_header_type header;
  uint8 error_code;
  uint16 reserved;
  uint16 numbits;         /* number of bits in the mask           */
  unsigned char mask[1];  /* size of this field = (numbits + 7)/8 */
} event_mask_set_rsp_type;

/* Error codes for the above two packets.
 */
#define EVENT_MASK_GENERAL_FAILURE 1
#define EVENT_MASK_ARRAY_TOO_SMALL 2
#define EVENT_MASK_ARRAY_TOO_BIG   3

#if defined(T_WINNT)
#error code not present
#endif

typedef  struct
    {
           byte cmd_code;               /* Command code */
           boolean  result;             /* True or False */
    } diag_reset_verify_rsp_type;

#endif /* DIAGDIAG_H */

⌨️ 快捷键说明

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