epoc32/include/bluetooth/hci/hciconsts.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 2006-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21 */
       
    22 
       
    23 #ifndef HCICONSTS_H
       
    24 #define HCICONSTS_H
       
    25 
       
    26 #include <e32def.h>
       
    27 #include <bluetooth/hci/hcitypes.h>
       
    28 #include <bluetooth/hci/hciframe.h>
       
    29 
       
    30 static const TUint8 KSCODefaultTransmissionInterval = 4;
       
    31 static const TUint8 KSCODefaultRetransmissionWindow = 0;
       
    32 static const TUint16 KSCODefaultRxPacketLength = 20;
       
    33 static const TUint16 KSCODefaultTxPacketLength = 20;
       
    34 
       
    35 static const TUint KHCIMaxEventSize = 257; // 255 + 2 header bytes
       
    36 
       
    37 // For backwards compatibility with HCI v1
       
    38 static const TUint16 KSCOTxDefaultPacketLength = KSCODefaultTxPacketLength;
       
    39 
       
    40 static const TAirMode KSCODefaultAirMode = ECVSD;
       
    41 
       
    42 static const THCIConnHandle KHCIMinimumHandle = 0x000; /*!< Minimum Handle. */
       
    43 static const THCIConnHandle KHCIBroadcastHandle	= 0xbca; /*!< Broadcast Handle. */
       
    44 static const THCIConnHandle KHCIMaximumHandle = 0xeff; /*!< Maximum Handle. */
       
    45 static const THCIConnHandle KInvalidConnectionHandle = 0xBADC; /*!< Invalid Connection Handle.  */
       
    46 
       
    47 static const TInt KHCILocalDeviceNameMaxLength = 248; /*!< Local Device Name Max Length. */
       
    48 static const TInt KHCIRemoteDeviceNameMaxLength = KHCILocalDeviceNameMaxLength; /*!< Remote device name max length. */
       
    49 
       
    50 static const TInt KHCIAFHChannelMapLength = 10; /*!< AFH Channel Map Length (in bytes, 1 bit per channel, 79 channels). */
       
    51 
       
    52 // Inquiry stuff - see page 562 of BT Standard 1.1
       
    53 static const TUint8  KHCIMaximumAmountOfInquiryTime = 0x30; /*!< Maximum amount of inquiry time. */
       
    54 
       
    55 // Event stuff
       
    56 static const TUint8  KHCIRemoteNameReqCompleteEventPacketLength = 255; /*!< Remote name request complete event packet length. */
       
    57 
       
    58 static const TUint16 KHCIClockOffsetValidBit = 1<<15; /*!< Clock offset valid bit. */
       
    59 
       
    60 // Constants Declaration
       
    61 static const TUint KHCIMajorVersionNumber=2;
       
    62 static const TUint KHCIMinorVersionNumber=0;
       
    63 static const TUint KHCIBuildVersionNumber=1;
       
    64 static const TUint16 KMaxConnectionAcceptTimeout=0xB540;
       
    65 static const TUint16 KMinConnectionAcceptTimeout=0x0001;
       
    66 static const TUint16 KMaxPageTimeout=0xFFFF;
       
    67 static const TUint16 KMinPageTimeout=0x0001;
       
    68 
       
    69 static const TUint16 KInvalidParameter=0xDEAD; 
       
    70 static const THCIConnHandle KHCILargestSupportedConnectionHandle=0x3eff; 
       
    71 
       
    72 static const TInt KHCIWriteLinkKeyNumKeysOffset = CHctlCommandFrame::KHCICommandPacketHeaderLength + 0;
       
    73 
       
    74 // used by the HCTL Rx Framer (only in hci_v1, hci_v2 hctls has their own configuration
       
    75 // of buffer size.
       
    76 static const TUint KHCIRecvBufSize=2048;
       
    77 static const TUint KHCISendBufSize=1024;	
       
    78 
       
    79 // "juice" consts
       
    80 enum TRemotePageScanRepetitionMode
       
    81 	{
       
    82 	EPageScanModeR0,
       
    83 	EPageScanModeR1,
       
    84 	EPageScanModeR2
       
    85 	};
       
    86 
       
    87 static const TInt KDefaultBluetoothPageScanRepMode = EPageScanModeR2; //R2 works better than R0: see DEF040531
       
    88 static const TInt KDefaultBluetoothPageScanMode = 0;
       
    89 static const TInt KDefaultBluetoothClockOffset = 0;
       
    90 static const TInt KDefaultBluetoothClassOfDevice = 0;
       
    91 
       
    92 #endif // HCICONSTS_H