1 // Copyright (c) 1995-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #ifndef __HAL_DATA_H__
19 #define __HAL_DATA_H__
31 Sets of attributes and values used by HAL functions.
36 A set of enumerators that identifies hardware attributes.
37 The enumerators are passed to HAL::Get() and HAL::Set().
39 They are also used by the HAL accessor functions.
47 Identifies the manufacturer of a device.
48 If this is not enumerated in TManufacturer, then the manufacturer must
49 obtain a value from the Symbian registry.
51 @see HALData::TManufacturer
57 The device specific hardware version number, as defined by
58 the device manufacturer.
60 EManufacturerHardwareRev,
64 The device specific version number, as defined by
65 the device manufacturer.
67 EManufacturerSoftwareRev,
71 The device specific software version number, as defined by
72 the device manufacturer.
74 EManufacturerSoftwareBuild,
78 This is device specific model number, as defined by
79 the device manufacturer.
85 This is the device specific UID, It is unique to the class /model
86 of device. A value must be obtained from Symbian's UID registry for
93 The Symbian OS specified device family identifier.
94 If the device family is not one of those enumerated by TDeviceFamily,
95 then the licensee must obtain a UID from Symbian for this attribute.
97 @see HALData::TDeviceFamily
103 The Symbian OS specified device family version
109 The CPU architecture used by this device. The values are enumerated
118 A revision number for the CPU architecture.
124 This is the default ABI used by CPU for user applications.
125 The values are enumerated by HALData::TCPUABI.
131 The processor speed in KHz.
137 The reason for most recent system boot.
138 This is dynamic and readonly; the values are enumerated by
139 TSystemStartupReason.
141 @see HALData::TSystemStartupReason
143 ESystemStartupReason,
147 This is the last exception code, in the case of system reboot.
148 This is dynamic and readonly.
154 The time between system ticks, in microseconds.
160 The total system RAM, in bytes.
166 The currently free system RAM.
168 This is dynamic and readonly.
174 The total System ROM, in bytes.
180 The MMU page size in bytes.
186 Indicates the state of the power supply.
189 1 = Power is good (i.e. external power is available,
190 or the 'power' battery is >= low);
193 This is dynamic and readonly.
199 The System (or 'Main') battery power level.
200 The allowable values are enumerated by TPowerBatteryStatus
202 This is dynamic and readonly,
204 @see HALData::TPowerBatteryStatus
210 Indicates whether a backup power supply is available.
212 0 = the device does not support (or need) a backup battery source;
213 1 = a backup batter source is present.
214 This is dynamic and readonly
220 The power level for backup power
222 It has the values enumerated by TPowerBackupStatus.
224 This is dynamic and readonly.
226 @see HALData::TPowerBackupStatus
232 Indicates the state of the external power.
235 0 = external power is not in use;
236 1 = external power is in use.
238 This is dynamic and readonly.
244 A bitmask that describes the available keyboard types (it may support
247 @see HALData::TKeyboard
263 Indicates whether the device can produce a click sound for
267 0 = the device cannot produce a click sound for each keypress;
268 1 = the device can produce a click sound.
274 The state of keyboard clicking.
277 0 = key click disabled;
278 1 = key click enabled.
280 This is dynamic and writeable.
282 @capability WriteDeviceData needed to Set this attribute
288 The keyboard click volume level.
290 It can take a value in the range 0 to EkeyboardClickVolumeMax.
292 This is dynamic and writeable.
294 @see HALData::EkeyboardClickVolumeMax
296 @capability WriteDeviceData needed to Set this attribute
298 EKeyboardClickVolume,
302 The maximum value for EKeyboardClickVolume.
304 @see HALData::EkeyboardClickVolume
306 EKeyboardClickVolumeMax,
310 The screen horizontal dimension in pixels.
316 The screen vertical dimension in pixels.
322 The screen horizontal dimension in twips.
328 The screen vertical dimension in twips.
334 The number of hues (colors or shades of grey) displayable on
341 The state of the display.
344 0 = screen is turned off;
347 This is dynamic and writeable.
349 @capability PowerMgmt needed to Set this attribute
355 The screen contrast level.
356 It can take a value in the range 0 to EDisplayContrastMax.
358 This is dynamic and writeable
360 @see HALData::EDisplayContrastMax
362 @capability WriteDeviceData needed to Set this attribute
368 The maximum value for EDisplayContrast
370 @see HALData::EDisplayContrast
376 Indicates whether there is a backlight on the device.
379 0 = there is no screen backlight;
380 1 = a screen backlight is present.
386 The current status of the backlight.
392 This is dynamic and writeable.
394 @capability WriteDeviceData needed to Set this attribute
400 Indicates whether a pen or digitizer is available for input.
403 0 = a pen/digitizer is not available for input;
404 1 = a pen/digitizeris present.
410 The pen/digitizer horizontal resolution, in pixels.
416 The is the pen/digitizer vertical resolution, in pixels.
422 Indicates whether a pen tap will turn the display on.
425 0 = a pen tap has no effect;
426 1 = a pent tap or press enables the display.
428 The is dynamic and writeable
430 @capability WriteDeviceData needed to Set this attribute
436 Indicates whether the device can produce a click sound for
440 0 = the device cannot produce a click sound
441 1 = production of a click sound is supported by the device.
447 The state of pen clicking.
450 0 = pen clicking is disabled;
451 1 = pen clicking is enabled.
453 This is dynamic and writable.
455 @capability WriteDeviceData needed to Set this attribute
461 This pen click volume level.
462 It can take a value in the range 0 to EPenClickVolumeMax.
464 This value is dynamic and writable.
466 @see HALData::EPenClickVolumeMax
468 @capability WriteDeviceData needed to Set this attribute
474 The maximum value for EPenClickVolume.
476 @see HALData::EPenClickVolume
482 Indicates whether a mouse is available for input.
485 0 = there is no mouse availablea pen/digitizeris present;
486 1 = a mouse is available for input.
492 The mouse horizontal resolution, in pixels.
498 The mouse vertical resolution, in pixels.
504 Describes the mouse cursor visibility.
506 The value is enumerated by TMouseState.
508 This is dynamic and writable.
509 @see HALData::TMouseState
511 @capability MultimediaDD needed to Set this attribute
517 Reserved for future use.
518 @capability MultimediaDD needed to Set this attribute
524 Reserved for future use.
525 @capability MultimediaDD needed to Set this attribute
531 The number of buttons on the mouse.
537 A bitmask defining the state of each button .
539 For each bit, it has values:
543 This is dynamic and read only.
549 Defines the state of the case.
555 This is dynamic and read only.
561 Indicates whether the device has a case switch, that actions when
562 the case opens and closes.
572 Indicates whether the device is to switch on when case opens.
575 0 = disable device switchon when the case opens;
576 1 = enable device switchon when the case opens.
578 This is dynamic and writeable.
580 @capability WriteDeviceData needed to Set this attribute
582 ECaseSwitchDisplayOn,
586 Indicates whether the device is to switch off when case close.
589 0 = disable device switchoff when the case closes;
590 1 = enable device switchoff when the case closes.
592 This is dynamic and writeable.
594 @capability WriteDeviceData needed to Set this attribute
596 ECaseSwitchDisplayOff,
600 The number of LEDs on the device.
606 A bitmask defining the state of each LED.
608 For each bit, it has values:
612 This is dynamic and writeable.
618 Indicates how the phone hardware is connected.
621 0 = phone hardware is not permanently connected;
622 1 = phone hardware is permanently connected.
628 @capability WriteDeviceData needed to Set this attribute
635 EDisplayBrightnessMax,
639 Inidcates the state of the keyboard backlight.
642 0 = keyboard backlight is off;
643 1 = keyboard backlight is on.
645 This is dynamic and writeable.
647 @capability PowerMgmt needed to Set this attribute
649 EKeyboardBacklightState,
653 Power supply to an accessory port.
656 0 = turn off power to an accessory port on the device;
659 This is dynamic and writeable.
661 @capability PowerMgmt needed to Set this attribute
667 A 2 decimal digit language index.
669 It is used as the two digit language number that is the suffix of
670 language resource DLLs, e.g ELOCL.01.
672 The locale with this language index is loaded the next time that
675 This is dynamic and writeable.
679 @capability WriteDeviceData needed to Set this attribute
685 A 2 decimal digit (decimal) language keyboard index.
686 It is used as the two digit language number that is the suffix of
687 language resource DLLs, e.g. EKDATA.01.
691 @capability WriteDeviceData needed to Set this attribute
697 The maximum allowable size of RAM drive, in bytes.
703 Indicates the state of the keyboard.
706 0 = keyboard is disabled;
707 1 = Keyboard is enabled.
709 This is dynamic and writeable.
711 @capability PowerMgmt needed to Set this attribute
716 Defines the system drive & custom resource drive.
717 Legacy attribute which is no longer supported.
719 @deprecated Attribute is no longer the primary mechanism to define the
720 System Drive or the Custom Resource Drive.
721 @see RFs::GetSystemDrive.
722 @see BaflUtils::NearestLanguageFile
723 @see HALData::ECustomResourceDrive
728 Indicates the state of the pen or digitiser.
731 1 = pen/digitiser is enabled;
732 0 = pen/digitiser is disabled.
734 This is dynamic and writeable.
736 @capability PowerMgmt needed to Set this attribute
742 On input: aInOut contains the mode number.
743 On output: aInOut contains: 0 = display is colour;
744 1 = display is black & white.
746 aInOut is the 3rd parameter passed to accessor functions
747 for derived attributes.
753 On input: aInOut contains the mode number;
754 On output, aInOut contains: 0 = display is not palettised;
755 1 = display is palettised.
757 aInOut is the 3rd parameter passed to accessor functions
758 for derived attributes.
760 EDisplayIsPalettized,
764 The display bits per pixel.
766 On input, aInOut contains the mode number.
767 On output, aInOut contains the bits per pixel for that mode.
769 aInOut is the 3rd parameter passed to accessor functions
770 for derived attributes.
772 It is read only data.
774 EDisplayBitsPerPixel,
778 The number of display modes available.
784 The address of the display memory.
786 EDisplayMemoryAddress,
790 The offset, in bytes, to the pixel area of the screen from the start of screen memory.
792 This is used to account for the fact that the palette is sometimes at
793 the beginning of the display memory.
795 On input, aInOut contains the mode number.
796 On output, aInOut contains the offset to the first pixel for that mode.
798 aInOut is the 3rd parameter passed to accessor functions
799 for derived attributes.
801 EDisplayOffsetToFirstPixel,
805 The separation, in bytes, of successive lines of display in memory.
807 On input, aInOut contains the mode number.
808 On output, aInOut contains the display offset between lines.
810 aInOut is the 3rd parameter passed to accessor functions
811 for derived attributes.
813 EDisplayOffsetBetweenLines,
817 @capability MultimediaDD needed to Set this attribute
819 EDisplayPaletteEntry,
824 1 = order of pixels in display is RGB;
827 EDisplayIsPixelOrderRGB,
832 1 = pixel order is landscape;
833 0 = pixel order is portrait.
835 EDisplayIsPixelOrderLandscape,
839 This indicates or sets the current display mode where
840 EDisplayNumModes-1 is the maximum value for the display mode.
841 The properties of a particular display mode are entirely defined by
842 the base port software associated with the hardware upon which the OS
845 @capability MultimediaDD needed to Set this attribute
851 If the target hardware upon which Symbian OS is running has switches
852 which can be read by the base port software, this interface allows
853 the current status of those switches to be read.
859 The port number of the debug port.
865 The language code of the Locale which was loaded at device boot time.
867 This is dynamic and writeable.
871 @capability WriteSystemData needed to Set this attribute
877 The drive number to use for storage of Clipboard data.
878 0 = Drive A, 1 = Drive B, etc...
884 @capability PowerMgmt
889 Custom restart reason
891 ECustomRestartReason,
894 The number of screens.
896 EDisplayNumberOfScreens,
899 The time between nanokernel ticks, in microseconds.
904 The frequency of the fast counter.
906 EFastCounterFrequency,
909 Indicates the whether the fast counter counts up or down.
911 EFastCounterCountsUp,
916 Indicates whether a 3 dimensional pointing device is available for input.
919 0 = a 3D pointer is not available for input;
920 1 = a 3D pointer is present.
927 The 3D pointing device detection range, in units of distance above the screen.
929 This is dynamic and writeable.
936 Indicates whether a 3 dimensional pointing device supports Theta polar angle reading.
939 0 = a 3D pointer does not support Theta polar angle reading;
940 1 = a 3D pointer supports Theta polar angle reading.
942 EPointer3DThetaSupported,
947 Indicates whether a 3 dimensional pointing device supports Phi polar angle reading.
950 0 = a 3D pointer does not support Phi polar angle reading;
951 1 = a 3D pointer supports Phi polar angle reading.
953 EPointer3DPhiSupported,
958 Indicates whether a 3 dimensional pointing device supports rotation angle along its main axis reading.
961 0 = a 3D pointer does not support alpha (rotation) reading;
962 1 = a 3D pointer supports alpha (rotation) reading.
964 EPointer3DRotationSupported,
969 Indicates whether a 3 dimensional pointing device supports readings of pressure applied on screen.
972 0 = a 3D pointer does not support pressure reading;
973 1 = a 3D pointer supports pressure reading.
975 EPointer3DPressureSupported,
978 Indicates whether hardware floating point is available, and what type.
980 If no hardware floating point is available, reading this attribute will return KErrNotSupported.
981 If hardware floating point is available, reading this attribute will return KErrNone and the type
982 available. These types are specified in TFloatingPointType.
984 EHardwareFloatingPoint,
987 The offset between secure and nonsecure clocks. If this attribute is undefined no secure clock
990 ETimeNonSecureOffset,
993 Persist startup mode.
995 If no variant specific implementation exists, the startup mode will be stored in platform
996 specific values.hda file.
998 EPersistStartupModeKernel,
1001 Maximum restart reasons.
1003 Returns the maximum number of values that can be used to store the restart reason required for a custom restart.
1005 EMaximumCustomRestartReasons,
1008 Maximum startup modes.
1010 Returns the maximum number of values that can be used to store the startup mode requires for a system restart.
1012 EMaximumRestartStartupModes,
1015 Defines the custom resource drive.
1017 This drive attribute should be set if an aditional drive is required for use in the search
1018 algorithm for language files.
1021 @see BaflUtils::NearestLanguageFile for how this attribute is used
1022 @capability WriteDeviceData needed to Set this attribute
1024 ECustomResourceDrive,
1027 The number of HAL attributes per screen.
1029 It is simply defined by its position in the enumeration.
1037 Defines properties for the hardware attributes.
1039 @see HALData::TAttribute
1041 enum TAttributeProperty
1044 When set, means that an attribute is meaningful on this device.
1053 When set, means that an attribute is modifiable.
1054 A call to HAL::Set() for an attribute that does not have this property,
1055 returns KErrNotSupported.
1066 UIDs for a defined set of device manufacturers.
1068 Note that any manufacturer not represented in this list must obtain
1069 a value from the Symbian registry.
1071 @see HALData::TAttribute
1073 enum TManufacturer // UID for manufacturer
1075 EManufacturer_Ericsson=0x00000000,
1076 EManufacturer_Motorola=0x00000001,
1077 EManufacturer_Nokia=0x00000002,
1078 EManufacturer_Panasonic=0x00000003,
1079 EManufacturer_Psion=0x00000004,
1080 EManufacturer_Intel=0x00000005,
1081 EManufacturer_Cogent=0x00000006,
1082 EManufacturer_Cirrus=0x00000007,
1083 EManufacturer_Linkup=0x00000008,
1084 EManufacturer_TexasInstruments=0x00000009,
1085 // New manufacturers must obtain an official UID to identify themselves
1091 Defines the Symbian OS device families.
1093 @see HALData::TAttribute
1097 EDeviceFamily_Crystal,
1098 EDeviceFamily_Pearl,
1099 EDeviceFamily_Quartz,
1105 Defines the set of CPU architectures.
1107 @see HALData::TAttribute
1119 Defines the set of ABIs used by the CPU for user applications.
1121 @see HALData::TAttribute
1137 Defines the set of reasons for a system boot.
1139 @see HALData::TAttribute
1141 enum TSystemStartupReason
1143 ESystemStartupReason_Cold,
1144 ESystemStartupReason_Warm,
1145 ESystemStartupReason_Fault,
1151 Defines the set of available keyboard types.
1153 @see HALData::TAttribute
1157 EKeyboard_Keypad=0x1,
1164 Defines the mouse cursor visibility.
1166 @see HALData::TAttribute
1170 EMouseState_Invisible=0,
1171 EMouseState_Visible=1,
1177 Defines a set of UIDs for specific devices, reference boards etc
1179 @see HALData::TAttribute
1183 EMachineUid_Series5mx=0x1000118a,
1184 EMachineUid_Brutus=0x10005f60,
1185 EMachineUid_Cogent=0x10005f61,
1186 EMachineUid_Win32Emulator=0x10005f62,
1187 EMachineUid_WinC=0x10005f63,
1188 EMachineUid_CL7211_Eval=0x1000604f,
1189 EMachineUid_LinkUp=0x00000000,
1190 EMachineUid_Assabet=0x100093f3,
1191 EMachineUid_Zylonite=0x101f7f27,
1192 EMachineUid_IQ80310=0x1000a681,
1193 EMachineUid_Lubbock=0x101f7f26,
1194 EMachineUid_Integrator=0x1000AAEA,
1195 EMachineUid_Helen=0x101F3EE3,
1196 EMachineUid_X86PC=0x100000ad,
1197 EMachineUid_OmapH2=0x1020601C,
1198 EMachineUid_OmapH4=0x102734E3,
1204 Defines power levels for the system (or 'Main') battery.
1206 @see HALData::TAttribute
1208 enum TPowerBatteryStatus
1210 EPowerBatteryStatus_Zero,
1211 EPowerBatteryStatus_Replace,
1212 EPowerBatteryStatus_Low,
1213 EPowerBatteryStatus_Good,
1219 Defines power levels for the backup power.
1221 @see HALData::TAttribute
1223 enum TPowerBackupStatus
1225 EPowerBackupStatus_Zero,
1226 EPowerBackupStatus_Replace,
1227 EPowerBackupStatus_Low,
1228 EPowerBackupStatus_Good,