bluetooth/btstack/l2cap/l2constants.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Constants for L2CAP
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef L2CONSTANTS_H
       
    19 #define L2CONSTANTS_H
       
    20 
       
    21 #include <e32def.h>
       
    22 #include <e32base.h>
       
    23 #include <bluetooth/hci/hciopcodes.h>
       
    24 #include <bluetooth/hci/hciconsts.h>
       
    25 
       
    26 const TInt KL2CAPIncomingConnQueueSize=1;
       
    27 const TUid KUidServiceL2CAP={0x100095FB};
       
    28 
       
    29 //
       
    30 // L2CAP level constants
       
    31 //
       
    32 GLREF_C const TInt KHCIIncomingBufferCount;	// in linkconsts.h
       
    33 	
       
    34 const static TUint16 KL2CapSignallingCID 		= 0x0001;
       
    35 const static TUint16 KL2CapConnectionlessCID 	= 0x0002;
       
    36 const static TUint16 KL2CapDynamicCIDStart 		= 0x0040;
       
    37 const static TUint16 KL2CapDynamicCIDEnd 		= 0xffff;
       
    38 
       
    39 const static TUint16 KL2CapDynamicPSMStart 		= KMinUserPSM;
       
    40 
       
    41 const static TInt KL2ConfigRequestDelayTimout 	= 100000; // In MicroSeconds
       
    42 const static TInt KL2ConfigWatchdogTimeout 		= 120; // In Seconds
       
    43 
       
    44 const static TInt KL2ProtocolIdleTimeout 		= 2; 	// Seconds before the whole protocol dies
       
    45 const static TInt KL2CAPSockets 				= 100;
       
    46 
       
    47 const static TInt KL2ProtocolSecondTimerMultiplier = 1000000;
       
    48 const static TInt KL2MuxerIdleTimeout   		= 20;	// Seconds before Mux disconnects
       
    49 
       
    50 const static TUint16 KInfiniteFlush 			= 0xffff;
       
    51 const static TUint16 KL2CapMaxMTUSize			= 0xffff;
       
    52 const static TUint16 KL2CapDefaultMTUSize		= 672;
       
    53 const static TUint16 KL2CapPreferredMTUSize		= 5120;
       
    54 
       
    55 const static TUint16 KConfigOptionContinuationMask	= 0x0001; 	// c-bit
       
    56 
       
    57 const static TUint8 KOptionTypeIsHintMask  			= 0x80; 	// hint bit
       
    58 
       
    59 const static TInt KL2CapTxSeqValues = 64;	// the number of values that Tx Seq can take (valid values: 0-63)
       
    60 
       
    61 // The feature bits are (NS - not supported in our implementation):
       
    62 // 	Flow Control Mode	0x0001
       
    63 // 	Retransmission Mode	0x0002
       
    64 //	Bi-di QoS			0x0004 (NS)
       
    65 // 	Enhanced RTX Mode	0x0008
       
    66 // 	Streaming Mode		0x0010
       
    67 //  FCS Option			0x0020 (NS)
       
    68 static const TUint8 KL2CAPExtendedFeaturesSupported = 0x01 | 0x02 | 0x08 | 0x10;
       
    69 
       
    70 static const TUint8 KL2CAPExtendedHeaderSizeIncrease = 0x04;
       
    71 
       
    72 static const TUint16 KBBPacketSize[] = {17,27,54,83,121,183,224,339,367,552,679,1021};
       
    73 static const TUint16 KBaseBandPacketCount = sizeof(KBBPacketSize)/sizeof(KBBPacketSize[0]);
       
    74 
       
    75 #endif