1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/include/e32hal.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,622 @@
1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32\include\e32hal.h
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __E32HAL_H__
1.22 +#define __E32HAL_H__
1.23 +#include <e32cmn.h>
1.24 +#include <e32cmn_private.h>
1.25 +
1.26 +/**
1.27 +@publishedPartner
1.28 +@deprecated No replacement.
1.29 +*/
1.30 +const TInt KMaxRomDevices=8;
1.31 +
1.32 +
1.33 +
1.34 +
1.35 +/**
1.36 +@publishedPartner
1.37 +@released
1.38 +
1.39 +Defines the calibration settings that can be restored by
1.40 +the digitiser's implementation of DDigitiser::RestoreXYInputCalibration.
1.41 +
1.42 +See the digitiser template port in:
1.43 +@code
1.44 +...\template\template_variant\specific\xyin.cpp
1.45 +@endcode
1.46 +
1.47 +@see DDigitiser::RestoreXYInputCalibration()
1.48 +*/
1.49 +enum TDigitizerCalibrationType
1.50 + {
1.51 + EFactory, /**< Restore to factory settings. */
1.52 + ESaved /**< Restore to saved settings. */
1.53 + };
1.54 +
1.55 +
1.56 +
1.57 +
1.58 +/**
1.59 +@publishedPartner
1.60 +@released
1.61 +
1.62 +Defines the screen coordinates of the point touched during calibration.
1.63 +
1.64 +An object of this type is passed, via a TPckgBuf, to the HAL handler
1.65 +that deals with the HAL group function-id pair:
1.66 +- EHalGroupDigitiser, EDigitiserHalSetXYInputCalibration
1.67 +- EHalGroupDigitiser, EDigitiserHalCalibrationPoints
1.68 +- EHalGroupDigitiser, EDigitiserHalRestoreXYInputCalibration
1.69 +
1.70 +@see EDigitiserHalSetXYInputCalibration
1.71 +@see EDigitiserHalCalibrationPoints
1.72 +@see EDigitiserHalRestoreXYInputCalibration
1.73 +@see TDigitiserHalFunction
1.74 +@see EHalGroupDigitiser
1.75 +@see TPckgBuf
1.76 +*/
1.77 +class TDigitizerCalibration
1.78 + {
1.79 +public:
1.80 + TPoint iTl; /**< Top left point.*/
1.81 + TPoint iBl; /**< Bottom left point. */
1.82 + TPoint iTr; /**< Top right point.*/
1.83 + TPoint iBr; /**< Bottom right point.*/
1.84 + };
1.85 +
1.86 +
1.87 +
1.88 +
1.89 +/**
1.90 +@publishedPartner
1.91 +@released
1.92 +
1.93 +An enum that identifies the full set of keyboard types.
1.94 +
1.95 +A variable of this type is defined and used in the TKeyboardInfoV01 struct.
1.96 +
1.97 +@see TKeyboardInfoV01::iKeyboardType.
1.98 +*/
1.99 +enum TKeyboard
1.100 + {
1.101 + EKeyboard_Keypad=1, /**< Keypad type*/
1.102 + EKeyboard_Full=2, /**< Full keyboard type*/
1.103 + };
1.104 +
1.105 +
1.106 +
1.107 +
1.108 +/**
1.109 +@publishedPartner
1.110 +@released
1.111 +
1.112 +Encapsulates information about the keyboard.
1.113 +
1.114 +NOTE that the information represented here is not used by Symbian OS,
1.115 +and exists to maintain binary compatibilty with older versions.
1.116 +
1.117 +However, keyboard drivers that implement the HAL handler for
1.118 +the EHalGroupKeyboard group still need to return a default object
1.119 +of this type.
1.120 +See the template port.
1.121 +
1.122 +An object of this type is passed, via a TPckgBuf, to the HAL handler
1.123 +that deals with the HAL group function-id pair:
1.124 +- EHalGroupKeyboard, EKeyboardHalKeyboardInfo;
1.125 +
1.126 +@see EKeyboardHalKeyboardInfo
1.127 +@see TKeyboardHalFunction
1.128 +@see EHalGroupKeyboard
1.129 +@see TPckgBuf
1.130 +*/
1.131 +class TKeyboardInfoV01
1.132 + {
1.133 +public:
1.134 + /**
1.135 + The number of device keys.
1.136 +
1.137 + NOTE that the information represented by this variable is not
1.138 + used by Symbian OS, and exists to maintain binary compatibility
1.139 + with older versions.
1.140 + */
1.141 + TInt iDeviceKeys;
1.142 +
1.143 +
1.144 + /**
1.145 + The number of application keys.
1.146 +
1.147 + NOTE that the information represented by this variable is not
1.148 + used by Symbian OS, and exists to maintain binary compatibility
1.149 + with older versions.
1.150 + */
1.151 + TInt iAppsKeys;
1.152 +
1.153 +
1.154 + /**
1.155 + Defines the type of keyboard available as enumerated by
1.156 + the TKeyboard enum.
1.157 +
1.158 + NOTE that the information represented by this variable is not
1.159 + used by Symbian OS, and exists to maintain binary compatibility
1.160 + with older versions.
1.161 +
1.162 + @see TKeyboard
1.163 + */
1.164 + TKeyboard iKeyboardType;
1.165 + };
1.166 +
1.167 +
1.168 +
1.169 +
1.170 +/**
1.171 +@publishedPartner
1.172 +@released
1.173 +
1.174 +Package buffer for a TKeyboardInfoV01 object.
1.175 +
1.176 +@see TKeyboardInfoV01
1.177 +*/
1.178 +typedef TPckgBuf<TKeyboardInfoV01> TKeyboardInfoV01Buf;
1.179 +
1.180 +
1.181 +
1.182 +
1.183 +/**
1.184 +@publishedPartner
1.185 +@released
1.186 +
1.187 +Encapsulates information about the digitiser.
1.188 +
1.189 +An object of this type is passed, via a TPckgBuf, to the HAL handler
1.190 +that deals with the HAL group function-id pair:
1.191 +- EHalGroupDigitiser, EDigitiserHalXYInfo;
1.192 +
1.193 +@see EDigitiserHalXYInfo
1.194 +@see TDigitiserHalFunction
1.195 +@see EHalGroupDigitiser
1.196 +@see TPckgBuf
1.197 +*/
1.198 +class TDigitiserInfoV01
1.199 + {
1.200 +public:
1.201 + TPoint iOffsetToDisplay;/**< The offset in pixels from the digitiser usable area to the display area. */
1.202 + TSize iDigitiserSize; /**< The width/height of the display in pixels as used by digitiser.*/
1.203 + };
1.204 +
1.205 +
1.206 +/**
1.207 +@publishedPartner
1.208 +@released
1.209 +Encapsulates extra information required by 3 dimensional pointing devices.
1.210 +*/
1.211 +class TDigitiserInfoV02 : public TDigitiserInfoV01
1.212 + {
1.213 +public :
1.214 + TInt iZRange; /**< The maximum distance to screen a pointing device will be detected (settable).*/
1.215 + TUint8 iThetaSupported; /**< A Boolean value that indicates if Theta polar angle detection (tilt) is supported.*/
1.216 + TUint8 iPhiSupported; /**< A Boolean value that indicates if Phi polar angle detection (tilt) is supported.*/
1.217 + TUint8 iAlphaSupported; /**< A Boolean value that indicates if rotation of the pointing device along its main axis is supported.*/
1.218 + TUint8 iPressureSupported; /**< A Boolean value that indicates if pressure applied on screen is supported.*/
1.219 + TInt iProximityStep; /**<proximity resolution, e.g. proximity readings change in steps of 1, 5, 10, ... */
1.220 + TInt iMaxPressure; /**< maximum pressure reading*/
1.221 + TInt iPressureStep; /**< pressure resolution, */
1.222 + TUint8 iMaxPointers; /**< max number of multi-touch pointers supported by hardware/driver.*/
1.223 + TUint8 iNumberOfPointers;/**< Number of pointers it supports (settable).*/
1.224 + };
1.225 +
1.226 +
1.227 +/**
1.228 +@publishedPartner
1.229 +@released
1.230 +
1.231 +Package buffer for a TDigitiserInfoV01 object.
1.232 +
1.233 +@see TDigitiserInfoV01
1.234 +*/
1.235 +typedef TPckgBuf<TDigitiserInfoV01> TDigitiserInfoV01Buf;
1.236 +
1.237 +/**
1.238 +@publishedPartner
1.239 +@prototype
1.240 +
1.241 +Package buffer for a TDigitiserInfoV02 object.
1.242 +
1.243 +@see TDigitiserInfoV02
1.244 +*/
1.245 +typedef TPckgBuf<TDigitiserInfoV02> TDigitiserInfoV02Buf;
1.246 +
1.247 +/**
1.248 +@publishedPartner
1.249 +@released
1.250 +
1.251 +Encapsulates information about the mouse display characteristics.
1.252 +
1.253 +An object of this type is passed, via a TPckgBuf, to the HAL handler
1.254 +that deals with the HAL group function-id pair:
1.255 +- EHalGroupMouse, EMouseHalMouseInfo;
1.256 +
1.257 +@see EMouseHalMouseInfo
1.258 +@see TMouseHalFunction
1.259 +@see EHalGroupMouse
1.260 +@see TPckgBuf
1.261 +*/
1.262 +class TMouseInfoV01
1.263 + {
1.264 +public:
1.265 + TInt iMouseButtons; /**< The number of mouse buttons.*/
1.266 + TPoint iOffsetToDisplay; /**< The offset in pixels from the mouse usable area to the display area.*/
1.267 + TSize iMouseAreaSize; /**< The width/height of the display in pixels as used by the mouse. */
1.268 + };
1.269 +
1.270 +
1.271 +
1.272 +
1.273 +/**
1.274 +@publishedPartner
1.275 +@released
1.276 +
1.277 +Package buffer for a TMouseInfoV01 object.
1.278 +
1.279 +@see TMouseInfoV01
1.280 +*/
1.281 +typedef TPckgBuf<TMouseInfoV01> TMouseInfoV01Buf;
1.282 +
1.283 +
1.284 +
1.285 +/**
1.286 +@publishedPartner
1.287 +@released
1.288 +
1.289 +Encapsulates Variant specific information.
1.290 +
1.291 +An object of this type is passed, via a TPckgBuf, to the HAL handler
1.292 +that deals with the HAL group function-id pair:
1.293 +- EHalGroupVariant, EVariantHalVariantInfo;
1.294 +
1.295 +@see EVariantHalVariantInfo
1.296 +@see TVariantHalFunction
1.297 +@see EHalGroupVariant
1.298 +@see TPckgBuf
1.299 +*/
1.300 +class TVariantInfoV01
1.301 + {
1.302 +public:
1.303 + /**
1.304 + The ROM version.
1.305 + */
1.306 + TVersion iRomVersion;
1.307 +
1.308 + /**
1.309 + The Id that uniquely identifies the device.
1.310 + */
1.311 + SInt64 iMachineUniqueId;
1.312 +
1.313 + /**
1.314 + The bits that represent the LED capabilities.
1.315 +
1.316 + NB capabilities in this context does not mean security capabilities.
1.317 + */
1.318 + TUint iLedCapabilities;
1.319 +
1.320 + /**
1.321 + The processor clock speed.
1.322 + */
1.323 + TInt iProcessorClockInKHz;
1.324 +
1.325 + /**
1.326 + The speed factor.
1.327 + */
1.328 + TInt iSpeedFactor;
1.329 + };
1.330 +
1.331 +
1.332 +
1.333 +
1.334 +/**
1.335 +@publishedPartner
1.336 +@released
1.337 +
1.338 +Package buffer for a TVariantInfoV01 object.
1.339 +
1.340 +@see TVariantInfoV01
1.341 +*/
1.342 +typedef TPckgBuf<TVariantInfoV01> TVariantInfoV01Buf;
1.343 +
1.344 +
1.345 +
1.346 +
1.347 +/**
1.348 +@publishedPartner
1.349 +@deprecated Use HAL::Get() from the HAL library instead with attributes ESystemStartupReason.
1.350 +
1.351 +The reason that the device last reset
1.352 +
1.353 +Note that not all reasons can occur on all devices.
1.354 +*/
1.355 +enum TMachineStartupType
1.356 + {
1.357 + EStartupCold,EStartupColdReset,EStartupNewOs,
1.358 + EStartupPowerFail,EStartupWarmReset,EStartupKernelFault,
1.359 + EStartupSafeReset
1.360 + };
1.361 +
1.362 +
1.363 +
1.364 +
1.365 +/**
1.366 +@publishedPartner
1.367 +@deprecated Use HAL::Get() from the HAL library instead with attributes EPen or EMouse.
1.368 +
1.369 +The XY input method supported
1.370 +*/
1.371 +enum TXYInputType
1.372 + {
1.373 + EXYInputNone,
1.374 + EXYInputPointer,
1.375 + EXYInputMouse,
1.376 + EXYInputDeltaMouse
1.377 + };
1.378 +
1.379 +
1.380 +
1.381 +/**
1.382 +@publishedPartner
1.383 +@deprecated Use HAL::Get() from the HAL library instead.
1.384 +
1.385 +Miscellaneous machine info.
1.386 +*/
1.387 +class TMachineInfoV1
1.388 + {
1.389 +public:
1.390 + TVersion iRomVersion;
1.391 + TXYInputType iXYInputType;
1.392 + TBool iKeyboardPresent;
1.393 + TBool iBacklightPresent;
1.394 + TSize iDisplaySizeInPixels;
1.395 + TSize iXYInputSizeInPixels;
1.396 + TSize iPhysicalScreenSize;
1.397 + TPoint iOffsetToDisplayInPixels;
1.398 + TInt iKeyboardId;
1.399 + TInt iDisplayId;
1.400 + SInt64 iMachineUniqueId;
1.401 + TUint iLedCapabilities;
1.402 + TInt iProcessorClockInKHz;
1.403 + TInt iSpeedFactor;
1.404 + TInt iMaximumDisplayColors;
1.405 + };
1.406 +/**
1.407 +@publishedPartner
1.408 +@deprecated
1.409 +*/
1.410 +typedef TPckgBuf<TMachineInfoV1> TMachineInfoV1Buf;
1.411 +
1.412 +
1.413 +
1.414 +
1.415 +/**
1.416 +@publishedPartner
1.417 +@deprecated Use HAL::Get() from the HAL library instead with attributes ELanguageIndex or EKeyboardIndex.
1.418 +
1.419 +Miscellaneous locale info.
1.420 +*/
1.421 +class TMachineInfoV2 : public TMachineInfoV1
1.422 + {
1.423 +public:
1.424 + TInt iLanguageIndex;
1.425 + TInt iKeyboardIndex;
1.426 + };
1.427 +/**
1.428 +@publishedPartner
1.429 +@deprecated
1.430 +*/
1.431 +typedef TPckgBuf<TMachineInfoV2> TMachineInfoV2Buf;
1.432 +
1.433 +
1.434 +
1.435 +
1.436 +/**
1.437 +@publishedPartner
1.438 +@deprecated Use HAL::Get() from the HAL library instead with attributes EMemoryRAM, EMemoryRAMFree or EMemoryROM.
1.439 +
1.440 +Miscellaneous memory info.
1.441 +*/
1.442 +class TMemoryInfoV1
1.443 + {
1.444 +public:
1.445 + TInt iTotalRamInBytes;
1.446 + TInt iTotalRomInBytes;
1.447 + TInt iMaxFreeRamInBytes;
1.448 + TInt iFreeRamInBytes;
1.449 + TInt iInternalDiskRamInBytes;
1.450 + TBool iRomIsReprogrammable;
1.451 + };
1.452 +/**
1.453 +@publishedPartner
1.454 +@deprecated
1.455 +*/
1.456 +typedef TPckgBuf<TMemoryInfoV1> TMemoryInfoV1Buf;
1.457 +
1.458 +
1.459 +
1.460 +
1.461 +/**
1.462 +@publishedPartner
1.463 +@deprecated No replacement.
1.464 +
1.465 +Miscellaneous ROM info.
1.466 +*/
1.467 +class TRomInfoEntryV1
1.468 + {
1.469 +public:
1.470 + enum TRomTypeV1
1.471 + {
1.472 + ERomTypeRom=0,
1.473 + ERomTypeFlash=1
1.474 + };
1.475 + TInt iSize; // size of ROM in bytes, 0=no ROM present
1.476 + TInt iWidth; // bus width in bits
1.477 + TInt iSpeed; // number of wait states
1.478 + TRomTypeV1 iType; // 0=ROM, 1=FLASH
1.479 + };
1.480 +
1.481 +
1.482 +
1.483 +
1.484 +/**
1.485 +@publishedPartner
1.486 +@deprecated No replacement.
1.487 +
1.488 +Miscellaneous ROM info.
1.489 +*/
1.490 +class TRomInfoV1
1.491 + {
1.492 +public:
1.493 + TRomInfoEntryV1 iEntry[KMaxRomDevices];
1.494 + };
1.495 +/**
1.496 +@publishedPartner
1.497 +@deprecated
1.498 +*/
1.499 +typedef TPckgBuf<TRomInfoV1> TRomInfoV1Buf;
1.500 +
1.501 +/**
1.502 +@publishedPartner
1.503 +@released
1.504 +*/
1.505 +const TUint KRuggedFileSystem=0x01;
1.506 +
1.507 +/**
1.508 +@publishedPartner
1.509 +@released
1.510 +*/
1.511 +class TDriveInfoV1
1.512 + {
1.513 +public:
1.514 + TInt iTotalSupportedDrives;
1.515 + TInfoName iDriveName[KMaxLocalDrives];
1.516 + TInt iTotalSockets;
1.517 + TInfoName iSocketName[KMaxPBusSockets];
1.518 + TInt iRuggedFileSystem;
1.519 + TUint iRegisteredDriveBitmask;
1.520 + };
1.521 +/**
1.522 +@publishedPartner
1.523 +@released
1.524 +*/
1.525 +typedef TPckgBuf<TDriveInfoV1> TDriveInfoV1Buf;
1.526 +
1.527 +#if defined(_UNICODE) && !defined(__KERNEL_MODE__)
1.528 +/**
1.529 +@publishedPartner
1.530 +@released
1.531 +*/
1.532 +class TDriveInfoV18
1.533 + {
1.534 +public:
1.535 + TInt iTotalSupportedDrives;
1.536 + TBuf8<KMaxInfoName> iDriveName[KMaxLocalDrives]; //TInfoName
1.537 + TInt iTotalSockets;
1.538 + TBuf8<KMaxInfoName> iSocketName[KMaxPBusSockets]; //TInfoName
1.539 + TInt iRuggedFileSystem;
1.540 + TUint iRegisteredDriveBitmask;
1.541 + };
1.542 +/**
1.543 +@publishedPartner
1.544 +@released
1.545 +*/
1.546 +typedef TPckgBuf<TDriveInfoV18> TDriveInfoV1Buf8;
1.547 +#else
1.548 +typedef TDriveInfoV1 TDriveInfoV18;
1.549 +typedef TDriveInfoV1Buf TDriveInfoV1Buf8;
1.550 +#endif
1.551 +
1.552 +/**
1.553 +@publishedPartner
1.554 +@released
1.555 +*/
1.556 +class TExcInfo
1.557 + {
1.558 +public:
1.559 + TAny *iCodeAddress;
1.560 + TAny *iDataAddress;
1.561 + TInt iExtraData;
1.562 + };
1.563 +
1.564 +#ifndef __KERNEL_MODE__
1.565 +#include <e32std.h>
1.566 +
1.567 +
1.568 +
1.569 +
1.570 +/**
1.571 +@publishedPartner
1.572 +@released
1.573 +
1.574 +A set of user side utility functions for acessing hardware related
1.575 +information.
1.576 +
1.577 +Four of these functions are DEPRECATED and should NOT be used; some of
1.578 +these functions have replacements, but others do not; see the description of
1.579 +the individual functions.
1.580 +
1.581 +The following functions are not deprecated, but are only used by Symbian
1.582 +OS as part of its internal implementation:
1.583 +- UserHal::FaultReason()
1.584 +- UserHal::ExceptionId()
1.585 +- UserHal::ExceptionInfo()
1.586 +- UserHal::PageSizeInBytes()
1.587 +- UserHal::TickPeriod()
1.588 +- UserHal::DriveInfo()
1.589 +- UserHal::SwitchOff()
1.590 +- UserHal::SetXYInputCalibration()
1.591 +- UserHal::CalibrationPoints()
1.592 +- UserHal::SaveXYInputCalibration()
1.593 +- UserHal::RestoreXYInputCalibration()
1.594 +*/
1.595 +class UserHal
1.596 + {
1.597 +public:
1.598 + // kernel group
1.599 + IMPORT_C static TInt MemoryInfo(TDes8& anInfo);
1.600 + IMPORT_C static TInt RomInfo(TDes8& anInfo);
1.601 + IMPORT_C static TInt StartupReason(TMachineStartupType& aReason);
1.602 + IMPORT_C static TInt FaultReason(TInt &aReason);
1.603 + IMPORT_C static TInt ExceptionId(TInt &anId);
1.604 + IMPORT_C static TInt ExceptionInfo(TExcInfo &aInfo);
1.605 + IMPORT_C static TInt PageSizeInBytes(TInt& aSize);
1.606 +
1.607 + // variant group
1.608 + IMPORT_C static TInt MachineInfo(TDes8& anInfo);
1.609 + IMPORT_C static TInt TickPeriod(TTimeIntervalMicroSeconds32& aPeriod);
1.610 +
1.611 + // media group
1.612 + IMPORT_C static TInt DriveInfo(TDes8& anInfo);
1.613 +
1.614 + // power group
1.615 + IMPORT_C static TInt SwitchOff();
1.616 +
1.617 + // digitiser group
1.618 + IMPORT_C static TInt SetXYInputCalibration(const TDigitizerCalibration& aCalibration);
1.619 + IMPORT_C static TInt CalibrationPoints(TDigitizerCalibration& aCalibration);
1.620 + IMPORT_C static TInt SaveXYInputCalibration();
1.621 + IMPORT_C static TInt RestoreXYInputCalibration(TDigitizerCalibrationType aType);
1.622 + };
1.623 +#endif
1.624 +#endif
1.625 +