/**
******************************************************************************************************************************************************************************************
*@file                       global.h
*@author         
*@data                       
*@version                    v1.0
*@par Copyright(c):
*
*@par History:
*     version:author,date,desc
*     v1.0   :create this file
*
*******************************************************************************************************************************************************************************************
*/
#ifndef GLOBAL_H
#define GLOBAL_H
 
#include "debug.h"
#include "btlist.h"
#include "buff.h"

#define PROT_HCI	1
#define PROT_L2CAP	2
#define PROT_SDP	3
#define PROT_RFCOMM	4
#define PROT_TCS	5
#define PROT_SPP	6
#define PROT_OBEX   7
#define PROT_BNEP   8
#define PROT_HCRP	9
#define PROT_PAN   	10
#define PROT_SWRAP	 11
#define PROT_HID	 12
#define PROT_PHONE	 13	
#define PROT_AVCTP	 14
#define PROT_AVDTP	 15
#define PROT_BIP	 16
#define PROT_GAVDP 	 17
#define PROT_A2DP 	 18
#define PROT_VDP 	 19
#define PROT_GOEP	 20
#define PROT_FTP	 21
#define PROT_OPP	 22
#define PROT_SYNC	 23
#define PROT_GAP	 24
#define PROT_SDAP	 25
#define PROT_HSP	 26
#define PROT_CTP	 27
#define PROT_ICP	 28	
#define PROT_HFP	 29
#define PROT_SDK	 9
#define PROT_DHCP	 10
#define PROT_AVRCP   14

#define MOD_FSM		31
#define MOD_SYSDEP	31
#define MOD_HANDLE	31
#define MOD_LIST	31
#define MOD_BUFF	31
#define MOD_GLOBAL  31

#define MAX_DEFINE_PER_PROTOCOL		100

#define PROT_HCI_BASE		((PROT_HCI-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_L2CAP_BASE		((PROT_L2CAP-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_SDP_BASE		((PROT_SDP-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_RFCOMM_BASE	((PROT_RFCOMM-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_TCS_BASE		((PROT_TCS-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_SPP_BASE		((PROT_SPP-1)*MAX_DEFINE_PER_PROTOCOL)
#define PROT_OBEX_BASE		((PROT_OBEX-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_BNEP_BASE		((PROT_BNEP-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_PAN_BASE		((PROT_PAN-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_HCRP_BASE		((PROT_HCRP-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_HID_BASE		((PROT_HID-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_AVCTP_BASE		((PROT_AVCTP-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_AVDTP_BASE		((PROT_AVDTP-1)*MAX_DEFINE_PER_PROTOCOL)	
#define PROT_BIP_BASE		((PROT_BIP-1)*MAX_DEFINE_PER_PROTOCOL)
#define PROT_GAVDP_BASE		((PROT_GAVDP-1)*MAX_DEFINE_PER_PROTOCOL)
#define PROT_A2DP_BASE		((PROT_A2DP-1)*MAX_DEFINE_PER_PROTOCOL)
#define PROT_VDP_BASE		((PROT_VDP-1)*MAX_DEFINE_PER_PROTOCOL)
#define PROT_HFP_BASE		((PROT_HFP-1)*MAX_DEFINE_PER_PROTOCOL)

/* Global variables */

#ifdef CONFIG_MEMORY_LEAK_DETECT
extern SYSTEM_LOCK len_lock;
#endif

#endif

