mbusloc.h

来自「Nokia手机M2Bus通讯协议底层程序.对手机编程开发人员有用」· C头文件 代码 · 共 76 行

H
76
字号

/********************************************************************
* NAME:                                                             *
*                                                                   *
* PURPOSE:                                                          *
*                                                                   *
* GLOBAL VARIABLES:                                                 *
*                                                                   *
* Variable:                                                         *
*                                                                   *
* Type:                                                             *
*                                                                   *
* Description:                                                      *
*                                                                   *
*                                                                   *
* DEVELOPMENT HISTORY:                                              *
*                                                                   *
* Date:                                                             *
*                                                                   *
* Author:                                                           *
*                                                                   *
* Change Id:                                                        *
*                                                                   *
* Release:                                                          *
*                                                                   *
* Description of change:                                            *
*                                                                   *
*********************************************************************/

#ifndef __mbus_loc_h
#define __mbus_loc_h

#define RETRY_TIMES 10

#define FBUS_DEVICE_PHONE   0x00 /* Nokia mobile phone. */

#define FBUS_FRTYPE_ACK     0x7f /* Acknowledge of the received frame. */

/* This byte is at the beginning of all GSM Frames sent over MBUS to Nokia
   phones. */
#define MBUS_FRAME_ID       0x1f

/* Our PC (MBUS). */
#define MBUS_DEVICE_PC1     0x10

#define MBUS_MAX_CONTENT_LENGTH  (1000)

#define MBUS_MSID_LEN 16
#define MBUS_MSID_CMD 0xb4
#define MBUS_MSID_CMD_STR "\xb4"

typedef struct {
                UINT8 U8lockstype;
                UINT8 U8locksclosed;
                UINT16 U16dummy;
                UINT8 U8locksinfo[12];
               } tSIMLOCKINFO;

#define MBUS_MAX_SIMLOCKS 4
static const UINT8 MBUS_SIMLOCKLEN[] = {5,10,4,4};
static const UINT8 MBUS_SIMLOCKPOS[] = {0,5,16,20};
static const UINT8 MBUS_SIMLOCKINDEX[] = {1,4,2,3};

typedef struct 
{
  COMMTIMEOUTS newcommtimeouts, oldcommtimeouts;
  UINT32 U32writtenbytes, U32receivedbytes;
  SINT32 S32replyoffset;
  UINT8 U8sequencenumber;
  UINT8 U8comport;
  UINT8 U8phoneid;
  BOOL Binitialized;
  UINT16 U16comdelay;
} tMBUS_CONFIG;

#endif

⌨️ 快捷键说明

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