How to use HAL api to get device specific information

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Created: judith14 (31 May 2007)
Last edited: hamishwillee (30 May 2013)
HAL is Hardware Abstraction Layer.

HAL api is very useful in getting hardware related information. We can get values like manufacturer (say,nokia) uid ,Machine UID ,Display x and y dimension in pixels-screen resolution or in twips , mouse speed , battery status, device specific hardware version number , device specific model number, backlight on the device using HAL api.

Attribute types and values used by HAL::Get() are defined in HALData.

Library to link : hal.lib

#include <HAL.h>
#include <hal_data.h>
//Display x and y dimension in pixels-screen resolution
TInt x=0;
TInt y=0;
HAL::Get(HALData::EDisplayXPixels, x);
HAL::Get(HALData::EDisplayYPixels, y);
This page was last modified on 30 May 2013, at 07:34.
23 page views in the last 30 days.