os/kernelhwsrv/kerneltest/e32test/hcr/d_hcrut_psl_config.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-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 "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 // This file is part of the NE1_TB Variant Base Port
    15 // Hardware Configuration Respoitory Platform Specific Layer (PSL) 
    16 //
    17 
    18 
    19 /** 
    20 @file hcr_psl_config.h
    21 File provides dummy test configuration for HCR prototype developement. 
    22 Definitions will be replaced by real NE1 configuration later.
    23 
    24 @internalTechnology
    25 */
    26 
    27 // -- INCLUDES ----------------------------------------------------------------
    28 
    29 
    30 #include "hcr_hai.h"
    31 #include "hcr_uids.h"
    32 
    33 using namespace HCR;
    34 
    35 
    36 // -- GLOBALS -----------------------------------------------------------------
    37 
    38 #define STRING_TTEXT8  "Hardware Configuration Repository"
    39 
    40 
    41 const TUint8   gETypeData[] = {0x53, 0x79, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e};
    42 const TText8*  gETypeText8 = reinterpret_cast<const TText8*>(STRING_TTEXT8);
    43 const TInt64   gETypeInt64 = I64LIT(-0x200000020);
    44 const TUint64  gETypeUInt64 = UI64LIT(0x200000000);
    45 const TInt32   geTypeInt32A[] = { -2147483647, 0, 1, 2147483647 };
    46 const TUint32  geTypeUInt32A[] = { 101010, 0xffffffff, 0, 128, 0xfffffffe, 76 };
    47 const TInt32   geTypeInt32Az[] = { 0 };
    48 
    49 SSettingC gSettingsList[] = 
    50     {
    51     { { { KHCRUID_TestCategory1, 1}, ETypeInt32,   0x0000, 0 }, { { 2345123 }}},
    52     { { { KHCRUID_TestCategory1, 2}, ETypeInt16,   0x0000, 0 }, { { 32001 }}},
    53     { { { KHCRUID_TestCategory1, 3}, ETypeInt8,    0x0000, 0 }, { { -126 }}},
    54     { { { KHCRUID_TestCategory1, 4}, ETypeBool,    0x0000, 0 }, { { ETrue }}},
    55     { { { KHCRUID_TestCategory1, 5}, ETypeUInt32,  0x0000, 0 }, { { 0xaabbccdd }}},
    56     { { { KHCRUID_TestCategory1, 6}, ETypeUInt16,  0x0000, 0 }, { { 0x1122 }}},
    57     { { { KHCRUID_TestCategory1, 7}, ETypeUInt8,   0x0000, 0 }, { { 0x33 }}},
    58     { { { KHCRUID_TestCategory1, 9}, ETypeLinAddr, 0x0000, 0 }, { { 0x01008000 }}},
    59     
    60     { { { KHCRUID_TestCategory1, 10}, ETypeBinData,0x0000, sizeof(gETypeData) },   { { reinterpret_cast<TInt32>(gETypeData) }}},
    61     { { { KHCRUID_TestCategory1, 11}, ETypeText8,  0x0000, sizeof(STRING_TTEXT8) },  { { reinterpret_cast<TInt32>(gETypeText8) }}},
    62     { { { KHCRUID_TestCategory1, 13}, ETypeInt64,  0x0000, sizeof(gETypeInt64) },  { { reinterpret_cast<TInt32>(&gETypeInt64) }}},
    63     { { { KHCRUID_TestCategory1, 14}, ETypeUInt64, 0x0000, sizeof(gETypeUInt64) }, { { reinterpret_cast<TInt32>(&gETypeUInt64) }}},
    64 
    65     { { { KHCRUID_TestCategory1, 15}, ETypeArrayInt32,  0x0000, sizeof(geTypeInt32A) },  { { reinterpret_cast<TInt32>(&geTypeInt32A) }}},
    66     { { { KHCRUID_TestCategory1, 16}, ETypeArrayUInt32, 0x0000, sizeof(geTypeUInt32A) }, { { reinterpret_cast<TInt32>(&geTypeUInt32A) }}},
    67     { { { KHCRUID_TestCategory1, 17}, ETypeArrayInt32,  0x0000, sizeof(geTypeInt32Az) },  { { reinterpret_cast<TInt32>(&geTypeInt32Az) }}}
    68 
    69     };
    70 
    71 SRepositoryBase gHeader = 
    72     {
    73     HCR_FINGER_PRINT, 
    74     EReposCompiled, 
    75     KRepositoryFirstVersion,
    76     EReposReadOnly,
    77     (sizeof(gSettingsList)/sizeof(SSettingC))
    78     };
    79 
    80 GLDEF_C SRepositoryCompiled gRepository = 
    81     { 
    82     &gHeader, 
    83     gSettingsList 
    84     };
    85 
    86