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

📄 stdmac.h

📁 蓝牙协议HCI层指令发送,主要用于测试HCI以下的代码及RF部分测试.
💻 H
字号:
//--------------------------------------------------------------- %FILH_BEG% --
//
//  Project:		$$ProjectName
//
//  File name:		stdmac.h	
//
//  Author:			 
//  Description:	  
//
//  Revision History:
//  $Log: $
//
//  Rev 1.01  12/21/00  EK .Added Afx.h header file to include CString type
//  Rev 1.00  15 July 2000 Initial release
//    
//
//  Copyright (c) TelenComm Corporation  2000   -   All rights reserved    
//--------------------------------------------------------------- %FILH_END% // BTHostDoc.cpp : implementation of the CBTHostDoc class
//
#ifndef STDTYPE_H
#define STDTYPE_H

// This file must be included for every .c or .cpp files
#ifdef _cplusplus
#include <iostream.h>
#else
#include <stdio.h>
#endif //_cplusplus
#include <assert.h>
#include "Afx.h"


//#define BT_DEBUG		// In release version this will be commented out
#define BT_UNUSED(a) a=a; //To avoid compiler warning for BT_UNUSED parameters.

//------------------------------------------------------------------------------
//
//  Standard types
//
//------------------------------------------------------------------------------

typedef unsigned char		UINT8;
typedef unsigned short int	UINT16;
typedef unsigned int		UINT32;
//typedef unsigned long int	UINT64;

typedef signed char			INT8;
typedef signed short int	INT16;
typedef signed int			INT32;
//typedef signed long int		INT64;

typedef UINT8*				PUINT8;
typedef UINT16*				PUINT16;
typedef UINT32*				PUINT32;
//typedef UINT64*				PUINT64;

typedef INT8*				  PINT8;
typedef INT16*				PINT16;
typedef INT32*				PINT32;
//typedef INT64*				PINT64;

struct sBD_ADDR 
{
  uint8   LAP[3];
  uint8   UAP;
  uint16  NAP;
};
typedef uint8  tPAGE_SCAN_PERIOD_MODE;
struct   sCLASS_OF_DEVICE
{
  uint8 devarr[3];
};

typedef uint16  tCLOCK_OFFSET;
typedef uint16  tCONNECTION_HANDLE;
typedef uint8   tLINK_TYPE;
typedef uint8   tENCRYPTION_MODE;  
typedef uint8   tREASON;
typedef uint16  tINTERVAL;      
struct sLMP_FEATURES    
{
  uint8   Lmp_Features[8];
};
//------------------------------------------------------------------------------
//
//  Declarations
//
//------------------------------------------------------------------------------
typedef uint8   tHCIEventOpCode;
typedef uint8   tHCIEventParameter;
typedef uint8   tHCIEventParameterLength;
typedef char*   tHCIEventSpecSection;
typedef char*   tHCIEventName;

typedef uint16  tHCI_ACLDataParameterLength;      
typedef uint8   tHCI_ACLDataParameter;

typedef uint8   tHCI_SCODataParameterLength;
typedef uint8   tHCI_SCODataParameter;


enum eBASE_BAND_PACKET_TYPE { eDM1=0x8,eDH1=0X10,eDM3=0x400,eDH3=0x800,eDM5=0x4000,eDH5=0x8000};//1 byte
enum ePAGE_SCAN_REP_MODE    { eR0,eR1,eR2};//1 byte
enum ePAGE_SCAN_MODE        {eMAN_PAGE_SCAN_MODE,eOPT_PAGE_SCAN_MODE1,eOPT_PAGE_SCAN_MODE2,eOPT_PAGE_SCAN_MODE3  };//1 byte
enum eROLL_SWITCH           {eALLOW_ROLE_SWITCH,eDISALLOW_ROLE_SWITCH  };//1 byte

typedef eBASE_BAND_PACKET_TYPE eBaseBandPacketType;
typedef tCONNECTION_HANDLE tConnectionHandle;
typedef ePAGE_SCAN_MODE ePageScanMode;
typedef ePAGE_SCAN_REP_MODE ePageScanRepMode;
//typedef  ;
//typedef  ;
#define FOR_LOOP(LoopVar,InitVal,LastVal) for( sint32 LoopVar = InitVal; LoopVar < (LastVal) ; LoopVar++ )

void BT_itoa(void* const pVal, int Size,char* buf);
void BT_ReverseStr(char* sBuf, char* const dBuf);
void DisplayByteStr(char* sBuf, CString& dBuf);
void OutBufferStr(void* const sBuf, CString& dBuf,int Size );

uint8 BT_atoi(char c);

#define CMD_EXECUTION_STS  1
#define CMD_COMPLETION_STS 2
#define CMD_CONNECTION_STS 3

//------------------------------------------------------------------------------

#endif //STDTYPE_H

⌨️ 快捷键说明

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