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

📄 oppserver.h

📁 通过蓝牙实现OPP功能。。 比如和NOKIA MOTO的蓝牙手机 对传名片
💻 H
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004-2006
Part of BlueLab 3.6.2-release

FILE NAME
    OPPServer.h
    
DESCRIPTION
 Main header file for an OPP Server application.
*/

#ifndef OPPSERVER_H_
#define OPPSERVER_H_

#include <stream.h>

/* Button to shutdown the OPP Server */
#define BUTTON_SHUTDOWN (1<<2)

/* PSKEY to store the maximum packet size */
#define PSKEY_MAX_PACKET 10

/* Default maximum size of packet that this server can support */
#define OPPS_MAX_PACKET_SIZE 255

/* Buffer size to use with vGen to generate the vCard */
#define VGEN_BUFFER_SIZE 40

/* DEBUG Print support */
#ifdef OPPS_SVR_DEBUG
	#include <stdio.h>
	#define SVR_DEBUG(x) {printf("OPP: "); printf x;}
#else
	#define SVR_DEBUG(x)
#endif

#ifdef OPPS_CON_DEBUG
	#include <stdio.h>
	#define CON_DEBUG(x) {printf("CON: "); printf x;}
#else
	#define CON_DEBUG(x)
#endif

#if defined(OPPS_CON_DEBUG) || defined(OPPS_SVR_DEBUG) || defined(OPPS_GEN_DEBUG)
	#include <stdio.h>
	#define GEN_DEBUG(x) {printf x;}
#else
	#define GEN_DEBUG(x)
#endif

typedef struct 
{
	TaskData OppTask;
	OPPS *session;

	bool connected;
	bool shutdown;

	uint16 pktSize;
	
	void *vGenWS; /* vGen Workspace */
	uint8 buffer[VGEN_BUFFER_SIZE];
} tOPPState;

typedef struct 
{
	TaskData ConTask;
} tMainState;

void opp_initTask(tOPPState *state);

#endif /* OPPSERVER_H_ */

⌨️ 快捷键说明

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