navienginebsp/ne1_tb/hal/hal.cpp
changeset 0 5de814552237
equal deleted inserted replaced
-1:000000000000 0:5de814552237
       
     1 /*
       
     2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 * omap_hrp\h4\hal.cpp
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #include <kernel/hal_int.h>
       
    22 #include <u32std.h>
       
    23 
       
    24 //
       
    25 TInt GetDisplayNumberOfScreens(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny* aInOut)
       
    26 	{
       
    27 	TInt err = KErrNone;
       
    28 	TInt numberOfScreens = 0;
       
    29 	err = UserSvr::HalFunction(EHalGroupVariant, EVariantHalCurrentNumberOfScreens, &numberOfScreens, NULL);
       
    30 	if (err == KErrNone)
       
    31 		{
       
    32 		*(TInt*)aInOut=numberOfScreens;
       
    33 		}
       
    34 	return err;
       
    35 
       
    36 	}
       
    37 
       
    38 TInt GetSerialNumber(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny*aInOut)
       
    39 	{
       
    40 	TInt err = KErrNone;
       
    41 	TInt serialNumber = 0;
       
    42 	err = UserSvr::HalFunction(EHalGroupVariant, EVariantHalSerialNumber, &serialNumber, NULL);
       
    43 	if (err == KErrNone)
       
    44 		{
       
    45 		*(TInt*)aInOut=serialNumber;
       
    46 		}
       
    47 	return err;
       
    48 
       
    49 	}
       
    50 
       
    51 TInt GetInterruptNumber(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny*aInOut)
       
    52 	{
       
    53   	TInt err = KErrNone;
       
    54 	TInt interruptNumber = 0;
       
    55 	err = UserSvr::HalFunction(EHalGroupVariant, EVariantHalProfilingDefaultInterruptBase, &interruptNumber, NULL);
       
    56 	if (err == KErrNone)
       
    57 		{
       
    58 		*(TInt*)aInOut=interruptNumber;
       
    59 		}
       
    60 	return err;
       
    61 
       
    62 	}
       
    63